Java 45000 毫秒后无法在端口 7055 上连接到主机 127.0.0.1。使用 FF 26.0 版和 selenium 独立 jar 2.39
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25300690/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. with FF version 26.0 and selenium standalone jar 2.39
提问by AngryJS
I am trying to connect to selenium 2.30 with FF version 26.0 installed in my AWS unix machine but I am getting below error when I start both my client which access selenium.
我正在尝试使用安装在我的 AWS unix 机器上的 FF 版本 26.0 连接到 selenium 2.30,但是当我启动访问 selenium 的客户端时出现以下错误。
Also, when I try the same with selenium standalone jar 2.38.0, it works fine but suddenely after some time in a day or two, it starts giving below error with 2.38.0 as well. Not sure why this is happening? Any idea??
此外,当我尝试使用 selenium 独立 jar 2.38.0 进行相同操作时,它工作正常,但在一两天后突然出现,它也开始在 2.38.0 中出现以下错误。不知道为什么会这样?任何的想法??
project is I have a multithreadin app wherein client keeps executing some threads which pings some URLS and all, it keeps on happening unless some issue like below occurs.
项目是我有一个多线程应用程序,其中客户端不断执行一些线程来 ping 一些 URLS 等等,除非发生如下问题,否则它会一直发生。
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
Error: no display specified
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.4.76-65.111.amzn1.x86_64', java.version: '1.7.0_51'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:197)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
回答by Shubham Jain
Update your selenium jars. The new version of firefox(Or different browser) is not supporting old jars of selenium.
更新你的硒罐。新版本的 firefox(或不同的浏览器)不支持旧的 selenium jars。
Download both Selenium Server (formerly the Selenium RC Server) Selenium Client & WebDriver Language Bindings
下载 Selenium Server(以前称为 Selenium RC Server)Selenium Client & WebDriver Language Bindings
Replace them with old jars you are using. Update your mozilla also so you can get the updated results
用您正在使用的旧罐子替换它们。也更新您的 mozilla,以便您可以获得更新的结果
source :- http://docs.seleniumhq.org/download/
回答by Andrew
It looks like you have two different errors going on:
看起来你有两个不同的错误:
Unable to connect to host 127.0.0.1 on port 7055
Error: no display specified
Unable to connect to host 127.0.0.1 on port 7055
Error: no display specified
The reason for the Unable to connect
error is that the version of Selenium Server does not know how to work with the newer version of Firefox. You need to download a newer version of the Selenium Server that supports the newer version of Firefox.
Unable to connect
错误的原因是Selenium Server的版本不知道如何使用较新版本的Firefox。您需要下载支持较新版本 Firefox 的较新版本 Selenium Server。
The reason for the Error: no display specified
error is that Firefox is being launched, but there is no X server (GUI) running on the remote host. You can use X11 forwarding to run Firefox on the remote host, but display it on your local host. On Mac OS X, you will need to download XQuartzin order to use X11 forwarding.
Error: no display specified
错误的原因是Firefox正在启动,但远程主机上没有运行X服务器(GUI)。您可以使用 X11 转发在远程主机上运行 Firefox,但在您的本地主机上显示它。在 Mac OS X 上,您需要下载XQuartz才能使用 X11 转发。
回答by Mayur Shah
Can you try upgrading your firefox and give it a try.
您可以尝试升级您的firefox并尝试一下。
Your firefox should be latest and selenium version should be 2.44. Let us know how it works
您的 firefox 应该是最新的,而 selenium 版本应该是 2.44。让我们知道它是如何工作的
回答by sagar chapagain
This is browser compatibility issue. I was finally successful after 3 days of full try. I first tried latest version of selenium server , firefox browser and latest webdriver , But I got the same error. I finally successed after downgrading my firefox from 50.0 t0 34.0 with latest php webdriverv.(0.9.1) by Lukasz Kolczynski and selenium server 2.45.0. Please check browser compatibiliy with selenium server from hereand workout similarly.
这是浏览器兼容性问题。经过3天的全面尝试,我终于成功了。我首先尝试了最新版本的 selenium 服务器、firefox 浏览器和最新的 webdriver,但我遇到了同样的错误。在使用Lukasz Kolczynski 的最新 php webdriverv.(0.9.1) 和selenium server 2.45.0将我的 firefox 从 50.0 t0 34.0 降级后,我终于成功了。请从这里检查浏览器与硒服务器的兼容性, 并进行类似的锻炼。
回答by Yang
I resolved the issue with Only
我用 Only 解决了这个问题
export DISPLAY=IP:DisplayNum
or export DISPLAY=:DisplayNum
for localhost; So that can vnc connect and see the vnc desktop :1 if $DISPLAY
is not :1.
export DISPLAY=IP:DisplayNum
或export DISPLAY=:DisplayNum
本地主机;这样就可以 vnc 连接并查看 vnc 桌面:1 如果$DISPLAY
不是:1。
export DISPLAY=:1