Skip to content
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

Closed
avellayappan opened this issue Jan 9, 2014 · 32 comments
Closed

Sitespeed.io Job hangs in ubuntu CI #343

avellayappan opened this issue Jan 9, 2014 · 32 comments

Comments

@avellayappan
Copy link

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.

@soulgalore
Copy link
Member

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
Peter

@avellayappan
Copy link
Author

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]
Sent: Thursday, January 09, 2014 3:43 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-31989538.

@soulgalore
Copy link
Member

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:
phantomjs dependencies/yslow-3.1.5-sitespeed.js http://yoururl.com

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.

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:
peter AT soulgalore.com

thanks!!!!!

@avellayappan
Copy link
Author

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]
Sent: Thursday, January 09, 2014 11:05 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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:
phantomjs dependencies/yslow-3.1.5-sitespeed.js http://yoururl.com

[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!!!!!


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32006961.

@soulgalore
Copy link
Member

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.

@soulgalore
Copy link
Member

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).

@soulgalore
Copy link
Member

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.

@soulgalore
Copy link
Member

released 2.4.1 now, I will close the issue, but please get back that you really got it working :)

@avellayappan
Copy link
Author

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.
Building in workspace /var/lib/jenkins/jobs/SiteSpeedTest/workspace
java.io.IOException: Cannot run program "bin/sitespeed.io" (in directory "/var/lib/jenkins/sitespeed.io-master/sitespeed.io-master"): java.io.IOException: error=13, Permission denied
FATAL: /var/lib/jenkins/jobs/SiteSpeedTest/workspace/6/sitespeed-result is not a directory
java.lang.IllegalArgumentExceptionhttp://stacktrace.jenkins-ci.org/search?query=java.lang.IllegalArgumentException: /var/lib/jenkins/jobs/SiteSpeedTest/workspace/6/sitespeed-result is not a directory
at io.sitespeed.jenkins.util.FileUtil.getLastModifiedFileNameInDir(FileUtil.java:77)http://stacktrace.jenkins-ci.org/search/?query=io.sitespeed.jenkins.util.FileUtil.getLastModifiedFileNameInDir&entity=method
at io.sitespeed.jenkins.SitespeedBuilder.perform(SitespeedBuilder.java:173)http://stacktrace.jenkins-ci.org/search/?query=io.sitespeed.jenkins.SitespeedBuilder.perform&entity=method
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$1.perform&entity=method
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:820)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method
at hudson.model.Build$BuildExecution.build(Build.java:199)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.build&entity=method
at hudson.model.Build$BuildExecution.doRun(Build.java:160)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.doRun&entity=method
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:599)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method
at hudson.model.Run.execute(Run.java:1567)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method
at hudson.model.ResourceController.execute(ResourceController.java:88)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method
at hudson.model.Executor.run(Executor.java:237)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Friday, January 10, 2014 12:22 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

released 2.4.1 now, I will close the issue, but please get back that you really got it working :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32062235.

@soulgalore
Copy link
Member

Hi again, try to download the 2.4.1 release and unpack it:
https://github.com/sitespeedio/sitespeed.io/releases/tag/v2.4.1

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!

@avellayappan
Copy link
Author

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.
Building in workspace /var/lib/jenkins/jobs/SiteSpeedTest/workspace
java.io.IOException: Cannot run program "bin/sitespeed.io" (in directory "/var/lib/jenkins/sitespeed.io-2.4.1"): java.io.IOException: error=13, Permission denied
FATAL: /var/lib/jenkins/jobs/SiteSpeedTest/workspace/8/sitespeed-result is not a directory
java.lang.IllegalArgumentExceptionhttp://stacktrace.jenkins-ci.org/search?query=java.lang.IllegalArgumentException: /var/lib/jenkins/jobs/SiteSpeedTest/workspace/8/sitespeed-result is not a directory
at io.sitespeed.jenkins.util.FileUtil.getLastModifiedFileNameInDir(FileUtil.java:77)http://stacktrace.jenkins-ci.org/search/?query=io.sitespeed.jenkins.util.FileUtil.getLastModifiedFileNameInDir&entity=method
at io.sitespeed.jenkins.SitespeedBuilder.perform(SitespeedBuilder.java:173)http://stacktrace.jenkins-ci.org/search/?query=io.sitespeed.jenkins.SitespeedBuilder.perform&entity=method
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$1.perform&entity=method
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:820)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method
at hudson.model.Build$BuildExecution.build(Build.java:199)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.build&entity=method
at hudson.model.Build$BuildExecution.doRun(Build.java:160)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.doRun&entity=method
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:599)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method
at hudson.model.Run.execute(Run.java:1567)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method
at hudson.model.ResourceController.execute(ResourceController.java:88)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method
at hudson.model.Executor.run(Executor.java:237)http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Friday, January 10, 2014 12:32 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

