Check if datasource is up in WebLogic
Asked Answered
C

5

6

How may I check if datasource is up in Weblogic 10.3 menu. Is there a "ping" button link Glassfish ? in Monitoring->Testing menu there is no Server definition though there is a admin server in target defined,

Cantwell answered 8/11, 2013 at 14:10 Comment(2)
were you able to get this working?Scaler
It was long time ago, I think I did not find any solution.Cantwell
S
11

In order to see a Server/State and Test Data Source action listed under Services -> Data Sources -> <your datasource> -> Monitoring (Tab) -> Testing (Tab), all of the following need to be true:

  • At least one server targeted by the Data Source needs to be running. If the AdminServer is not targeted, this might not be true - visit Environment -> Servers and check that the targeted server(s) are RUNNING.
  • The Data Source's Configuration -> Connection Pool -> (Advanced) "Test Connections On Reserve" must be checked/true
  • You need to have a table-name configured in Test Table Name or an SQL statement e.g. SQL SELECT 1 FROM DUAL.

You should then see the targeted servers listed in the Monitoring/Testing tab.

Scaler answered 19/2, 2015 at 4:18 Comment(0)
I
1

In Weblogic console, navigate to Data Source> choose which data source> Monitoring> Testing

Just tick on which server you target your data source and test it. Success message will pop up if your data source is up, and vice versa

Iaria answered 20/12, 2013 at 8:6 Comment(3)
I have pointed in my question that I sometimes do not see Server name in there.Cantwell
If your Server name is not listed there, it means Weblogic is not able to reach your database server. This sometime happens when you not yet start the database server or the connection to database server cannot be established.Iaria
Other possibilities is the server in Weblogic which your data source targets to is not running, therefore there wont be any data source running also.Iaria
G
0

If the datasource is deployed and running, you can see the state by looking at the Datasource page under the Monitoring->Statistics tabs (Enabled=true, State=Running). If there is nothing listed on this page for the Datasource, it usually means that the Datasource failed to deploy or is not targeted. Check the WLS server log for an error message, and check the Targets tab to see if it has a deployment target selected. But to answer your question, if you don't see anything on that monitoring page, the Datasource is not running.

If you believe that the Datasource is deployed correctly and you do not see anything in the monitoring page, the datasource may not be in use (no applications using it and initial connections is set to 0). You can set initial connections to at least 1, and enable Test on Reserve. If the connection fails, you will see the failure in the WLS log.

Gothicism answered 8/11, 2013 at 21:25 Comment(1)
I do not think so since if there is not any application deployed which means that datasource is not used. You cannot see any information statistics tab. What I want even if there is not an application deployed there should be a PING button to test datasource connection. This menu is given during definition of datasource at first,Cantwell
G
0

You need to add the targets first. (targes=servers that will use this datasource)

And then test datasource (from Monitoring tab) against any of the targets

Grindlay answered 14/8, 2014 at 21:30 Comment(0)
H
0

Seems Weblogic was not able to create DB Connection pool and DB host was Blocked. This is due to many connection errors.

Please check with below steps:

  1. Login to MySQL Server, run mysqladmin flush-hosts. This will flush the host cache.
  2. Got to DataSource, Re-assign the target and Save.
  3. Restart the Server.
Henryhenryetta answered 22/6, 2017 at 10:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.