Found it. Details if anybody wants to dig into it....
The 30 second intervals should have given me a clue. We are running
multiple server instances in a cluster that have a health check for each
server instance. A pre-defined URL is called on each server instance
every 30 seconds. But since it needs to target specific instances, it
can't simply use the host name. It has to send the request using the IP
address instead. This means Tomcat default host will handle it. The
Catalina context file for default host is used instead of the normal
host name context file, and the default host file didn't have all of the
required dataSource names used by the test URL. The real problem was
that this slipped by for a while and wasn't failing the health check as
it should have. I just accidentally saw all the errors in the logs
while looking for something else. Anyway, problem solved. (At least
THIS one was solved.... :-) )
Jerry
On 6/27/2023 3:41 PM, Jerry Malcolm wrote:
All of a sudden I started getting a NameNotFoundException when I'm
trying to resolve a dataSource name. But it comes and goes on all of
my dataSource names. The log below was from about a minute. The only
thing I could find in a google search for "Unable to find [jdbc]"
says my configuration is wrong and proceeds to explain how to set up a
datasource. My datasources have been set up for several years,
correctly as far as I know. They were all working fine until a couple
of days ago. And now they fail for 30 seconds, work for 30 seconds,
and fail again for 30 seconds.
This is a pretty critical problem. I've spent several hours trying to
figure out what could be causing it. It's failing on:
ds = (DataSource)envContext.lookup( dataSourceName );
The datasource is defined in a context file in Catalina folder:
<ResourceLink name="jdbc/idmanager2" global="jdbc/wridz"
type="javax.sql.DataSource" />
And the global resource is defined in /conf/server.xml.
Tomcat 9.0.53 running on Java 11, AWS Linux2, connecting to an AWS
MySQL RDS.
I haven't been playing with dataSources in months. I'm at a loss.
Not a fan of random problems that just appear.... Any help you can
offer to assist me in figuring this out and getting it resolved will
be greatly appreciated.
Jerry
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
2023-06-27 20:17:02.924637 Successful - DBData.getConnection(
jdbc/idmanager2 )
2023-06-27 20:17:02.925252 Successful - DBData.getConnection(
jdbc/idmanager2 )
2023-06-27 20:17:03.911673 Successful - DBData.getConnection(
jdbc/idmanager2 )
2023-06-27 20:17:03.981999 Successful - DBData.getConnection(
jdbc/idmanager2 )
2023-06-27 20:17:04.001715 Successful - DBData.getConnection(
jdbc/idmanager2 )
2023-06-27 20:17:04.80616 Successful - DBData.getConnection(
jdbc/idmanager2 )
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---javax.naming.NameNotFoundException: Name [jdbc/idmanager2] is
not bound in this Context. Unable to find [jdbc].
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org