Hi again, try to download the 2.4.1 release and unpack it:
https://github.com/sitespeedio/sitespeed.io/releases/tag/v2.4.1

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!


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32063122.

@soulgalore
Copy link
Member

Hi again, bad practice but try just to change the permission of your sitespeed homefolder and the folders beneath:

chmod 777 -R dirname

just to come to next level or better, change the owner of the sitespeed directory to the jenkins user with chown.

@avellayappan
Copy link
Author

Modified the permissions. Job is running now, will keep you posted.

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Friday, January 10, 2014 12:53 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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.

—
Reply to this email directly or view it on GitHubhttps://github.com/sitespeedio/sitespeed.io/issues/343#issuecomment-32064887.

@avellayappan
Copy link
Author

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
[EnvInject] - Preparing an environment for the build.
Building in workspace /var/lib/jenkins/jobs/SiteSpeedTest/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.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
Analyzing http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40
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
Missing xsltproc, please install it to be able to run sitespeed-junit.io
Build step 'sitespeed.io' marked build as failure
Finished: FAILURE

Thanks!
Anna

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Friday, January 10, 2014 12:53 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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.

—
Reply to this email directly or view it on GitHubhttps://github.com/sitespeedio/sitespeed.io/issues/343#issuecomment-32064887.

@soulgalore
Copy link
Member

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
Peter

@avellayappan
Copy link
Author

Thanks Peter! Any pointers on using “-c true” parameter in Ubuntu to get timings?

I looked up your documentation on starting xvfb:

  • export DISPLAY=:99.0
  • sh -e /etc/init.d/xvfb start

When I run the second command, I get the following:
avellayappan@phx5qa01c-6bc5:~$ sh -e /etc/init.d/xvfb start
sh: 0: Can't open /etc/init.d/xvfb

Looks like xvfb is installed, as when I try to install, output mentions that xvfb is already installed
avellayappan@phx5qa01c-6bc5:~$ sudo apt-get install xvfb
Reading package lists... Done
Building dependency tree
Reading state information... Done
xvfb is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Friday, January 10, 2014 2:05 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32071133.

@avellayappan
Copy link
Author

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.
Building in workspace /var/lib/jenkins/jobs/SiteSpeedTest/workspace
Xvfb starting$ Xvfb :2 -screen 0 1024x768x24 -fbdir /var/lib/jenkins/2014-01-10_18-53-268730205295428999494xvfb
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
Analyzing http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40
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
Exception in thread "main" com.google.inject.ProvisionException: Guice provision errors:

  1. Error in custom provider, org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: LINUX
    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: unknown
    at net.browsertime.tool.guice.FireFoxModule.configure(FireFoxModule.java:42)
    while locating org.openqa.selenium.WebDriver

1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at net.browsertime.tool.timingrunner.SeleniumTimingRunner.run(SeleniumTimingRunner.java:70)
at net.browsertime.tool.run.Main.run(Main.java:98)
at net.browsertime.tool.run.Main.handleCommandLine(Main.java:68)
at net.browsertime.tool.run.Main.main(Main.java:47)
Caused by: org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: LINUX
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: unknown
at org.openqa.selenium.firefox.internal.Executable.(Executable.java:72)
at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:59)
at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:55)
at net.browsertime.tool.webdriver.FirefoxDriverProvider.createBinary(FirefoxDriverProvider.java:24)
at net.browsertime.tool.webdriver.FirefoxDriverProvider.get(FirefoxDriverProvider.java:20)
at net.browsertime.tool.webdriver.FirefoxDriverProvider.get(FirefoxDriverProvider.java:12)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
... 4 more
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

