-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xvfb is frozen #47
Comments
Does it work with a different screen number, such as |
I'll need to check it when I run into this problem again. |
It didn't.
|
have same problem. any ideas? |
Did you found any solution? |
I have found solution. in my case I was lunching multiple instances of browser in single display of Xvbf. my solution is running Xvfb display per browser instance and it solved my problem |
My solution is to run those three commands on first post whenever this happens. =/ |
Thank you @ajahongir . Seems like I have the same issue. |
Hello, I have same issue: I start headless via the following command: Why does it get frozen sometimes? Please advise. Thanks, |
@WebmasterA I think when you start a |
@WebmasterA In my case I didn't close the browser instance and tried to open new one. Also I recommend to recreate headless when you're closing the browser to ensure there are no unclosed browser instances. |
@yuri-karpovich I prefer to close browser instance every time because it may cause to memory leak on server and not close headless. |
Thanks for the quick reply guys. I do close the browser every time. I open the browser with: client = Selenium::WebDriver::Remote::Http::Default.new At the end of the script I close it with: b.close If my script fails I rescue and close with: |
@ajahongir This script will eventually need to handle 100+ automations. Therefore I cannot assign an open port to each one of them and keep them opened. That is why I: Am not properly understand how this logic suppose to work? Thanks, |
@ajahongir yes, I mean the same - of course I close browser. Also I close destroy headless when it acceptable. |
Here is a question for you guys: I do not do headless.destroy Do I need to do headless.destroy? Here is a little note about my script: Thanks, |
Unfortunately I'm not a pro with headless. The only idea I have that parallel scripts are trying to use the same session. Rubydoc says: Cucumber with wkhtmltopdf When wkhtmltopdf is using Headless, and cucumber is invoking a block of code which uses a headless session, make sure to override the default display of cucumber to retain browser focus. Assuming wkhtmltopdf is using the default display of 99, make sure to set the display to a value != 99 in features/support/env.rb file. This may be the cause of Connection refused - connect(2) (Errno::ECONNREFUSED). headless = Headless.new(:display => '100') |
if you use I prefer to do this: client = Selenium::WebDriver::Remote::Http::Default.new
driver = Selenium::WebDriver.for :chrome, client: client
browser = Watir::Browser.new driver
system("perl dostuff.pl")
rescue
puts 'Error'
ensure
browser.close
end |
@WebmasterA did you found a solution? |
I encountered this error as a thundering-herd problem while trying to spin up a large number of Headless sessions concurrently (in different processes). The Headless sessions were timing out while trying to find a display to use - they were each starting at :99, then :100, etc., but it was taking too long for them to count up to an available display. I fixed the issue with a very simple initializer:
I am happy to put this into a pull-request if @leonid-shevtsov is amenable - it's a little more complicated than just copying the code over, as it breaks a whole bunch of tests that assume we're always looking for display :99. |
I encountered the same error and was able to reproduce it. _XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed The above Xvfb command will fail and not create the new lock file and will also skip the "Xvfb did not launch - something's wrong" exception because "unless result" will be false. So ensure_xvfb_is_running will keep on failing the xvfb_running? test because of missing lock file and at last will throw "Xvfb is frozen" after XVFB_LAUNCH_TIMEOUT Hope this might help somebody having the same scenario. |
I made some changes that should fix or at least help debug this problem. Please upgrade to headless version 2.0.0 and see if the issue persists. |
Hey @leonid-shevtsov, could you point me to the commit that solved this problem? The node version of headless is seeing the same issue (here). |
@paulkernfeld There's a node version of headless? Wow, didn't know that! Here's the commit - IIRC the change was to start Xvfb with Process.spawn 2886098 |
When I've got this error, my issue was that I was logging in through a Putty session that had X11 forwarding enabled. When I changed this setting, I could successfully start the Xvfb server. |
Sometimes I receive this message when running
rspec
. And the only fix is to restart the computer.I don't know the root cause yet, but running the Xvfb command headless runs without redirection, I get the following error:
The manual solution is to run the following:
The text was updated successfully, but these errors were encountered: