05-10-2022 11:42 AM
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.
Solved! Go to Solution.
05-10-2022 05:43 PM
05-10-2022 05:38 PM
Have you tried it at all without the 'connection-creation-retry-attempts="5"' section to see if you see any improvement/difference of opinion?
Also, what version of CVP is this?
05-10-2022 05:43 PM
05-11-2022 08:51 AM
Hi @janinegraves , I'm guessing this is the defect you're mentioning?
05-10-2022 06:24 PM
Thank you both for the reply. @bill.king1 I originally had that entry removed and added it to test. @janinegraves We are running CVP v11.6 currently and assumed your note was for v12+. I will remove that entry and give it another try.
05-11-2022 06:43 AM
06-15-2022 07:06 AM
Closing the gap on this, Janine that worked. Turns out since I setup the SQL database as an availability group for redundancy, when the primary would failover, at times would cause the disconnect to the database. Removing the line from the context file worked. Thanks!
11-07-2022 09:41 AM
Hello Chad, do you mind sharing an example of your XML file because I am getting an error that's strange for mine? Although I have multiple database types, the one I am truly trying to get to work is the MS SQL but i am getting the error "INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified."
11-07-2022 11:37 AM
Ahmed,
Can you please share your xml file with me and I can take a look. Also let me know which version of SQL/CVP you are using.
11-07-2022 12:03 PM
11-07-2022 01:55 PM
Ahmed, I assume you are seeing this as a java error in the application error logs? Tomcat doesn't like special characters so I am going on a limb here and saying the "@" in your password could potentially be hanging you up. You can either try escaping the character or omitting it entirely. I propose the latter to ensure connectivity.
11-07-2022 03:30 PM
Thank you Chad. I had also tried using a simple password as "password" and i am getting the same error.
11-07-2022 04:08 PM
11-07-2022 04:19 PM
Correction, REMOVE the line breaks from within the <Resource> tags and use spaces instead.
11-07-2022 04:00 PM
Ahmed, I see a few odd things in the context.xml
1) In each <Resource> tag, I don't see any white space between the attributes, just line breaks. I'd add blank spaces before the name of each attribute- such as this:
<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;encrypt=true;trustServerCertificate=true"/>
2) I'm not sure if the attribute names are case-sensitive, but assume everything is case-sensitive, the attribute named driverClassName in your first <Resource> tag has an upper-case D at the beginning.
3) Remember to restart VXMLServer after each change of the context.xml
4) If you're still getting an error, remove all the <Resource> tags that you're not using. Restart.
5) If you're still getting the error, remove the attributes ;encrypt=true;trustServerCertificate=true" and see if you get a different error. I've never included those attributes - so it's possible something's wrong with one of them.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide