TSSS instance fails to start on a Linux machine with Open Source R as its statistical engine.

TSSS instance fails to start on a Linux machine with Open Source R as its statistical engine.

book

Article ID: KB0075373

calendar_today

Updated On:

Products Versions
Spotfire Statistics Services All supported versions

Description

When you configure TIBCO Spotfire Statistics Services (TSSS) with Open Source R as its statistical engine on a Linux machine, it may fail to start with below error in TSSS server logs (SplusServer.log):

 
**** Engine startup error *****

Message read thrown an unexpected exception: java.io.EOFException

       at com.insightful.splusserver.engine.splusengine.SplusMessageServer.checkEngineIsRunning(SplusMessageServer.java:777)
       at com.insightful.splusserver.engine.splusengine.SplusMessageServer.startEngineProcess(SplusMessageServer.java:681)
...
...
2020-05-19 20:55:58,618 | WARN  |  | SplusMessageHandler | Failed while sending message of type quit due to ClosedChannelException: null
java.nio.channels.ClosedChannelException

       at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:270)
       at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:461)
       ....
       ....
2020-05-19 20:55:58,665 | ERROR |  | SplusMessageServer | Message read thrown an unexpected exception:
java.io.EOFException
   
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
       ...
       ...
       at java.lang.Thread.run(Thread.java:748)

Cause:

This error occurs if the open-source R path is not correctly set for variable "SPSERVER_RHOME" in the TSSS instance's spserver.properties configuration file, as below:

For example:
---------- 
## Edit this variable to tell TSSS where R is installed on your system.##
SPSERVER_RHOME=/opt/R/3.4.4
-----------

Issue/Introduction

TSSS instance fails to start on a Linux machine with Open Source R as its statistical engine.

Environment

Linux OS

Resolution

If you don't know what is the correct path to the open-source R installation on your system, then you can run below command in R console to display the R installation path:

---------
Sys.getenv("R_HOME") 
----------


The output of this command would be like below (depending upon your installed open-source R version):

For example:
---------
> Sys.getenv("R_HOME")
[1] "/opt/R/3.4.4/lib/R"
----------


Now, update the SPSERVER_RHOME variable with output from the above command in the "spserver.properties" file located at SPSERVER_HOME/init.d/ as below:
---------- 
## Edit this variable to tell TSSS where R is installed on your system.##
SPSERVER_RHOME=/opt/R/3.4.4/lib/R
-----------