Unexpected SIGTERM stops Docker standalone-chrome container

1,024 views
Skip to first unread message

Aditya Joshi

unread,
Feb 25, 2020, 11:47:12 PM2/25/20
to Selenium Users
Hi, I am unable to keep the Docker Selenium StandaloneChrome container running https://github.com/SeleniumHQ/docker-selenium. The standalone chrome container abruptly terminates in my Oracle Linux 7 machine. It is unclear what sends the SIGTERM signal to the chrome container. The machine has sufficient disk space and is able to run other Docker containers (e.g the selenium/hub:3.141.59-zirconium) without any problem.

Reproduction steps:

docker run -p 4444 selenium/standalone-chrome:3.141.59-zirconium

** I don't want to use the default 4444 port in the host machine. 

The container starts running for some time, and then terminates due to a SIGTERM. 

INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
INFO supervisord started
with pid 9
INFO spawned
: 'xvfb' with pid 12
INFO spawned
: 'selenium-standalone' with pid 13
INFO
[GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
INFO success
: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
INFO success
: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
INFO
[GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
INFO
::main: Logging initialized @495ms to org.seleniumhq.jetty9.util.log.StdErrLog
INFO
[WebDriverServlet.] - Initialising WebDriverServlet
INFO
[SeleniumServer.boot] - Selenium Server is up and running on port 4444
Trapped SIGTERM/SIGINT/x so shutting down supervisord...
WARN received SIGTERM indicating
exit request
INFO waiting
for xvfb, selenium-standalone to die
INFO stopped
: selenium-standalone (terminated by SIGTERM)
INFO stopped
: xvfb (terminated by SIGTERM)

I am not sure who sends the SIGTERM. I enabled audit logging following this post https://www.thegeekdiary.com/how-to-find-which-process-is-killing-mysqld-with-sigkill-or-sigterm-on-linux/ and found that the supervisor process sends the SIGTERM to "bash" that started the container. However, it is unclear who sent SIGTERM to supervisor. 

type=PROCTITLE msg=audit(1582575602.648:1389598): proctitle=62617368002F6F70742F62696E2F656E7472795F706F696E742E7368
type
=SYSCALL msg=audit(1582575602.649:1389599): arch=c000003e syscall=62 success=yes exit=0 a0=d a1=f a2=0 a3=1 items=0 ppid=21866 pid=21919 auid=4294967295 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=4294967295 comm="supervisord" exe="/usr/bin/python2.7" key="audit_kill"
type
=OBJ_PID msg=audit(1582575602.649:1389599): opid=21927 oauid=-1 ouid=1000 oses=-1 ocomm="bash"

Other Docker containers on this machine run fine, including the Docker Selenium Hub https://github.com/SeleniumHQ/docker-selenium

I have tried disabling/adding https proxies and no proxy without any success. Please suggest ways to further investigate and resolve the problem.

Thank you.

Aditya Joshi

unread,
Feb 26, 2020, 10:27:20 AM2/26/20
to Selenium Users
Hi all,

By using strace and regenerating audit logs, I was able to find an odd cron job that was silently terminating the chrome container. So problem solved and the lesson is to create cron jobs carefully.

Thanks
Reply all
Reply to author
Forward
0 new messages