我想请我在Plesk Server上尝试以下说明:
php工匠黄昏
将发生以下错误:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary" :".\/vendor\/laravel\/dusk\/bin\/chromedriver-linux","args":["--disable-gpu","--headless","--no-sandbox"," --verbose","--window-size=1024,768"]}}}
Failed connect to localhost:9515; Connection refused
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:292
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:126
/var/www/vhosts/fanswoo.com/fanswoo-framework/tests/DuskTestCase.php:43
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:192
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/framework/src/Illuminate/Support/helpers.php:754
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php: 193
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:93
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:64
/var/www/vhosts/fanswoo.com/fanswoo-framework/tests/Browser/ExampleTest.php:22
我怀疑Chrome驱动程序无法执行,因此我使用以下命令进行检测:
./ vendor / laravel / dusk / bin / chromedriver-linux
返回结果如下:
在端口9515上启动ChromeDriver 2.43.600233(523efee95e3d68b8719b3a1c83051aa63aa6b10d) 仅允许本地连接。
表示ChromeDriver可以正常打开。 该代码也可以在本地计算机上检测到。仅当在Plesk Server中执行黄昏命令时,才会发生错误。请问我应该继续做神还是要修改什么?谢谢!
服务器规格如下:
CentOS 7.5
PHP 7.1
DB SQLite3
Laravel 5.7版
ChromeDriver 69版