QueueMetrics forum

QueueMetrics => QueueMetrics installation => Topic started by: MikeCook on August 17, 2009, 13:29:37

Title: Installation on Debian failing
Post by: MikeCook on August 17, 2009, 13:29:37
I am trying to install on a debian system but failing can anyone point me in the right direction??

I have a debian box running
Linux pinky 2.6.18 #1 SMP Fri Nov 23 16:23:22 GMT 2007 i686 GNU/Linux

I have installed Java and believe it is running correctly
pinky:/usr/share/mysql-connector-java-5.1.8# java -version
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
Java HotSpot(TM) Server VM (build 1.5.0_20-b02, mixed mode)
pinky:/usr/share/mysql-connector-java-5.1.8#

I have a working MySql database being used for other projects
mysqladmin  Ver 8.41 Distrib 5.0.32, for pc-linux-gnu on i486
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          5.0.32-Debian_7etch6-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 9 days 20 hours 32 min 10 sec

and I can log on with the default Queuemetrics username and password
pinky:/usr/share/mysql-connector-java-5.1.8# mysql queuemetrics -uqueuemetrics -pjavadude
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 26703
Server version: 5.0.32-Debian_7etch6-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I have followed the instructions to the letter but all I get from dbtest is :-

It looks like you don't have a working JDBC connection.
QueueMetrics requires a working JDBC connection to a MySQL database in order to work properly.
If you have not already done so:

Download the MySQL database driver and put it in WEB-INF/lib with the other JAR files. Restart the servlet container.
Create a database for QueueMetrics and import the sample database you'll find in WEB-INF/README
Edit the file WEB-INF/web.xml to enter the database server, user and password QueueMetrics will use to connect
These steps are explained in greater detail in QueueMetrics user manual, available at http://queuemetrics.com/manual.jsp.

This is the current configuration found:

XML configuration file located at: /usr/share/tomcat5.5/webapps/queuemetrics/WEB-INF/web.xml
JDBC URI configured as: jdbc:mysql://localhost/queuemetrics?autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude
Most common JDBC errors are explained in the FAQs, available at http://queuemetrics.com/faq.jsp.


Any ideas??

Mike

Title: Re: Installation on Debian failing
Post by: QueueMetrics on August 18, 2009, 16:30:40
Two things come to my mind:
1. did you install the MySQL connector (ConnectorJ) under the WEB-INF/libs/ of QM and restart it?
2. did you upload the sample database?
 
Title: Re: Installation on Debian failing
Post by: MikeCook on August 18, 2009, 17:13:19
Yes I have the connector in the lib directory

pinky:/usr/share/tomcat5.5/webapps/queuemetrics/WEB-INF/lib# ls
QueueMetrics-1.5.3.jar              mysql-connector-java-bin.jar
loway-tpf-158p.jar                  redstone-xmlrpc-1.0.jar
mysql-connector-java-5.1.8-bin.jar  xerces.jar

I have tried several different variants of the connector all to no avail

and I have loaded the sample database
pinky:/usr/share/tomcat5.5/webapps/queuemetrics/WEB-INF/lib# mysql queuemetrics -uqueuemetrics -pjavadude
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 26765
Server version: 5.0.32-Debian_7etch6-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
+------------------------+
| Tables_in_queuemetrics |
+------------------------+
| agaw_alarms            |
| agaw_dati              |
| agaw_logs              |
| agaw_runs              |
| agenti_noti            |
| arch_classes           |
| arch_users             |
| broadcast_msg          |
| call_status            |
| code_possibili         |
| dbversion              |
| locations              |
| oq_calls               |
| oq_notes               |
| oq_queues              |
| pause_codes            |
| qa_data                |
| qa_forms               |
| qa_forms_items         |
| qlog_opencalls         |
| queue_log              |
+------------------------+
21 rows in set (0.00 sec)

The only thing I am a little worried about is I have had several different enviroment variables in and out and I am not sure if they are
a)required
b)the correct ones
c)pointing to the right places

Mike
Title: Re: Installation on Debian failing
Post by: QueueMetrics on August 19, 2009, 16:55:10
I see you have two copies of the connector:

pinky:/usr/share/tomcat5.5/webapps/queuemetrics/WEB-INF/lib# ls
QueueMetrics-1.5.3.jar              mysql-connector-java-bin.jar
loway-tpf-158p.jar                  redstone-xmlrpc-1.0.jar
mysql-connector-java-5.1.8-bin.jar  xerces.jar


This is a good reason for it not to be working! Remove one of them and restart Tomcat.

Title: Re: Installation on Debian failing
Post by: MikeCook on August 19, 2009, 17:41:20
Whoops!! That would have been a stupid mistake but it was not the cause.

 I have removed both and then reapplied one at a time with Tomcat restarts in between and still I cannot connect java to the database with either connector.

I thought QM was an easy install this has now taken over a week and still it does not work!!

Mike
Title: Re: Installation on Debian failing
Post by: QueueMetrics on August 20, 2009, 10:31:53
One last thing: are you sure that your MySQL is connectable from the newtork? the java connectors are not able to connect to unix socket like the one you show /var/run/mysqld/mysqld.sock - edit the my.ini file and activate network access.
Title: Re: Installation on Debian failing
Post by: MikeCook on August 20, 2009, 12:13:12
Yes I am sure network access is available on port 3306 as I have tested it from a remote machine using SQLyog
Title: Re: Installation on Debian failing
Post by: MikeCook on August 20, 2009, 17:02:24
IT IS WORKING AT LAST!!!!

I changed the line
JDBC URI configured as: jdbc:mysql://localhost/queuemetrics?autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude

to read

JDBC URI configured as: jdbc:mysql://xxx.xxx.xxx.xxx/queuemetrics?autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude

where xxx.xxx.xxx.xxx is the outside IP address of my server and everything sprung into life

Thanks for your help

Mike
Title: Re: Installation on Debian failing
Post by: QueueMetrics on August 21, 2009, 18:12:55
This is strange - your MySQL was listening on the ethernet interface and not on loopback?  ;D
Title: Re: Installation on Debian failing
Post by: hayesey on September 29, 2009, 11:41:37
I assume you have:

bind-address = xxx.xxx.xxx.xxx

in my.cnf?  Comment the line out, restart mysql and it should listen on all available network interface inc the loopback.

cheers,
Paul.
Title: Re: Installation on Debian failing
Post by: QueueMetrics on October 01, 2009, 12:44:08
 ;D
Title: Re: Installation on Debian failing
Post by: cuban_cigar on November 03, 2011, 18:55:03
WHAT FILE DID YOU EDIT.


This thread it a huge tease without that meta info, thanks.