ChromeDriver + CentOS 6 + Chromium not able to launch

1,846 views
Skip to first unread message

Nadia García

unread,
Sep 20, 2017, 1:57:08 PM9/20/17
to ChromeDriver Users
Hi all,

we have a CentOS machine (centos-release-6-8.el6.centos.12.3.x86_64) that will be hosting our automated tests.

Also, we created the symbolic link so /usr/bin/google-chrome points to the actual location of chromium-browser
The Chromedriver installed is latest 2.32

When running the tests, I am getting this error:

WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1

I have been googling for a while with no luck in finding out what is wrong.

Any help is highly appreciated!

John Chen

unread,
Sep 20, 2017, 2:25:09 PM9/20/17
to Nadia García, ChromeDriver Users
I'd suggest collecting verbose log from ChromeDriver, and see if there is anything interesting from the log. See http://chromedriver.chromium.org/logging about how to enable verbose logging.

--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nadia García

unread,
Sep 20, 2017, 3:09:31 PM9/20/17
to ChromeDriver Users
I tried to get the verbose logs.
In theory adding these parameters to the chrome options should do the trick:

--verbose    --log-path=chromedriver.log

But for some reason it is not logging anything. I think is related to robotframework

I will keep digging.

gmani...@google.com

unread,
Sep 20, 2017, 3:42:55 PM9/20/17
to ChromeDriver Users
There two ways to capture chromedriver verbose log:

1) 

System.setProperty("webdriver.chrome.verboseLogging", "true");

System.setProperty("webdriver.chrome.logfile", "/path/to/chromedriver.log");


2) Start chromedriver with --verbose --log-path flags in terminal

./chromedriver --verbose --log-path=/path/to/chromedriver.log

nadia....@acadaca.com

unread,
Sep 20, 2017, 3:45:17 PM9/20/17
to ChromeDriver Users
Thank you,

Since the test environment terminal is out of my reach, I am doing all through Jenkins running the tests.
I was able to get the chromedriver log in my local, where it works. But when I run the exact same in the test environment, then I don't get any log.

I wonder if it is not even starting?

Thanks

ujjawal...@gmail.com

unread,
Nov 23, 2018, 8:30:02 AM11/23/18
to ChromeDriver Users
Hello,

By anychange were you able to find a fix ? I am also facing the same issue when using in jenkins container. In my local host it works perfectly but crashing with below error when run in container:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/nose/suite.py", line 210, in run
self.setUp()
File "/usr/lib/python3.6/site-packages/nose/suite.py", line 293, in setUp
self.setupContext(ancestor)
File "/usr/lib/python3.6/site-packages/nose/suite.py", line 316, in setupContext
try_run(context, names)
File "/usr/lib/python3.6/site-packages/nose/util.py", line 471, in try_run
return func()
File "/home/ukhare/move/Scripts/move_tests_jenkins3.py", line 76, in setUpClass
cls.driver = webdriver.Chrome('/usr/bin/chromium-browser')
File "/usr/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/usr/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/chromium-browser unexpectedly exited. Status code was: 1

Alexandre Valente

unread,
Jul 23, 2021, 9:34:41 AM7/23/21
to ChromeDriver Users
Hi to all,

I know this thread is here for a while now but I got exactly same issue...

In brief, we have developed a scrapper tool and uses chromedriver which works as expected on our machines.

while putting it in a Docker container... it fails to run.

Traceback (most recent call last):
...
 in initiateBrowser
    return webdriver.Chrome( self.config['path_to_chrome_web_driver'], options=chrome_options )
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service ./chromedriver unexpectedly exited. Status code was: 127

This is the way it is installed in our container:

FROM ubuntu:20.04

WORKDIR /usr/src
COPY Scrapper/ .

ENV PATH=${PATH}:/usr/src

RUN apt-get update
RUN apt-get -y install cron
RUN apt-get -y install wget
RUN apt-get install -yqq unzip curl
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/src

RUN apt-get install -y python3
RUN apt-get install -y python3-pip
RUN pip3 install -r requirements.txt

# Setup the cron job.
COPY cronfile/scrapper.cron /etc/cron.d/scrapper.cron

# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/scrapper.cron

# Create the log file to be able to run tail
RUN touch /var/log/cron.log

# Apply cron job
RUN crontab /etc/cron.d/scrapper.cron
 
# Run the command on container startup
ENTRYPOINT ["cron", "-f"]

I assume that I take the right package: chromedriver_linux64.zip

My local machine is and I used the same command to install it locally and when starting the process it works perfectly.

$ uname -a
Linux Amundsen1 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          16
On-line CPU(s) list:             0-15
Thread(s) per core:              2
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           165
Model name:                      Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz
Reply all
Reply to author
Forward
0 new messages