How to run selenium in digitalocean?

July 2, 2017 4.7k views
Node.js Ubuntu 16.04

I’m now trying to run node app.
My app running with selenium webdriver(chrome).
I made droplet (ubuntu 16.04, nodejs 6.11, 512M RAM, 20G HDD).
but when I start the app, an error occured and selenium not run.
error log is like below.

Error: Server terminated early with status 127
at Error (native)
at earlyTermination.catch.e (/home/master/Project/react-jobscrapper/nodemodules/selenium-webdriver/remote/index.js:252:52)
at process.
tickDomainCallback (internal/process/nexttick.js:135:7)
From: Task: WebDriver.createSession()
at Function.createSession (/home/master/Project/react-jobscrapper/node
at Function.createSession (/home/master/Project/react-jobscrapper/nodemodules/selenium-webdriver/chrome.js:719:29)
at createDriver (/home/master/Project/react-jobscrapper/node
at (/home/master/Project/react-jobscrapper/nodemodules/selenium-webdriver/index.js:639:16)
at kakaoCrawler.executeCrawling (/home/master/Project/react-jobscrapper/server/crawler/kakaoCrawler.js:108:11)
at /home/master/Project/react-jobscrapper/server/crawler/kakaoCrawler.js:32:10
at Array.forEach (native)
at /home/master/Project/react-jobscrapper/server/crawler/kakaoCrawler.js:31:15
at process.
tickDomainCallback (internal/process/nexttick.js:135:7)
at Function.Module.runMain (module.js:606:11)
at Object.<anonymous> (/home/master/Project/react-jobscrapper/node
at Module.
compile (module.js:570:32)
at Object.Module.extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module.
load (module.js:438:3)

I setted selenium headless option(‘headless’, 'disable-gpu’) but selenium doesn’t run.
somebody help me…

3 Answers

I can help you get further, but then you will have an issue with chromedriver hanging… hope this helps, maybe you can solve my issue? :)

  1. Create your droplet - I chose the $5 a month, Ubuntu 16.04.2 x64
  2. Login and update

    apt-get update

  3. Apparently DO droplets lack entropy, so install this for lots of delicious entropy
    apt-get install haveged
    and then start it
    /etc/init.d/haveged start

  4. install unzip

    apt-get install unzip

  5. Now follow this guide.

  • I have no experience with Linux or Droplets, and would like you to help me with this installation of Selenium and configuration. We will combine a price and I’ll pay for this service of yours. I’m waiting. Tks

    • Sorry, but with the greatest of respect, this stuff is a headache and you couldn’t pay me enough to get it working for you. Best of luck though…

    • if you want to simply discuss it though, you can reach me on hscbaj AT

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!