Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Error installing using yum on CentOS(Error installing using yum on CentOS)
Error installing using yum on CentOS [message #997685] Tue, 08 January 2013 14:48 Go to next message
Trevor Cole is currently offline Trevor ColeFriend
Messages: 6
Registered: January 2013
Junior Member
Hi,

I'm trying to install Hudson on CentOS 6.3 running as a Guest OS in VirtualBox on Windows 7.

I'm using the installation details from wiki.eclipse.org/Hudson-ci/Installing_Hudson_RPM

After I've executed the wget command and issue a yum check-update I get the following error;

hudson-ci.org/redhat/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"

Any idea why this is happening? Is the repository for Hudson no longer available?

Regards
Trevor

PS I had to remove http from the URL's due to being a first time poster Sad
Re: Error installing using yum on CentOS [message #997748 is a reply to message #997685] Tue, 08 January 2013 17:01 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Trevor,
Due to some unknown reason the repomd.xml was not copied properly to the Package repository location. I just made sure it was copied correctly now. Could you please try again.


Winston Prakash
Eclipse Hudson team
Re: Error installing using yum on CentOS [message #998089 is a reply to message #997748] Wed, 09 January 2013 10:56 Go to previous messageGo to next message
Trevor Cole is currently offline Trevor ColeFriend
Messages: 6
Registered: January 2013
Junior Member
Thanks Winston. That resolved the installation issue.

However the service now doesn't seem to run in the background and I had to stop it running as a service on startup to enable me to log into the server.

Any reason why it is doing this?

Regards,
Trevor
Re: Error installing using yum on CentOS [message #998231 is a reply to message #998089] Wed, 09 January 2013 16:06 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Trevor,
I looked at the RPM packaging source.

http://git.eclipse.org/c/hudson/org.eclipse.hudson.tools.packaging.git/tree/rpm/SOURCES/hudson.init.in

The RPM is supposed to create /etc/init.d/hudson with the following

echo -n "Starting Hudson "
daemon --user "$HUDSON_USER" --pidfile "$HUDSON_PID_FILE" $JAVA_CMD $PARAMS > /dev/null


As you can see the service is started as a deamon, so should be in the background. Could you check that file and see what it has.



Winston Prakash
Eclipse Hudson team
Re: Error installing using yum on CentOS [message #998238 is a reply to message #998231] Wed, 09 January 2013 16:22 Go to previous messageGo to next message
Trevor Cole is currently offline Trevor ColeFriend
Messages: 6
Registered: January 2013
Junior Member
Hi Winston,

Yes the file seems to have those two lines set in it, but I simply get "Starting Hudson" and then it just sits there and hangs the boot process.

I then have to set hudson to not start up automatically from single user mode before it will reboot succesfully.

Regards,

Trevor

Re: Error installing using yum on CentOS [message #1006549 is a reply to message #998238] Thu, 31 January 2013 16:29 Go to previous messageGo to next message
Trevor Cole is currently offline Trevor ColeFriend
Messages: 6
Registered: January 2013
Junior Member
I've returned to this problem to try and solve it. It would appear the issue is with this command in the file /etc/init.d/hudson;

daemon --user "$HUDSON_USER" --pidfile "$HUDSON_PID_FILE" $JAVA_CMD $PARAMS > /dev/null

If I change it to the following, removing > /dev/null it seems to execute fine;

daemon --user "$HUDSON_USER" --pidfile "$HUDSON_PID_FILE" $JAVA_CMD $PARAMS &

I also have to remove the /dev/null redirect from this command also, otherwise I get the same hanging problem.

echo "$cmd" | grep $HUDSON_WAR > /dev/null

Any ideas why having a redirect to /dev/null may be causing a hang during script execution?

I'm running under CentOS 6 in a VirtualBox VM.

Regards,

Trevor Cole
Re: Error installing using yum on CentOS [message #1007670 is a reply to message #1006549] Wed, 06 February 2013 23:19 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Strange "daemon" is suppose to act similar to &. Anyway > /dev/null swallows all your log. Probably in order for your logs not to go in the console, you should do something like

daemon --user "$HUDSON_USER" --pidfile "$HUDSON_PID_FILE" $JAVA_CMD $PARAMS &> /var/tmp/hudson.log &

All the Hudson standard output and error will go to the log file /var/tmp/hudson.log which you can refer later.


Winston Prakash
Eclipse Hudson team
Re: Error installing using yum on CentOS [message #1007852 is a reply to message #997685] Thu, 07 February 2013 17:55 Go to previous messageGo to next message
Terran Gilman is currently offline Terran GilmanFriend
Messages: 67
Registered: July 2009
Member
I've also noticed that the stop command only kills the root process while the other three created are left running. Any ideas on why this would be happening?
Re: Error installing using yum on CentOS [message #1007932 is a reply to message #1007670] Fri, 08 February 2013 09:51 Go to previous messageGo to next message
Trevor Cole is currently offline Trevor ColeFriend
Messages: 6
Registered: January 2013
Junior Member
Winston Prakash wrote on Wed, 06 February 2013 18:19
Strange "daemon" is suppose to act similar to &. Anyway > /dev/null swallows all your log. Probably in order for your logs not to go in the console, you should do something like

daemon --user "$HUDSON_USER" --pidfile "$HUDSON_PID_FILE" $JAVA_CMD $PARAMS &> /var/tmp/hudson.log &

All the Hudson standard output and error will go to the log file /var/tmp/hudson.log which you can refer later.


Thanks Winston, that has solved the issue I was getting.

Trevor
Re: Error installing using yum on CentOS [message #1008052 is a reply to message #1007932] Fri, 08 February 2013 16:20 Go to previous messageGo to next message
Terran Gilman is currently offline Terran GilmanFriend
Messages: 67
Registered: July 2009
Member
I wound up re-writing that part of the init script. The nice thing is it only leaves a single process running. The only issue is that I haven't added a safety check for pid file existence to avoid double starting the service.


echo -n "Starting Hudson "
#daemon --user "$HUDSON_USER" --pidfile "$HUDSON_PID_FILE" $JAVA_CMD $PARAMS &> /dev/null &
runuser -s /bin/bash hudson -c "nohup $JAVA_CMD $PARAMS &> /dev/null &"
RETVAL=$?
if [ $RETVAL = 0 ]; then
success
echo > "$HUDSON_PID_FILE" # just in case we fail to find it
MY_SESSION_ID=`/bin/ps h -o sess -p $$`
# get PID
/bin/ps hww -u "$HUDSON_USER" -o sess,ppid,pid,cmd | \
while read sess ppid pid cmd; do
# [ "$ppid" = 1 ] || continue
# this test doesn't work because Hudson sets a new Session ID
# [ "$sess" = "$MY_SESSION_ID" ] || continue
echo "$cmd" | grep $HUDSON_WAR &> /dev/null &
[ $? = 0 ] || continue
# found a PID
echo $pid > "$HUDSON_PID_FILE"
done
else
failure
fi
Re: Error installing using yum on CentOS [message #1008057 is a reply to message #1008052] Fri, 08 February 2013 16:33 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
@Terran, the sources I use to create the Linux distributions are here.

http://git.eclipse.org/c/hudson/org.eclipse.hudson.tools.packaging.git/

Would you mind to add your patch to it. Any one is welcome to provide patch via Eclipse Gerrit.

http://wiki.eclipse.org/Hudson-ci/development#Submitting_a_Patch_for_Non-Committers


Winston Prakash
Eclipse Hudson team
Re: Error installing using yum on CentOS [message #1008061 is a reply to message #1008057] Fri, 08 February 2013 16:57 Go to previous message
Terran Gilman is currently offline Terran GilmanFriend
Messages: 67
Registered: July 2009
Member
Sure. I'll get it cleaned up and submitted.
Previous Topic:How to extract metrics from a report file
Next Topic:Error while building a grails app
Goto Forum:
  


Current Time: Sat Apr 20 08:38:03 GMT 2024

Powered by FUDForum. Page generated in 0.04705 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top