I have an ubuntu server having the UI as well. U can execute the test cases by firing mvn test command. But the problem is when I do ssh of the machine through the terminal from another machine I get the following error-
unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.4.0-121-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.04 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'ubuntu-test', ip: 'X.X.X.X', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-121-generic', java.version: '1.8.0_171'
Driver info: driver.version: ChromeDriver
but the same command starts chrome successfully if I take remote of the machine through remmina and then execute the same command of this machines terminal.
Try this method to instantiate chrome web driver could help you to overcome this issue in ubuntu :
Thanks to @George Pantazes for his comment for the answer