Intermittently when calling stop the server state stays stuck at STOPPING and doesn't transition to STOPPED at all. This causes issues when I try to start it again as the start will not allow it unless the server state is STOPPED
Caused by: com.sap.conn.jco.JCoRuntimeException: (136) JCO_ERROR_ILLEGAL_STATE: JCoServer saps4model.SAPS4 is currently running. Current server state is STOPPING at com.sap.conn.jco.rt.AbstractServer.start(AbstractServer.java:700) at com.sap.conn.jco.rt.CPICServer.start(CPICServer.java:31) at com.incorta.datasource.sap.callback.SapErpCallBackServer.start(SapErpCallBackServer.java:148)
I checked a previously asked question https://answers.sap.com/questions/702031/jcoserver-status-changing-to-stopping-not-stopped-.html but I don't have concurrent access / calls to the stop. I guarantee only one thread calls the stop and it waits for 5 mins before allowing any other thread to do an action on the server.
Are there any clues as to why this would happen? Also how to prevent it/work around it?