在服务器上运行计量器时,我们会收到:
Failed to start gauge API: Timed out connecting to 127.0.0.1:46025服务器在/etc/host中有本地主机127.0.0.1
我尝试使用nc在同一个端口表中启动一个虚拟侦听器失败,并且我能够告诉它。
例如,如果我启动这样的netcat侦听器:
nc -l -p 46025和telnet从同一个服务器进入到它:
telnet 127.0.0.1 46025
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
sdlfkhsldfkj我能够看到在侦听器中出现的键:
nc -l -p 46025
sdlfkhsldfkj
^C这里有什么问题吗?如何排除更多故障?谢谢!
下面是错误日志(在Jenkins管道中运行):
13:28:53 + gauge run --tags 1234 specs
13:29:25 Error ----------------------------------
13:29:25
13:29:25 Failed to start gauge API: Timed out connecting to 127.0.0.1:36192
13:29:25
13:29:25 Get Support ----------------------------
13:29:25 Docs: https://docs.gauge.org
13:29:25 Bugs: https://github.com/getgauge/gauge/issues
13:29:25 Chat: https://gitter.im/getgauge/chat
13:29:25
13:29:25 Your Environment Information -----------
13:29:25 linux, 1.0.5, 562f036
13:29:25 html-report (4.0.8), python (0.3.5), screenshot (0.0.1), xml-report (0.2.1)发布于 2019-09-19 06:43:46
原因:
当您的量规运行程序(套接字客户端)无法在超时期间连接到您的量规(套接字服务器)时,会发生以下错误Failed to start gauge API: Timed out connecting to 127.0.0.1:{port_no}。默认的量规超时时间是25秒。TCP创建两种类型的套接字服务器(GRPC或TCP)。
可能的原因:
解决方案:
gauge run {specs_dir}/{specs_fileName}指定。gauge config runner_connection_timeout {timeInMillisecs}和gauge config runner_request_timeout {timeInMillisecs}以增加超时。例:量规配置runner_connection_timeout 40000将设置超时到40秒。enable_multithreading=false。注意:如果没有设置端口,请为客户端分配一个随机的空闲端口来连接,您可以通过设置环境变量GAUGE_PORT={ portNo }和GAUGE_INTERNAL_PORT={portNo}来指定它,在这种情况下,两个portNo应该是相同的。
https://stackoverflow.com/questions/56828532
复制相似问题