Chuchoo Chuchoo - 21 days ago 7
Linux Question

jenkins - phantomJS functional tests failing

I have downloaded latest version of below phantomJS driver for headless testing of my selenium functional tests in Jenkins CI.

phantomjs-2.1.1-linux-x86_64/bin/phantomjs


I get the below error message in Jenkins console log. Any idea what might be going on? I am suspecting something related to the version incompatibility but am not quite sure.

Running TestSuite
Nov 13, 2016 9:25:28 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
Nov 13, 2016 9:25:28 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: port: 19175
Nov 13, 2016 9:25:28 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: arguments: [--webdriver=19175, --webdriver-logfile=/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/phantomjsdriver.log]
Nov 13, 2016 9:25:28 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: environment: {}
/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libz.so.1: no version information available (required by /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.10' not found (required by /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
/softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /softwares/build.tool/.jenkins/jobs/SELENIUM_UI/workspace/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
Nov 13, 2016 9:25:49 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Tests run: 7, Failures: 1, Errors: 0, Skipped: 6, Time elapsed: 22.943 sec <<< FAILURE! - in TestSuite
pageSetup(com.visualiq.automation.selfservice.ClientSetupTest) Time elapsed: 22.748 sec <<< FAILURE!
org.openqa.selenium.WebDriverException:
Timed out waiting for driver server to start.
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'hnet11234.inetservices.com', ip: '10.300.14.86', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.18-371.1.2.el5', java.version: '1.8.0_101'
Driver info: driver.version: PhantomJSDriver

Answer

All, I am able to solve the issue by using phantomJS version 1.9.8 instead of version 2.1.1. The latest version 2.1.1 has some compatibility issues with the version of Red Hat Linux my Jenkins is running on.

Jenkins Box:
Linux inet11086.inetservices.com 2.6.18-371.1.2.el5 #1 SMP Mon Oct 7 16:34:35 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
LSB Version:          :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID:      RedHatEnterpriseServer

Another option to go with was to update libraries in Red Hat box but I went with using downgraded version of phantomJS. Please let me know if you need more info on this!