InterceptorPB not connected

317 views
Skip to first unread message

Janari Põld

unread,
Mar 1, 2021, 11:29:03 AM3/1/21
to Jasmin SMS Gateway
Hi,

I am using latest Jasmin docker image from Docker Hub and am using MT interceptors.
All was working fine up to a docker restart. Now I am getting interceptor errors
in http-api log, when Jasmin tries to execute an interceptor.

2021-03-01 16:18:08 DEBUG    1 RouterPB selected StaticMTInterceptor/<MTIS (pyCode=# Jasmin package is installed  ..)> interceptor for this SubmitSmPDU
2021-03-01 16:18:08 ERROR    1 InterceptorPB not connected !
2021-03-01 16:18:08 ERROR    1 Error: 503: InterceptorNotConnectedError (InterceptorPB not connected !)
2021-03-01 16:18:08 DEBUG    1 Returning {'return': 'InterceptorPB not connected !', 'status': 503} to 172.18.0.1.


Logged in to the Jasmin docker and seeing this

root@a8993aed657b:/usr/jasmin# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.2  2.8 677488 56956 ?        Ssl  16:17   0:00 /usr/local/bin/python /usr/local/bin/jasmind.py --enable-interceptor-client --enable-dlr-thrower --enable-dlr-lookup -u jcliadmin -p jclipwd
root           6  0.1  0.0      0     0 ?        Z    16:17   0:00 [interceptord.py] <defunct>

Have tried restarting docker and downloading new image, but still the same error.

What could be wrong.


Regards,

Janari

Kamui Shiro

unread,
Mar 1, 2021, 4:52:06 PM3/1/21
to Jasmin SMS Gateway
your jasmind service seems to be running and prepared to connect to jasmin-interceptord service, but have you checked if the service is up and running?

sudo systemctl status jasmin-interceptord

Janari Põld

unread,
Mar 2, 2021, 1:48:26 AM3/2/21
to Jasmin SMS Gateway
Hi,

thanks for the reply.

We are running the Jasmin using official docker container https://hub.docker.com/r/jookies/jasmin

Starting up the docker container and logging into the container I can see that the interceptord.py process
is in zombie state, meaning its dead, but still in the process list. Here is the output of ps aux


root@a8993aed657b:/usr/jasmin# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  2.6 677488 53920 ?        Ssl  Mar01   0:15 /usr/local/bin/python /usr/local/bin/jasmind.py --enable-interceptor-client --enable-dlr-thrower --enable-dlr-lookup -u jcliadmin -p jclipwd
root           6  0.0  0.0      0     0 ?        Z    Mar01   0:00 [interceptord.py] <defunct>


Why is the interceptord.py dead already, when docker container is started?
Nothing is logged in interceptor.log

The docker container does not have systemctl

root@a8993aed657b:/usr/jasmin# systemctl status jasmin-interceptord
bash: systemctl: command not found

What could I try or do to get the Jasmin interceptors working again?
The interceptors were working before, after restarting the docker container its not working anymore.

Regards,

Janari

Janari Põld

unread,
Mar 2, 2021, 7:39:37 AM3/2/21
to Jasmin SMS Gateway
Found the root cause

When docker is stopped /tmp/interceptord.lock is not deleted. Now starting the  docker
again and the interceptord.py will not start as the lock file from previous execution is
still there. The jasmin lock file (/tmp/jasmind.lock) is cleaned up properly and will be
created again on docker start.

Solution was to modify the jasmin/docker-entrypoint.sh to

#!/bin/bash
set -e

if [ "$2" = "--enable-interceptor-client" ]; then
  echo 'Starting interceptord'
  rm -rf /tmp/interceptord.lock
  interceptord.py &
fi

echo 'Starting jasmind'
exec "$@"

Maybe this is helpful to someone.

Regards,

Janari
Reply all
Reply to author
Forward
0 new messages