Python Service failed to start with Error starting server socket 62001 for contained engine

Python Service failed to start with Error starting server socket 62001 for contained engine

book

Article ID: KB0073321

calendar_today

Updated On:

Products Versions
Spotfire Service for Python 1.0.0 or later

Description

Python Service fails to start with below errors logged in the Python Service log:
------------------------------------------------------
ERROR 2021-01-21T08:34:38,924 +0100 [main] topology.engine.EngineConnectionHandler: Error starting server socket 62001 for contained engine
java.net.BindException: Address already in use: NET_Bind
at java.net.PlainSocketImpl.bind0(Native Method) ~[?:?]
at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:132) ~[?:?]
........................
WARN 2021-01-21T08:35:07,041 +0100 [EngineQueueHandler-canary] topology.engine.AbstractEngineController: Marking pythonsrv-62001 in state INIT_CREATE_SOCKET_CONNECTION as a failure: Engine did not complete initalization within the time limit.
ERROR 2021-01-21T08:35:07,041 +0100 [EngineQueueHandler-canary] topology.engine.EngineCreator: Engine pythonsrv-62001 started at instant 2021-01-21T07:34:36.015851200Z did not complete initalization within the time limit.
-------------------------------------------------------------
 

Issue/Introduction

Python Service failed to start with Error starting server socket 62001 for contained engine.

Environment

All supported OS

Resolution

The error is due to a port conflict on 62001, where this port has been occupied and this prevents the new python engine session from starting. 
----------
"Error starting server socket 62001 for contained engine
java.net.BindException: Address already in use: NET_Bind"
---------

Please follow below mentioned steps to resolve the issue:
--------------------------------------
On Node manager machine where you have configured Python service, please check if you can find any stray Python Java process via ProcessExplorer (Open Task manager to verify)

Or if you can find any process running on port 62001 (for example, using command "netstat -ano | findstr 62001" in a command prompt window).

If yes, please kill any process that has been started on port 62001 (e.g. command "taskkill /PID <PID> /F"). 

Then restart the Python service from Nodes & Services in Spotfire server UI.
--------------------------------------