Thanks!
Anna

From: Vellayappan, Anna
Sent: Friday, January 10, 2014 5:42 PM
To: 'sitespeedio/sitespeed.io'; sitespeedio/sitespeed.io
Subject: RE: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

Thanks Peter! Any pointers on using “-c true” parameter in Ubuntu to get timings?

I looked up your documentation on starting xvfb:

  • export DISPLAY=:99.0
  • sh -e /etc/init.d/xvfb start

When I run the second command, I get the following:
avellayappan@phx5qa01c-6bc5:~$ sh -e /etc/init.d/xvfb start
sh: 0: Can't open /etc/init.d/xvfb

Looks like xvfb is installed, as when I try to install, output mentions that xvfb is already installed
avellayappan@phx5qa01c-6bc5:~$ sudo apt-get install xvfb
Reading package lists... Done
Building dependency tree
Reading state information... Done
xvfb is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Friday, January 10, 2014 2:05 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32071133.

@soulgalore
Copy link
Member

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
Peter

@avellayappan
Copy link
Author

I have three questions

  1.   I am able to start xvfb with the Jenkins plugin.  But, browsertime is not using xvfb and looks up the default firefox browser.  What is the parameter value for –b, if we have to xvfb.
    
  2.   Have you tried firefox in Ubuntu?  I get the following error and I looked up this error – solution is selenium incompatibility with firefox.
    

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

Firefox version that I have in Ubuntu is 11. How can I check the selenium version used?

  1.   Can I use a remote selenium grid for browsertime?
    

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

Analyzing http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40

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

     at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:108)

     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:195)

     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)

     at net.browsertime.tool.webdriver.FirefoxDriverProvider.get(FirefoxDriverProvider.java:20)

     at net.browsertime.tool.webdriver.FirefoxDriverProvider.get(FirefoxDriverProvider.java:12)

     at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)

     at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)

     at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)

     at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

     at net.browsertime.tool.timingrunner.SeleniumTimingRunner.run(SeleniumTimingRunner.java:70)

     at net.browsertime.tool.run.Main.run(Main.java:98)

     at net.browsertime.tool.run.Main.handleCommandLine(Main.java:68)

     at net.browsertime.tool.run.Main.main(Main.java:47)

Exception in thread "main" com.google.inject.ProvisionException: Guice provision errors:

  1. Error in custom provider, 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

at net.browsertime.tool.guice.FireFoxModule.configure(FireFoxModule.java:42)

while locating org.openqa.selenium.WebDriver

1 error

     at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)

     at net.browsertime.tool.timingrunner.SeleniumTimingRunner.run(SeleniumTimingRunner.java:70)

     at net.browsertime.tool.run.Main.run(Main.java:98)

     at net.browsertime.tool.run.Main.handleCommandLine(Main.java:68)

     at net.browsertime.tool.run.Main.main(Main.java:47)

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

     at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:120)

     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:195)

     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)

     at net.browsertime.tool.webdriver.FirefoxDriverProvider.get(FirefoxDriverProvider.java:20)

     at net.browsertime.tool.webdriver.FirefoxDriverProvider.get(FirefoxDriverProvider.java:12)

     at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)

     at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)

     at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)

     at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

     ... 4 more

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

     at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:108)

     ... 14 more

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]
Sent: Friday, January 10, 2014 9:51 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32088392.

@soulgalore
Copy link
Member

Hi again,
sorry that the documentation is incomplete, if you setup Xvfb you need to also a start script (as the instructions): https://gist.github.com/dloman/8303932

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:
https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

I change the documentation tonight. However, I've not got it to work yet (I get the no display specified :) I get back asap when I have a configuration that works.

No running in grid is not supported sorry.

@soulgalore
Copy link
Member

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 Error: no display specified trying both setting it manually and with the Jenkins Xvfb plugin.

@soulgalore
Copy link
Member

@tobli hard without seeing my setup, will test more tonight and get back

@tobli
Copy link
Member

