【问题标题】:Laravel Dusk on Centos: Failed connect to localhost:9515; Connection refusedCentos 上的 Laravel Dusk:连接到 localhost:9515 失败;拒绝连接
【发布时间】:2017-09-08 08:31:01
【问题描述】:

好的,今天就是这一天。我终于(再次)开始使用 TDD。

我注意到这个叫做黄昏的东西出现了。太好了,浏览器测试。

唯一的问题是我得到了这个:

连接到 localhost:9515 失败;连接被拒绝

我对 chromedriver 文件执行了 chmod 777,但仍然出现错误。

我的开发服务器是一个 Centos 虚拟机。是这个问题吗?

编辑:

我认为我正在取得一些进展:

yum install GConf2

现在我得到: cannot find Chrome binary

编辑

我现在回来了。

php工匠黄昏给了我:

Facebook\WebDriver\Exception\UnknownServerException: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 3.10.0-327.3.1.el7.x86_64 x86_64)

如果我这样做:

./vendor/laravel/dusk/bin/chromedriver-linux

我明白了:

Starting ChromeDriver 2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f) on port 9515
Only local connections are allowed.

有什么想法吗?

米克

【问题讨论】:

    标签: laravel centos tdd selenium-chromedriver laravel-dusk


    【解决方案1】:

    尝试运行:./vendor/laravel/dusk/bin/chrome-linux

    如果您看到: Starting ChromeDriver 2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f) on port 9515 (or whatever port you are using) Only local connections are allowed. 然后它正在工作。我还必须安装 google-chrome 二进制文件: How to install 64-bit Google Chrome on 64-bit RHEL/CentOS 7

    另一个要安装的是 Xvfb。然后你可以在一个新的终端中运行这个命令:Xvfb :0 -screen 0 1280x960x24 &

    这应该是运行它的方式。然而,我无法让它发挥作用。我希望有人也可以在这里添加一些输入。

    更新: 我让他工作。确保没有以 root 身份运行。

    【讨论】:

    • 在 Laravel 5.7+ 中使用 ./vendor/laravel/dusk/bin/chromedriver-linux
    猜你喜欢
    • 2019-10-11
    • 2017-06-21
    • 2020-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-21
    • 1970-01-01
    • 2021-04-10
    相关资源
    最近更新 更多