cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1815
Views
10
Helpful
18
Replies

Database connection timing out in CVP Application

chad_meyer
Level 1
Level 1

Hey everyone,

 

I have a CVP application that is doing a simple query per call to pull caller data.  The solution is working as expected, however after a week or so (not the same time frame every occurrance) it will start erroring out and I see the following in the app ErrorLog:

 

The error was: A built-in element encountered an exception of type com.audium.server.AudiumException. Connection reset by peer: socket write error The root cause was: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error

I amended the CVP application to manually point to its backup database server in the event of a failure to the primary database, however I get an error stating it cannot bind the jdbc connection, although it exists in the context.xml file.

 

The error was: A built-in element encountered an exception of type com.audium.server.AudiumException. There was a problem looking up the JNDI data source 'gshbckp'. The root cause was: javax.naming.NameNotFoundException: Name [gshbckp] is not bound in this Context. Unable to find [gshbckp].
com.audium.server.AudiumException: A built-in element encountered an exception of type com.audium.server.AudiumException.

Restarting VXML services corrects this problem.  I have reached out to TAC who is saying the issue is with the database while our database team is pointing to an application configuration issue.  Below is the context.xml file:

 

<Resource auth="Container"
	  name="jdbc/gsh"
          factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
          driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
          url="jdbc:sqlserver://dbserver:1433;user=user;password=******;DatabaseName=DB"
	  connection-creation-retry-attempts="5"
	  type="javax.sql.DataSource"
/>
	 
<Resource auth="Container"
	  name="jdbc/gshbckp"
          factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
          driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
          url="jdbc:sqlserver://dbserver2:1433;user=user;password=******;DatabaseName=DB"
	  connection-creation-retry-attempts="5"
	  type="javax.sql.DataSource"
/>
 

 I am connecting to SQL Server 2019 standard with the mssql-jdbc-6.4.0.jre7.jar file.

 

Any assistance would be greatly appreciated.

18 Replies 18

Thanks for your response janinegraves. I tried the follow as the only content in my XML file and i received the same error.

 

<!-- The contents of this file will be loaded for each web application -->
<Context>

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname=""/>
<Resource name="jdbc/Customer" auth="Container" type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://onl-mssql.voicelab.local:1433;DatabaseName=Cisco;user=sa;password=@DBAadmin"/>
</Context>

can you also try changing DatabaseName=Cisco to start with lower-case:  databaseName=Cisco
And are you restarting VXMLServer?
Are you sure the error is the same?

<Resource name="jdbc/Customer" auth="Container" type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://onl-mssql.voicelab.local:1433;databaseName=Cisco;user=sa;password=@DBAadmin"/>

Below is the context.xml file that works in my classroom lab, on my CVP 12.6 with sql server. Why don't you replace yours with this and modify it to use your db details. In case there's some weird unprintable character in your context.xml file. 

<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname="" />
<Resource name="jdbc/customer_db" auth="Container" type="javax.sql.DataSource" username="user" password="pass" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://tteucce125.tte.lab:1433;databaseName=Customer_DB" /></Context>

I'm officially lost because I used the same parameter you provided and I am still seeing the error which the log file is uploaded below. I have a TAC case going as well and they have not been able to find anything yet other than the new Tomcat is different in the way it looks at the parameter unlike before.

 

<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname="" />
<Resource name="jdbc/Customer" auth="Container" type="javax.sql.DataSource" username="sa" password="onelab" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://onl-mssql.voicelab.local:1433;databaseName=Cisco" /></Context>