gpt4 book ai didi

linux - 在 Linux 上运行 node.js 时如何解决 "Server terminated early with status 127"?

转载 作者:IT老高 更新时间:2023-10-28 23:01:49 40 4
gpt4 key购买 nike

我在这个版本的 Linux 上使用 Node 5.10.0

[davea@mydevbox mydir]$ uname -a
Linux mydevbox.mydomain.com 7.3.8-25.26.amzn1.x86_64 #1 SMP Wed Mar 16 17:15:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

我在运行脚本时遇到以下错误(“服务器提前终止,状态为 127”)。我已经验证我可以使用“wget”访问相关的 URL,所以我不知道我还需要什么才能让这个东西正常工作……

[davea@mydevbox mydir]$ node myscript.js 
Validation Complete
/home/davea/node_modules/selenium-webdriver/lib/promise.js:654
throw error;
^

Error: Server terminated early with status 127
at Error (native)
at /home/davea/node_modules/selenium-webdriver/remote/index.js:242:20
at ManagedPromise.invokeCallback_ (/home/davea/node_modules/selenium-webdriver/lib/promise.js:1343:14)
at TaskQueue.execute_ (/home/davea/node_modules/selenium-webdriver/lib/promise.js:2868:14)
at TaskQueue.executeNext_ (/home/davea/node_modules/selenium-webdriver/lib/promise.js:2851:21)
at /home/davea/node_modules/selenium-webdriver/lib/promise.js:2730:27
at /home/davea/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at acquireSession (/home/davea/node_modules/selenium-webdriver/lib/webdriver.js:107:22)
at Function.createSession (/home/davea/node_modules/selenium-webdriver/lib/webdriver.js:337:12)
at Driver (/home/davea/node_modules/selenium-webdriver/chrome.js:778:38)
at Builder.build (/home/davea/node_modules/selenium-webdriver/builder.js:464:16)
at Object.<anonymous> (/home/davea/mydir/js/Optimus.js:14:4)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
From: Task: WebDriver.navigate().to(http://localhost:8081/myproject)
at Driver.schedule (/home/davea/node_modules/selenium-webdriver/lib/webdriver.js:386:17)
at Navigation.to (/home/davea/node_modules/selenium-webdriver/lib/webdriver.js:1029:25)
at Driver.get (/home/davea/node_modules/selenium-webdriver/lib/webdriver.js:797:28)
at Object.exports.Login.Page (/home/davea/mydir/js/Optimus.js:505:16)
at Object.exports.smokeTest (/home/davea/mydir/js/Optimus.js:2442:19)
at Object.<anonymous> (/home/davea/mydir/SkyNet.js:13:6)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)

最佳答案

就我而言,我缺少 Java 运行时环境 (JRE)。我在基于 Debian 的 docker 镜像中使用 Selenium 运行 e2e 测试,因此 apt-get install default-jre 为我解决了问题。遗憾的是 selenium 在这种情况下没有给出更有用的错误信息。

关于linux - 在 Linux 上运行 node.js 时如何解决 "Server terminated early with status 127"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36429436/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com