DX Application Performance Management

Expand all | Collapse all

SQL server component not starting for APMSQL

Jump to Best Answer
  • 1.  SQL server component not starting for APMSQL

    Posted 11-07-2018 11:28 AM

    The “SQL server” component of APMSQL is not starting which results in the exception stack trace included below.

    I executed “sudo netstat –anp | grep 54321” which returned no results so I concluded the the SQL server component did not start.

     

    Running APM 10.7 SP2

    I copied APMSqlServer from a working environment and updated the JDBC URL, bind address, and MOM EM host in the config files.

     

    I tried turning on DEBUG logging but there are tons of WARN messages in the log file making it difficult to sort through especially not knowing exactly what I am looking for.

    Any ideas?

     

    Exception stack trace follows…

     

    org.teiid.jdbc.TeiidSQLException: TEIID20020 Error establishing socket to host and port: xxxxx:54321. Reason: Connection refused (Connection refused)

            at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)

            at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)

            at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:66)

            at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:107)

            at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:55)

            at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)

            at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)

            at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)

            at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)

            at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)

            at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)

            at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)

            at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

    Caused by: org.teiid.net.socket.SingleInstanceCommunicationException: TEIID20020 Error establishing socket to host and port: sxpda01189.delta.com:54321. Reason: Connection refused (Connection refused)

            at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:161)

            at org.teiid.net.socket.SocketServerConnection.<init>(SocketServerConnection.java:95)

            at org.teiid.net.socket.SocketServerConnectionFactory.getConnection(SocketServerConnectionFactory.java:316)

            at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:64)

            ... 10 more

    Caused by: java.net.ConnectException: Connection refused (Connection refused)

            at java.net.PlainSocketImpl.socketConnect(Native Method)

            at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

            at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

            at java.net.Socket.connect(Socket.java:589)

            at java.net.Socket.connect(Socket.java:538)

            at java.net.Socket.<init>(Socket.java:434)

            at java.net.Socket.<init>(Socket.java:244)

            at org.teiid.net.socket.OioOjbectChannelFactory.createObjectChannel(OioOjbectChannelFactory.java:174)

            at org.teiid.net.socket.SocketServerInstanceImpl.connect(SocketServerInstanceImpl.java:94)

            at org.teiid.net.socket.SocketServerConnectionFactory.getServerInstance(SocketServerConnectionFactory.java:277)

            at org.teiid.net.socket.SocketServerConnection.connect(SocketServerConnection.java:239)

            at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:125)

            ... 13 more



  • 2.  Re: SQL server component not starting for APMSQL

    Posted 11-07-2018 12:05 PM

    Make sure that APMSQL_HOME/bin/apmsql has correct JAVA Path

     

    # resolve links - $0 may be a softlink
    JAVA_HOME=/opt/CA/APM/10.5.X.X/jre;export JAVA_HOME

     

    Also make sure

     

    com.ca.apm.sqlserver.em.host=EM Hostname (MOM Hostname)

     

    com.ca.apm.sqlserver.jdbcbind.address=APMSQL Server Hostname (where APMSQL server is running)

     

    Also there is a similar communication I found in community.

    https://communities.ca.com/message/242143961-re-apmsql-jdbc-connection-error-in-ca-bi?commentID=242143961#comment-242143961



  • 3.  Re: SQL server component not starting for APMSQL
    Best Answer

    Posted 11-07-2018 12:13 PM

    The problem was due to me copying APMSqlServer.properties file to incorrect directory:

    APM_INSTALL_HOME/APMSqlServer/config/APMSqlServer.properties

     

    it works when I copied it to: APM_INSTALL_HOME/config/APMSqlServer.properties

     

    There is no EM component running on this server so there was no APM_INSTALL_HOME/config directory I had to create APM_INSTALL_HOME/config and copy APMSqlServer.properties there.