Author Topic: Connecting to the database Error  (Read 2879 times)

banni

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
    • Email
Connecting to the database Error
« on: November 07, 2008, 11:43:17 »
   
I bought the 10 licensed agents.
I'm trying to install 1.4.7 on queuemetrics slackware 12.0 kernel 2.6.21.5-smp with asterisk 1.4 and freepbx.

The server has no graphical interface, and the connection is from another computer:

http://10.0.0.114:8080/queuemetrics/

10.0.0.114 ip server

The web.xml file is the default, but I also tried with: ... jdbc: mysql: / / 10.0.0.114/queuemetrics? ...

I also tried to add user mysql

queuemetrics@10.0.0.114, queuemetrics@localhost.localdomain
queuemetrics @%

I tried to use:
- Tomcat 5.0.28, 5.5.12, and 6.0.16
- Java j2sdk-1_5_0_04-i586-1, jdk-1_5_0_11-linux-i586, dk-6u10-linux-i586.
- J Connector Mysql 3.0.10, 3.1.12, 5.0.8, 5.1.7
- MySql 5.0.37

I always make the same mistake: Connecting to the database.

Problem encountered:
Please set the correct server address, database name, user name and password to access the MySQL database.
To do so, edit the JDBC_URL property of WEB-INF/web.xml

- Only in some cases (eg connector 3.1.12)

Java Error:
java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.SocketException: java.net.ConnectException: Connection refused'. ** BEGIN nested EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect (StandardSocketFactory . java: 156) at com.mysql.jdbc.MysqlIO. (MysqlIO.java: 284) at com.mysql.jdbc.Connection.createNewIO (Connection.java: 2680) at com.mysql.jdbc.Connection. (Connection. java: 1485) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.java: 266) at java.sql.DriverManager.getConnection (DriverManager.java: 525) at java.sql.DriverManager.getConnection (DriverManager.java: 193 ) At it.loway.app.queuemetrics.jdbcTester.jdbcTester.testJdbcConn (Unknown Source) at org.apache.jsp.dbtest.index_jsp._jspService (index_jsp.java: 187) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java: 94) at javax.servlet.http.HttpServlet.service (HttpServlet.java: 802) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 324) at org.apache.jasper. servlet.JspServlet.serviceJspFile (JspServlet.java: 292) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 236) at javax.servlet.http.HttpServlet.service (HttpServlet.java: 802) at org . apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 237) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 157) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve . java: 214) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java: 520) at org.apache.catalina. core.StandardContextValve.invokeInternal (StandardContextValve.java: 198) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java: 152) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java: 520) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java: 137) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java: 104) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java: 118) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java: 102) at org.apache. catalina.core.StandardPipeline.invoke (StandardPipeline.java: 520) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java: 109) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java: 520) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java: 929) at org.apache.coyote.tomcat5.CoyoteAdapter . service (CoyoteAdapter.java: 160) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java: 799) at org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.processConnection (Http11Protocol.java: 705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt (PoolTcpEndpoint.java: 577) at org.apache.tomcat.util.threads.ThreadPool $ ControlRunnable.run (ThreadPool.java: 683) at java.lang.Thread. run (Thread.java: 595) ** END ** nested EXCEPTION Attempted reconnect 3 times. Giving up.

Thanks for the help.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Connecting to the database Error
« Reply #1 on: November 10, 2008, 10:09:06 »
Being a "connection refused", I think this is not much the st of credentials that you offer, but it's something more "upstream". I have two likely ideas:
1. your MySQL does not bind to TCP/IP but only to unix sockets. You should be able to set who connects from in the my.ini file
2. you have some kind pof firewall on

Please keep us posted on how it goes.