Splunk AppDynamics

Database agent ignore listener IP and try to connect to server IP

Mario_Krupa1
New Member

My database collector is set to use custom JDBC string:

jdbc:oracle:thin:@(DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.64.129.132)(PORT = 5350))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.64.129.133)(PORT = 5350))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = SERVICE_NAME.XYZ.COM)

    )

  )

So I would expect, it will try to reach database on above IP addresses (db listener)

BUT instead of that it tries to connect to oracle server VIPs where we have installed databases and ignoring listeners IPs

Caused by: java.io.IOException: Connection timed out, socket connect lapse 127231 ms. server.xyz.com/10.64.50.184 5152 0 1 true

                at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209)

                at oracle.net.nt.ConnOption.connect(ConnOption.java:161)

                at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)

                ... 29 more

               

Caused by: java.io.IOException: Connection timed out, socket connect lapse 127231 ms. server.xyz.com/10.64.50.174 5152 0 1 true

                at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209)

                at oracle.net.nt.ConnOption.connect(ConnOption.java:161)

                at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)

Of course, FW allows communication only towards listener IPs and not to servers original IPs

What to do?

Thanks.

Labels (1)
Tags (2)
0 Karma

Xiangning_Mao
Path Finder

Hi Mario,

Thanks for posting question to the community!

I tried to replicate your issue in my local environment.
And I got the similar result with yours.

In my test case, the agent uses instance_name and value (for hostname and port) that it is getting from query below to connect to the database and see if there is any successful connection to any of the node, If there, then it uses this method to monitor the individual Nodes.

SQL> select i.inst_id, i.instance_name, i.host_name, p.value from gv$instance i LEFT JOIN gv$parameter p ON (p.inst_id = i.inst_id AND p.name = 'local_listener');


The hostname in value column is VIP of my server, so that's why my db-agent connected to VIPs instead of Listener IPs of JDBC string.

So please use the SQL I shared to check if your value is VIP of server.
Please check hostname in listener.ora and tnsnames.ora in your servers as well.


If you want to change the query result, you should edit the listener.ora and tnsnames.ora in your db servers.
And then use these command in your oracle database to finish the edition.

$ sqlplus '/as sysdba'
SQL> alter system set local_listener="(address=(protocol=tcp)(host=new ip)(port=new port))";
SQL> alter system register

Hope this answer helps!

Best regards,
Mao

Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...