-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Sitespeed.io Job hangs in ubuntu CI #343
Comments
Hi @avellayappan ! yes probably, can you login to the ci box and access the url via curl or wget just to see what happens? Best |
Curl and wget to the URL that I used is successful when I logged in as me as well as when I sudo to Jenkins user. Is there anything that I can check for debugging the hanging issue? From: Peter Hedenskog [mailto:notifications@github.com] Hi @avellayappanhttps://github.com/avellayappan ! yes probably, can you login to the ci box and access the url via curl or wget just to see what happens? Best — |
I will test on Ubuntu tonight (but it is early morning now CET so it will take a while). If you have time, you can test a couple of things: run this in the sitespeed home folder on the server: just to test that phantomjs can fetch your site. then if you could reconfigure sitespeed and add the parameter one last thing, in the result dir of your test, check for the data folder, in that folder there can be a couple of error log files, if you find any, please send them to me: thanks!!!!! |
Please find my comments inline for your questions. What’s interesting is, sitespeed.io works fine when I run it as sudoed Jenkins user by logging into the box using putty – in the same folder path. However, the CI job that runs the same command is hanging. So, I think the problem might be with using sitespeed.io Jenkins plugin or the setup that I have in Ubuntu CI: [cid:image001.png@01CF0D90.DB6F9B50] From: Peter Hedenskog [mailto:notifications@github.com] I will test on Ubuntu tonight (but it is early morning now CET so it will take a while). If you have time, you can test a couple of things: run this in the sitespeed home folder on the server: [avellayappan]: Looks good to me. Here is the output: avellayappan@phx5qa01c-6bc5:/var/lib/jenkins/sitespeed.io-2.4$ phantomjs dependencies/yslow-3.1.5-sitespeed.js http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40 [1] 7058 [2] 7059 [3] 7060 just to test that phantomjs can fetch your site. then if you could reconfigure sitespeed and add the parameter -m 128, that is the heap size, that is quite high by default. just add it after the rest of the parameters and run again. [avellayappan]: no luck with CI job – it is still hanging with –m 128 parameter. one last thing, in the result dir of your test, check for the data folder, in that folder there can be a couple of error log files, if you find any, please send them to me: [avellayappan] I saw only one phantomjs.error.log file created, but it doesn’t have any log in it. Attaching the data folder in zip format to see if it helps. peter AT soulgalore.com thanks!!!!! — |
Hi again, installed Ubuntu and I get the same problem, when I do a quick debug it stops at the phantomjs step (but it works when I run it manually), I think you are right the rights, will get back later tonight when I (hopefully) have solved it. One thing just FYI, when you run phantomjs with a URL containing & signs you need to put to write it like "URL" else Linux will start multiple processes. |
Ok, the problem is that the Jenkins user doesn't have rights to the homefolder of sitespeed and the script tries to put the HAR file there, I will change that tonight. If you want it working ASAP you can CHMOD the home folder of sitespeed.io (with write rights for everyone). |
I've put a fix to the master branch, if you could checkout that it would be great and get back to me if it works or not, I will build a fix release later tonight. |
released 2.4.1 now, I will close the issue, but please get back that you really got it working :) |
I am trying it out now, got the following permission denied error – trying out a few things, will send more details in the next hour. [EnvInject] - Preparing an environment for the build. From: Peter Hedenskog [mailto:notifications@github.com] released 2.4.1 now, I will close the issue, but please get back that you really got it working :) — |
Hi again, try to download the 2.4.1 release and unpack it: I've done that on my Ubuntu box and then it works with no other fixes, cross my fingers that it do the same for you! |
I still get permission denied error with 2.4.1 release. I am going to try to run it as a Jenkins user now. Here is the console output: [EnvInject] - Preparing an environment for the build. From: Peter Hedenskog [mailto:notifications@github.com] Hi again, try to download the 2.4.1 release and unpack it: I've done that on my Ubuntu box and then it works with no other fixes, cross my fingers that it do the same for you! — |
Hi again, bad practice but try just to change the permission of your sitespeed homefolder and the folders beneath:
just to come to next level or better, change the owner of the sitespeed directory to the jenkins user with |
Modified the permissions. Job is running now, will keep you posted. From: Peter Hedenskog [mailto:notifications@github.com] Hi again, bad practice but try just to change the permission of your sitespeed homefolder and the folders beneath:
|
Looks like the run is successful now. I will take a look at installing xsltproc. Can you please help check to see how I can have it working without chmod? Started by user anonymoushttp://phx5qa01c-6bc5.stratus.phx.qa.ebay.com/user/null Thanks! From: Peter Hedenskog [mailto:notifications@github.com] Hi again, bad practice but try just to change the permission of your sitespeed homefolder and the folders beneath:
|
Ah good. Yes the best way is to set that your user that runs Jenkins (or run the job in Jenkins), also owns the sitespeed folder (with chown). Best |
Thanks Peter! Any pointers on using “-c true” parameter in Ubuntu to get timings? I looked up your documentation on starting xvfb:
When I run the second command, I get the following: Looks like xvfb is installed, as when I try to install, output mentions that xvfb is already installed From: Peter Hedenskog [mailto:notifications@github.com] Ah good. Yes the best way is to set that your user that runs Jenkins (or run the job in Jenkins), also owns the sitespeed folder (with chown). Best — |
Ok, I am using the xvfb Jenkins plugin to start and stop before and after executing sitespeed.io. What is the parameter that I need to use for sitespeed.io to use xvfb instead of the default firefox? Here is the console output for your reference: [EnvInject] - Preparing an environment for the build.
1 error Thanks! From: Vellayappan, Anna Thanks Peter! Any pointers on using “-c true” parameter in Ubuntu to get timings? I looked up your documentation on starting xvfb:
When I run the second command, I get the following: Looks like xvfb is installed, as when I try to install, output mentions that xvfb is already installed From: Peter Hedenskog [mailto:notifications@github.com] Ah good. Yes the best way is to set that your user that runs Jenkins (or run the job in Jenkins), also owns the sitespeed folder (with chown). Best — |
Hi Anna, yes the timings is good (use firefox) just make sure you hit the same URL many times, think the recommendation from Google is like 30 times if you do syntetic testing, but start with a couple. About xvbf, I think the error you get is because it is installed in another path, check where it is and change how you start it. Best |
I have three questions
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host localhost on port 7055 after 45000 ms. Firefox console output: Firefox version that I have in Ubuntu is 11. How can I check the selenium version used?
Full console output with xvfb plugin and sitespeed.io trying out firefox: [EnvInject] - Preparing an environment for the build. Building in workspace /var/lib/jenkins/jobs/SiteSpeedTest/workspace Xvfb starting$ Xvfb :2 -screen 0 1024x768x24 -fbdir /var/lib/jenkins/2014-01-10_20-13-006132746800657369539xvfb Will fetch urls from the file /var/lib/jenkins/urls.txt with User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36 and viewport 1280x800 using ruleset sitespeed.io-desktop ... this can take a while Using sitespeed.io version 2.4.1 Using PhantomJS version 1.9.2 Using Java version 1.6.0 Using BrowserTime version 0.5 From IP unknown Will analyze 1 pages Collecting Browser Time metrics: http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40 org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host localhost on port 7055 after 45000 ms. Firefox console output: Error: no display specified Error: no display specified
Exception in thread "main" com.google.inject.ProvisionException: Guice provision errors:
Error: no display specified Error: no display specified Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'phx5qa01c-6bc5.stratus.phx.qa.ebay.com', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-24-generic', java.version: '1.6.0' Driver info: driver.version: FirefoxDriver at net.browsertime.tool.guice.FireFoxModule.configure(FireFoxModule.java:42) while locating org.openqa.selenium.WebDriver 1 error
Caused by: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: Error: no display specified Error: no display specified Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'phx5qa01c-6bc5.stratus.phx.qa.ebay.com', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-24-generic', java.version: '1.6.0' Driver info: driver.version: FirefoxDriver
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host localhost on port 7055 after 45000 ms. Firefox console output: Error: no display specified Error: no display specified
Create all the result pages Create result.xml Create the summary.xml Create the summary.details.html Create the pages.html Create the summary index.html Create the assets.html Create the rules.html Finished analyzing Will copy files to /var/lib/jenkins/jobs/SiteSpeedTest/workspace Xvfb stopping Finished: SUCCESS From: Peter Hedenskog [mailto:notifications@github.com] Hi Anna, yes the timings is good (use firefox) just make sure you hit the same URL many times, think the recommendation from Google is like 30 times if you do syntetic testing, but start with a couple. About xvbf, I think the error you get is because it is installed in another path, check where it is and change how you start it. Best — |
Hi again, And then start / stop before running the test. However, to be able to start Xvfb you need to be root or change permission in the lib right? And that will be a little dirty. I tested in my terminal (using Ubuntu) just to see if it works: Xvfb :99 -ac 2>/dev/null & export DISPLAY=:99 and then run sitespeed.io, then the timings where fetched and it worked fine. However, getting it to work cleanly in Jenkins, I think the Jenkins plugin Xvfb plugin is better and will be easiest: I change the documentation tonight. However, I've not got it to work yet (I get the No running in grid is not supported sorry. |
Pinging @tobli maybe you know or have a good idea. Short: when I run sitespeed.io/ubuntu in the terminal and startin Xvfb first, it works perfectly fine with Firefox (no display is opened, and the values are collected). When I try the same in Jenkins, I always get |
@tobli hard without seeing my setup, will test more tonight and get back |
Make sure to export the DISPLAY variable so it's defined in the shell session where sitespeed is run. |
@tobli thanks! that's the problem, if I set the DISPLAY in the sitespeed.io script it works. Need to check how it can be inherited in Jenkins. |
Hi again @avellayappan , finally it works. I had missed copy the Jenkins build environments to the runner that starts the bash script. You need to update the Jenkins plugin to the latest version: And then run Xvfb plugin in Jenkins (the default setup works fine): Best |
Thanks for the quick response. Trying it out, will keep you posted. From: Peter Hedenskog [mailto:notifications@github.com] Hi again @avellayappanhttps://github.com/avellayappan , finally it works. I had missed copy the Jenkins build environments to the runner that starts the bash script. You need to update the Jenkins plugin to the latest version: And then run Xvfb plugin in Jenkins (the default setup works fine): Best — |
Works great for me. Thanks Peter! From: Vellayappan, Anna Thanks for the quick response. Trying it out, will keep you posted. From: Peter Hedenskog [mailto:notifications@github.com] Hi again @avellayappanhttps://github.com/avellayappan , finally it works. I had missed copy the Jenkins build environments to the runner that starts the bash script. You need to update the Jenkins plugin to the latest version: And then run Xvfb plugin in Jenkins (the default setup works fine): Best — |
Hi Anna, |
Sure Peter. Have you used plot plugin? I am trying to use it with the instruction given in sitespeed.io documentation and the graph is empty. Here is my plot plugin configuration: Here is sample job run console output that shows that it is recording plot data: Started by user anonymoushttp://phx5qa01c-6bc5.stratus.phx.qa.ebay.com/user/null Empty plot created: [cid:image002.png@01CF110C.D2811B70] If you have any other suggestions for graph, please let me know. Thanks! From: Peter Hedenskog [mailto:notifications@github.com] Hi Anna, — |
Hi Anna, Well, I think the plot-plugin is quite old and needs a lot of configuration, if you want to have graphs, it is much better to use Graphite. It can be a little tricky to get Graphite up and running if you don't have it installed already, but just to try it you can use this Vagrant one: https://github.com/tstangenberg/vagrant-graphite I use it and it works out of the box. Graphite will get the data if you choose that in the plugin. The graphs is maybe not the nicest looking ones, but you can use other tools to collect the data and show them in a nicer way: |
Thanks Peter, haven’t tried graphite yet. Finally, I got plot plugin working with CI job. However, I am still figuring out how to get multiple lines to different page weights in the same graph. Adding new data series doesn’t seem to work for me. This just has only one plot for median. It looks like this: [cid:image001.png@01CF1130.A572A490] Thanks! From: Peter Hedenskog [mailto:notifications@github.com] Hi Anna, Well, I think the plot-plugin is quite old and needs a lot of configuration, if you want to have graphs, it is much better to use Graphite. It can be a little tricky to get Graphite up and running if you don't have it installed already, but just to try it you can use this Vagrant one: https://github.com/tstangenberg/vagrant-graphite I use it and it works out of the box. Graphite will get the data if you choose that in the plugin. The graphs is maybe not the nicest looking ones, but you can use other tools to collect the data and show them in a nicer way: — |
Sitespeed CI Job that I configured in ubuntu machine is hanging and here is the console output:
Started by user anonymous
[EnvInject] - Preparing an environment for the build.
Building in workspace /var/lib/jenkins/jobs/sitespeed.io/workspace
Will fetch urls from the file /var/lib/jenkins/urls.txt with User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36 and viewport 1280x800 using ruleset sitespeed.io-desktop ... this can take a while
Using sitespeed.io version 2.4
Using PhantomJS version 1.9.2
Using Java version 1.6.0
Using BrowserTime version 0.5
From IP unknown
Will analyze 1 pages
Analyzing http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40
I think this is because the CI machine is not able to connect to the URL. Am I missing anything on the browser connection?
Here are my CI settings:
Home dir of sitespeed.io: /var/lib/jenkins/sitespeed.io-2.4/
Sitespeed.io configuration: -f /var/lib/jenkins/urls.txt -d 1 -c true -n "QA Search Page"
Please let me know your inputs.
The text was updated successfully, but these errors were encountered: