You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@predictionio.apache.org by Selvaraju Sellamuthu <se...@gmail.com> on 2018/04/18 13:15:50 UTC

Killing the existing process id before redeploy Issue | 0.11.6

Hi Team,

I need to retrain and redeploy my engine instances frequently, For this
scenario, PredictionIO deploy option checks the port and closes all the
connections associated with that.But its not killing the process ID
completely.

When i try undeploy option, I am getting the below errors. Is there a way,
without going with manual process id KILL (kill -9 <pid>).

I can find out the process id and can kill like below in my deploy script.

deploy_pid=`jps -lm | grep "onsole deploy" | cut -f 1 -d ' '`
kill -9 deploy_pid

I am not sure, this way of killing the process ,shuts down all the
connections established by PredictionIO server instance.

$ pio undeploy --port 8004
/data/PredictionIO-0.11.0-incubating
/data/PredictionIO-0.11.0-incubating
log4j:WARN No such property [datePattern] in
org.apache.log4j.RollingFileAppender.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/data/PredictionIO-0.11.0-incubating/lib/spark/pio-data-hdfs-assembly-0.11.0-incubating.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/data/PredictionIO-0.11.0-incubating/lib/pio-assembly-0.11.0-incubating.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[INFO] [Engine$] Undeploying any existing engine instance at
http://0.0.0.0:8004
[ERROR] [Engine$] Another process is using http://0.0.0.0:8004, or an
existing engine server is not responding properly (HTTP 405). Unable to
undeploy


In engine deployment, the process id listens to 2 ports like below:
java    18563 test_user  300u  IPv6 21077332      0t0  TCP *:8004 (LISTEN)
java    18563 test_user  312u  IPv6 21095572      0t0  TCP
192...xxx:47190->192...xxx:eforward (ESTABLISHED)
java    18563 test_user  337u  IPv6 21034918      0t0  TCP *:46428 (LISTEN)

During redeploy option ... it releases the 8004 PORT which is given with
deploy option, but 46428(randomly generated) port keeps alive, due to that
the PROCESS id 18563 becomes stale process.

every pio deploy, the stale process keeps growing.

Environment:
Hortonworks - YARN cluster
Spark 1.6.X
Hbase
Elastic Search


Thanks
Selvaraju