Error running on CI server

67 views
Skip to first unread message

Scott B

unread,
Oct 27, 2010, 11:59:15 PM10/27/10
to Jasmine
I am evaluating jasmine and now have it running locally on my
machine. I am having trouble on the CI server and have tracked it
down to starting the process from a different user than the locally
logged in user.

The user that is logged in is 'user' and the user that is running the
rake script is 'hudson'. This causes the following error:

==> Waiting for Selenium RC server on port 60037... Ready!
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize': Connection refused
- connect(2) (Errno::ECONNREFUSED)
from /usr/lib/ruby/1.8/net/http.rb:560:in `open'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
(more here of course)

Does anyone know how to fix this? Sometimes it works, but most of the
time it does not. I have tried it on my local machine and get the
same results if I try to run it as root while logged in as another
user. Works fine if I am the same user.

This is not a x-windows problem since jsUnit runs fine with the same
user.

Davis Frank

unread,
Oct 28, 2010, 12:43:06 AM10/28/10
to jasmi...@googlegroups.com
This isn't a Jasmine problem, but a Selenium one.  Have you searched the Selenium lists?

--dwf


--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.


Scott B

unread,
Oct 28, 2010, 7:04:05 AM10/28/10
to Jasmine
No, but I will. If I run selenium manually using the same command
line, I can connect manually without any problem. And, it works some
of the time.

On Oct 28, 12:43 am, Davis Frank <dwfr...@pivotallabs.com> wrote:
> This isn't a Jasmine problem, but a Selenium one.  Have you searched the
> Selenium lists?
>
> --dwf
>
> On Wed, Oct 27, 2010 at 8:59 PM, Scott B <scottburch...@gmail.com> wrote:
> > I am evaluating jasmine and now have it running locally on my
> > machine.  I am having trouble on the CI server and have tracked it
> > down to starting the process from a different user than the locally
> > logged in user.
>
> > The user that is logged in is 'user' and the user that is running the
> > rake script is 'hudson'.  This causes the following error:
>
> > ==> Waiting for Selenium RC server on port 60037... Ready!
> > /usr/lib/ruby/1.8/net/http.rb:560:in `initialize': Connection refused
> > - connect(2) (Errno::ECONNREFUSED)
> >        from /usr/lib/ruby/1.8/net/http.rb:560:in `open'
> >        from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
> > (more here of course)
>
> > Does anyone know how to fix this?  Sometimes it works, but most of the
> > time it does not.  I have tried it on my local machine and get the
> > same results if I try to run it as root while logged in as another
> > user.  Works fine if I am the same user.
>
> > This is not a x-windows problem since jsUnit runs fine with the same
> > user.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Jasmine" group.
> > To post to this group, send email to jasmi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > jasmine-js+...@googlegroups.com<jasmine-js%2Bunsu...@googlegroups.com>
> > .

Scott B

unread,
Oct 28, 2010, 7:22:45 AM10/28/10
to Jasmine
I will post the solution here once it is found for others. Thanks for
the reply.

Scott B

unread,
Oct 28, 2010, 7:23:07 AM10/28/10
to Jasmine
I will post the solution here once it is found for others. Thanks for
the reply.

On Oct 28, 7:04 am, Scott B <scottburch...@gmail.com> wrote:

Scott B

unread,
Oct 28, 2010, 1:54:20 PM10/28/10
to Jasmine
Ok, to keep my word here is our solution:

We decided to run the selenium RC server separately from the rake
task. Set environment variable SELENIUM_SERVER_PORT and the rake task
will pick up the port for the running server.

Scott

Christian Williams

unread,
Oct 28, 2010, 8:46:27 PM10/28/10
to jasmi...@googlegroups.com
Thanks Scott!

--X

To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.

Huy

unread,
Dec 6, 2010, 5:18:46 AM12/6/10
to Jasmine
Here is a little shell script I use to run jasmine:ci on Hudson:


export SELENIUM_SERVER_PORT=4444
process_id=$(lsof -i tcp:$SELENIUM_SERVER_PORT -Fp|tr -d p)

if [ $process_id ] ; then
echo "Selenium server is already running"
else
selenium-rc &
echo "New Selenium server started"
fi

rake jasmine:ci --trace

Chad Woolley

unread,
Dec 6, 2010, 11:19:54 AM12/6/10
to jasmi...@googlegroups.com

Sweet. I made a gist for this: https://gist.github.com/730511

Dimas Cyriaco

unread,
Jan 12, 2011, 10:48:34 AM1/12/11
to jasmi...@googlegroups.com
We are getting this same problem here, but that solution doesn't seem to solve it.
Someone had any progress on this issue?

Dimas Cyriaco

unread,
Jan 18, 2011, 7:49:44 AM1/18/11
to jasmi...@googlegroups.com
No one?

Nate Clark

unread,
Feb 16, 2011, 7:02:49 AM2/16/11
to Jasmine
Hi, sorry to be late to the party on this one. I had this problem to
(only on Ubuntu ... it worked fine on our Mac machines). It's not a
Jasmine problem, rather a problem with the selenium-rc wrapper that
Jasmine depends on.

Short answer: This problem will be fixed with the release of selenium-
rc 2.3.0 gem. I will try to push this out tonight.

Long explanation: selenium-rc has some logic in there that tries to
detect if the selenium process has started. Apparently, this logic was
flawed because the gem was simply checking if it could open a
TCPSocket to the selenium port ... this doesn't necessarily mean that
Selenium is ready for connections. I am changing the logic in the
selenium-rc gem, so that it will correctly wait for Selenium to be
fully ready, before reporting back to Jasmine that it's ready to go.

Will post an update here when the gem is pushed.

Nate Clark

unread,
Feb 16, 2011, 11:16:22 AM2/16/11
to Jasmine
selenium-rc 2.3.0 is up on rubygems.org. Installing this gem should
fix the issue. Please let me know if you still have problems after
updating.

On Feb 16, 8:02 pm, Nate Clark <natecla...@gmail.com> wrote:
> Hi, sorry to be late to the party on this one. I had this problem to
> (only on Ubuntu ... it worked fine on our Mac machines). It's not a
> Jasmine problem, rather a problem with theselenium-rc wrapper that
> Jasmine depends on.
>
> Short answer: This problem will be fixed with the release ofselenium-
> rc 2.3.0 gem. I will try to push this out tonight.
>
> Long explanation:selenium-rc has some logic in there that tries to
> detect if theseleniumprocess has started. Apparently, this logic was
> flawed because the gem was simply checking if it could open a
> TCPSocket to theseleniumport ... this doesn't necessarily mean thatSeleniumis ready for connections. I am changing the logic in theselenium-rc gem, so that it will correctly wait forSeleniumto be
Reply all
Reply to author
Forward
0 new messages