Information link fails with error 'Unrecognized Windows Sockets error: 0: recv failed'

Information link fails with error 'Unrecognized Windows Sockets error: 0: recv failed'

book

Article ID: KB0077860

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

There could be scenarios where information links fail while opening reports on TIBCO Spotfire Analyst or Web Player or while running Scheduled Updates and Automation jobs with error  in server.log  as 'Unrecognized Windows Sockets error: 0: recv failed'. This is because of communication issue between TIBCO Spotfire Server and database used in the information link.

For example:
Schedule Updates having information links fail to execute and you could see below error in sever.log. Here information link is using Microsoft SQL database.
 

 ERROR 2019-04-23T05:13:41,026-0500 [SPOTFIRESYSTEM\scheduledupdates, #62, #106025] api.common.InformationModelServiceCommon: An Internal Error has occurred. Failed to check the existance of id 730e789f-d2f5-4e15-82f5-2c8347e265ed com.spotfire.ws.api.common.InformationModelWebServiceException: An Internal Error has occurred. Failed to check the existance of id 730e789f-d2f5-4e15-82f5-2c8347e265ed ... Caused by: com.spotfire.ws.im.IMException: Failed to check the existance of id 730e789f-d2f5-4e15-82f5-2c8347e265ed ... Caused by: com.spotfire.ws.library.StorageException: Unrecognized Windows Sockets error: 0: recv failed, DATABASE_ERROR ... Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Unrecognized Windows Sockets error: 0: recv failed

Issue/Introduction

Information link fails with error 'Unrecognized Windows Sockets error: 0: recv failed'

Resolution

'Unrecognized Windows Sockets error: 0: recv failed' error is seen when JVM has problems opening or closing sockets at the Operating System level when both IPv4 and IPv6 are enabled on a Windows server.
To fix this problem JVM will need to run over IPv4, if possible.To do this you need to add the following JVM option: -Djava.net.preferIPv4Stack=true 

Procedure:

  1. Open the appropriate file in a text editor:
    • For Spotfire Server on Windows
      • If you are running TIBCO Spotfire Server as a Windows service, open the <installation dir>/tomcat/bin/service.bat file.
      • If you are not running TIBCO Spotfire Server as a Windows service, open the <installation dir>/tomcat/bin/setenv.bat file.
    • For Spotfire Server on Linux
      • Open the <installation dir>/tomcat/bin/setenv.sh file.
  2. Locate the variable named JAVA_OPTS.
  3. Enter the following parameter in the JAVA_OPTS section: -Djava.net.preferIPv4Stack=true. The file will look similar to this (the new parameter is highlighted in yellow):User-added image
  4. Save and close the file.
  5. Restart TIBCO Spotfire Server.

Additional Information

External: 

Doc: Other scenario where forcing Java to use Internet Protocol version 4 is used: