douci6541 2015-06-25 20:35
浏览 151
已采纳

Selenium无法启动-Ubuntu 14

I'm attempting to run a headless (using xvfb) copy of selenium. I'm using the selenium standalone jar file to do this. I've attempted to do all of this manually and could not get the server to run. In this case, I run the following commands:

In the first terminal window: Xvfb -fp /usr/share/fonts/X11/misc/ :10 -screen 0 1024x768x16 2>&1 & export DISPLAY=:10

Once this is running without errors I open a new terminal window and run: java -jar /usr/lib/selenium/selenium-server-standalone-2.46.0.jar -port 4444

This attempts to boot up for a very, very long time and looks like: Command Output

While leaving both of these terminal windows open I attempt to connect to the selenium server on 127.0.0.1:4444 (using a golang selenium package) and I get a refused connection. From this I attempted to utilize a package called 'selenium-standalone' that I found in the npm repository. I've installed that per instructions here. I then attempted to run the server with: xvfb-run --server-args="-screen 0, 1366x768x24" selenium-standalone start -- -debug

Doing so gives me a more detailed output, but no resolution. I'm still getting refused connections. The output from the terminal for running the xvfb-run in combo with selenium-standalone is as follows (well, at least the tail end of it): Output from selenium-standalone

Any insight in how I could/should move forward with troubleshooting this would be greatly appreciated.

p.s. I have confirmed that the golang app and the selenium wrapper I'm using in my golang app are both working and can connect to a working selenium server. At one point it was running and everything was fine- no go code has changed and I just can't get this selenium server to start reliably.

  • 写回答

2条回答 默认 最新

  • dtdsbakn210537 2015-06-26 00:31
    关注

    I ran selenium headless following this guide and it ran flawlessly. If you try it, I would recommend removing selenium and and all associated files, and starting again from scratch. Good luck.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 计算二重积分∫∫e^(x+y)dxdy,其中0≤x≤1,0≤y≤1,试分别用复合辛普森公式(取n=4)以及高斯求积公式(取n=4)计算积分 给出matlab程序
  • ¥15 opencv 无法读取视频
  • ¥15 用matlab 实现通信仿真
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了
  • ¥15 python:excel数据写入多个对应word文档
  • ¥60 全一数分解素因子和素数循环节位数
  • ¥15 ffmpeg如何安装到虚拟环境
  • ¥188 寻找能做王者评分提取的