![](/img/trans.png)
[英]Connection Refused : Failed to connect to 127.0.0.1 port 4444: Connection refused laravel dusk with selenium and laradock
[英]how i can fix Failed to connect and Connection refused in laradock selenium
使用 Lara Dock 配置服务器
您可以在浏览器中访问 localhost:4444 / wd / hub。
但是当我运行测试代码时,出现以下错误
[2019-11-13 18:53:22] local.ERROR: Curl error thrown for http POST to /session with params:
{"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":
{"w3c":false,"binary":"","args":["--user-agent=Mozilla\/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/75.0.3770.80 Safari\/537.36","disable-
gpu","lang=ko_KR","disable-infobars","start-maximized"]}}}
Failed to connect to localhost:port 4444: Connection refused {"exception":"[object]
(Facebook\\WebDriver\\Exception\\WebDriverCurlException(code: 0): Curl error thrown for http POST to
/session with params: {\"desiredCapabilities\":
{\"browserName\":\"chrome\",\"platform\":\"ANY\",\"chromeOptions\":
{\"w3c\":false,\"binary\":\"\",\"args\":[\"--user-agent=Mozilla\\/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/75.0.3770.80 Safari\\/537.36\",\"disable-
gpu\",\"lang=ko_KR\",\"disable-infobars\",\"start-maximized\"]}}}
Failed to connect to ohmanager.kr port 4444: Connection refused at
/var/www/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:297)
我试过127.0.0.1、localhost、selenium、laradock_selenium_1 mydomain等,但没有成功
Docker IP 尝试http://10.0.75.1:4444/wd/hub给我以下错误
Curl error thrown for http POST to /session with params:
{"desiredCapabilities":
{"browserName":"chrome","platform":"ANY","chromeOptions":
{"w3c":false,"binary":"","args":["disable-gpu","lang=ko-KR","disable-
infobars=true","start-maximized"]}}} Connection timed out after 7001
milliseconds
为什么我会收到此错误?
我觉得楼主错了,但我不知道有什么奇怪的
我尝试使用 laradock_selenium_1 更改主机,但仍然出现错误
有没有我没做的设置??
将 ChromeDriver 和 Selenium 更新到最新版本: https://www.seleniumhq.org/download/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.