jst
New Responder

FS-CLI: SocketTimeoutException

 

Hello all,

currently we have a problem with the FS-CLI and partly also with the SiteArchitecten. After updating to FirstSpirit version 2021-11 and switching to OpenJDK 11, we keep running into connection crashes. 

In the logs we can see that the garbage collection runs relatively often. Raising the heap did not bring any improvement. The memory usage looks actually also ok.

The CLI throws the following exception:

 

ERROR Exception occurred during context initialization or command execution
de.espirit.firstspirit.store.access.nexport.exceptions.SyncOperationException: [ExternalSync - Import] failed: Connection closed
	at de.espirit.firstspirit.store.access.nexport.operations.ImportOperationImpl.perform(ImportOperationImpl.java:177)
	at com.espirit.moddev.cli.commands.ImportCommand.call(ImportCommand.java:151)
	at com.espirit.moddev.cli.commands.ImportCommand.call(ImportCommand.java:48)
	at com.espirit.moddev.cli.Cli.executeCommand(Cli.java:220)
	at com.espirit.moddev.cli.Cli.execute(Cli.java:143)
	at com.espirit.moddev.cli.Cli.main(Cli.java:116)
Caused by: de.espirit.firstspirit.common.IOError: Connection closed
	at de.espirit.firstspirit.client.io.ServerCaller$MessageResponseListener.getResponse(ServerCaller.java:1273)
	at de.espirit.firstspirit.client.io.ServerCaller.call(ServerCaller.java:728)
	at de.espirit.firstspirit.client.io.ServerCaller.call(ServerCaller.java:538)
	at de.espirit.firstspirit.client.io.ServerCaller.doManagerCall(ServerCaller.java:643)
	at de.espirit.firstspirit.client.io.ServerCaller.callManager(ServerCaller.java:612)
	at de.espirit.firstspirit.client.io.RemoteManagerCaller.invoke(RemoteManagerCaller.java:57)
	at com.sun.proxy.$Proxy40.getLanguages(Unknown Source)
	at de.espirit.firstspirit.admin.AdminImpl.getLanguages(AdminImpl.java:263)
	at de.espirit.firstspirit.store.access.feature.TargetValidator.validateNamedReferences(TargetValidator.java:370)
	at de.espirit.firstspirit.store.access.feature.TargetValidator.validateNamedReferences(TargetValidator.java:322)
	at de.espirit.firstspirit.store.access.nexport.importer.ImportElement.validate(ImportElement.java:538)
	at de.espirit.firstspirit.store.access.nexport.ElementFileSystemSync.refresh(ElementFileSystemSync.java:141)
	at de.espirit.firstspirit.store.access.nexport.ElementFileSystemSync.getRootImportElements(ElementFileSystemSync.java:173)
	at de.espirit.firstspirit.store.access.nexport.operations.ImportOperationImpl.perform(ImportOperationImpl.java:170)
	... 5 more
Caused by: de.espirit.firstspirit.client.nio.ClosedIOException: FSHttpClientImpl system:443 is closed by Thread[FSHttpClientImplIO-0,5,main]
	at de.espirit.firstspirit.client.nio.AbstractFSMessageIO.close(AbstractFSMessageIO.java:119)
	at de.espirit.firstspirit.client.nio.impl.FSHttpClientImpl.close(FSHttpClientImpl.java:218)
	at de.espirit.firstspirit.client.nio.impl.FSHttpClientImpl.run(FSHttpClientImpl.java:204)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.base/java.net.SocketInputStream.socketRead0(Native Method)
	at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
	at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:448)
	at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:68)
	at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1104)
	at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:823)
	at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
	at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
	at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
	at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
	at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
	at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:85)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
	at org.apache.http.client.fluent.Request.internalExecute(Request.java:173)
	at org.apache.http.client.fluent.Executor.execute(Executor.java:262)
	at de.espirit.common.io.HttpRequester.execute(HttpRequester.java:179)
	at de.espirit.firstspirit.client.nio.impl.FSHttpClientImpl.execute(FSHttpClientImpl.java:294)
	at de.espirit.firstspirit.client.nio.HttpSSLServerChannel.callServer(HttpSSLServerChannel.java:261)
	at de.espirit.firstspirit.client.nio.HttpSSLServerChannel.writeAndRead(HttpSSLServerChannel.java:79)
	at de.espirit.firstspirit.nio.FSMessage.read(FSMessage.java:174)
	at de.espirit.firstspirit.client.nio.impl.FSHttpClientImpl.run(FSHttpClientImpl.java:172)
	... 3 more

 

 

Has anyone already had this problem and an idea?

Many greetings
Jörn

 

3 Replies
hoebbel
Crownpeak employee

Dear Jörn,

the exception you posted seems to be a time out issue - wither the connection is lost or the FirstSpirit server didn't answer within the allowed time.

Since you wrote, that there are issues with the SiteArchitect, too, I assume that the problem is located within the FirstSpirit Server.

You wrote that the problems begun after you updated FirstSpirit and the JDK. If you use a very old server installation, maybe the root cause of the problems are the used start parameters or an old wrapper version isn't working well together with the JDK 11.

You should create a ticket for our tech support, so that the problem can be analysed (and solved) there. 

Maybe (just a guess, since I don't have sufficient information) you can solve the issue by updating the wrapper (FirstSpirit backend) and the start parameters. Instructions how to update the backend can be found here:
https://docs.e-spirit.com/odfs/edocs/admi/updating-firsts/updating-firsts/index.html

But for very old FirstSpirit installations the fs-wrapper.isolated.conf (or even the fs-wrapper.conf, if still the legacy mode is used) has also to be updated. You can find an up-to-date-version of the file within the fs-install-2.1.0.tar.gz.
But be careful - you must manually transfer the important settings (java.command, java.maxmemory, java.initmemory) from the current version to the new version and maybe some of the java.additional commands, if there are any special parameters for the server installation. 
Since it is possible, that the FirstSpirit server will no longer start, if you make a mistake, once again the hint that you should create a tech support ticket 🙂

Best regards
Holger

0 Kudos

Hi Holger,

thanks for your answer. I've already talked to the Tech-Support and it seams that we could solve this problem.

Best
Joern

0 Kudos

Hello Jörn.

In our project we have a similar problem: since the change to Java 11 we get the "FSSocket is closed" error when importing the project backup via fs-cli.

Could you fix your problem and what was the solution?

Best regards, 
Olga

0 Kudos