tobli commented Jan 11, 2014

Make sure to export the DISPLAY variable so it's defined in the shell session where sitespeed is run.

@soulgalore
Copy link
Member

@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.

@soulgalore
Copy link
Member

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:
https://github.com/sitespeedio/jenkins.sitespeed.io/releases/tag/v1.0-beta6

And then run Xvfb plugin in Jenkins (the default setup works fine):
https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

Best
Peter

@avellayappan
Copy link
Author

Thanks for the quick response. Trying it out, will keep you posted.

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Saturday, January 11, 2014 1:55 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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:
https://github.com/sitespeedio/jenkins.sitespeed.io/releases/tag/v1.0-beta6

And then run Xvfb plugin in Jenkins (the default setup works fine):
https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

Best
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32108350.

@avellayappan
Copy link
Author

Works great for me. Thanks Peter!

From: Vellayappan, Anna
Sent: Monday, January 13, 2014 11:51 AM
To: 'sitespeedio/sitespeed.io'; sitespeedio/sitespeed.io
Subject: RE: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

Thanks for the quick response. Trying it out, will keep you posted.

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Saturday, January 11, 2014 1:55 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

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:
https://github.com/sitespeedio/jenkins.sitespeed.io/releases/tag/v1.0-beta6

And then run Xvfb plugin in Jenkins (the default setup works fine):
https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

Best
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32108350.

@soulgalore
Copy link
Member

Hi Anna,
ah great. There is one more thing, it will not work running on a Jenkins slave. Hopefully this will be fixed the coming week.
Best
Peter

@avellayappan
Copy link
Author

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:
[cid:image001.png@01CF110C.AD72B7D0]

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
[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-14_00-55-586952552480585527575xvfb
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
Analyzing http://www.qa.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.Xtest&_nkw=test&_sacat=0&_from=R40
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
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
Recording plot data
Recording test results
Build step 'Publish JUnit test result report' changed build result to UNSTABLE
Finished: UNSTABLE

Empty plot created:

[cid:image002.png@01CF110C.D2811B70]

If you have any other suggestions for graph, please let me know.

Thanks!
Anna

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Monday, January 13, 2014 12:21 PM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

Hi Anna,
ah great. There is one more thing, it will not work running on a Jenkins slave. Hopefully this will be fixed the coming week.
Best
Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32207121.

@soulgalore
Copy link
Member

Hi Anna,
yes, I've used the plot plugin, but I haven't updated the image in the documentation when I renamed the fields, 100*sorry, I will update that tonight. Try //site/metrics/docWeight/median to get the weight (you can check the Jenkins log, there you will see when it finds a value).To see all fields. click on workspace and checkout the summary.xml field, there you see all the names.

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:
http://dashboarddude.com/blog/2013/01/23/dashboards-for-graphite/

@avellayappan
Copy link
Author

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!
Anna

From: Peter Hedenskog [mailto:notifications@github.com]
Sent: Tuesday, January 14, 2014 10:49 AM
To: sitespeedio/sitespeed.io
Cc: Vellayappan, Anna
Subject: Re: [sitespeed.io] Sitespeed.io Job hangs in ubuntu CI (#343)

Hi Anna,
yes, I've used the plot plugin, but I haven't updated the image in the documentation when I renamed the fields, 100*sorry, I will update that tonight. Try //site/metrics/docWeight/median to get the weight (you can check the Jenkins log, there you will see when it finds a value).To see all fields. click on workspace and checkout the summary.xml field, there you see all the names.

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:
http://dashboarddude.com/blog/2013/01/23/dashboards-for-graphite/


Reply to this email directly or view it on GitHubhttps://github.com//issues/343#issuecomment-32294109.

@soulgalore
Copy link
Member

Hi Anna,
can't see the image, however to add multiple lines, in the configuration go to the Plot Data Plugin, and after your first there's another Add button with A new data series definition, check the image:
screen shot 2014-01-15 at 08 11 23

Click it and follow the same procedure.

One big win with using Graphite (except that it is better and more flexible) is that you also can create graphs for specific pages, with the plot plugin you can only plot graphs for the summary (the median/percentiles) for all the pages.

Best
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants