Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed Hudson deamon on one server (running on debian lenny testing) some time ago. All was working until I perform an upgrade. At this time Hudson isn't accessible at port 8080 (which is the default port used). I have looked for iptables problems, however port 8080 is open in INPUT and OUTPUT. Configuration file in /etc/default/hudson seems okay, I haven't touch it. And if I do a ps aux | grep hudson, hudson deamon is running.

Update 1: What is really strange for me is that in /var/log/hudson/hudson.log I get no error :

[Winstone 2010/02/10 17:10:04] - Control thread shutdown successfully
[Winstone 2010/02/10 17:10:04] - Winstone shutdown successfully
Running from: /usr/share/hudson/hudson.war
[Winstone 2010/02/10 17:10:43] - Beginning extraction from war file
hudson home directory: /var/lib/hudson
[Winstone 2010/02/10 17:10:44] - HTTP Listener started: port=8080
[Winstone 2010/02/10 17:10:44] - AJP13 Listener started: port=8009
[Winstone 2010/02/10 17:10:44] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
10 févr. 2010 17:10:44 hudson.model.Hudson$4 onAttained
INFO: Started initialization
10 févr. 2010 17:10:44 hudson.model.Hudson$4 onAttained
INFO: Listed all plugins
10 févr. 2010 17:10:44 hudson.model.Hudson$4 onAttained
INFO: Prepared all plugins
10 févr. 2010 17:10:44 hudson.model.Hudson$4 onAttained
INFO: Started all plugins
10 févr. 2010 17:10:46 hudson.model.Hudson$4 onAttained
INFO: Loaded all jobs
10 févr. 2010 17:10:46 hudson.model.Hudson$4 onAttained
INFO: Completed initialization
10 févr. 2010 17:10:47 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@caa559d: display name [Root WebApplicationContext]; startup date [Wed Feb 10 17:10:47 CET 2010]; root of context hierarchy
10 févr. 2010 17:10:47 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@caa559d]: org.springframework.beans.factory.support.DefaultListableBeanFactory@40d2f5f1
10 févr. 2010 17:10:47 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@40d2f5f1: defining beans [daoAuthenticationProvider,authenticationManager,userDetailsService]; root of factory hierarchy
10 févr. 2010 17:10:47 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@4d88a387: display name [Root WebApplicationContext]; startup date [Wed Feb 10 17:10:47 CET 2010]; root of context hierarchy
10 févr. 2010 17:10:47 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@4d88a387]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6153e0c0
10 févr. 2010 17:10:47 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6153e0c0: defining beans [filter,legacy]; root of factory hierarchy
10 févr. 2010 17:10:47 hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 59750

Update 2:

What I get with lsof -i -n -P | grep hudson:

java      28985      hudson   97u  IPv6 2002707      0t0  TCP *:8080 (LISTEN)
java      28985      hudson   99u  IPv6 2002708      0t0  TCP *:8009 (LISTEN)
java      28985      hudson  147u  IPv6 2002711      0t0  TCP *:59750 (LISTEN)
java      28985      hudson  150u  IPv6 2002712      0t0  UDP *:33848 

I don't know what I can verify. Does someone has an idea in order to help me to resolve this problem ?

share|improve this question
    
Is it listening on the right interface? netstat -ap should tell you.. –  Joril Feb 10 '10 at 12:42
    
Check first if you can connect from localhost on the server: Login via SSH and use wget or links2 to check if hudson responses! –  theomega Feb 10 '10 at 16:09
    
I get no result for port 8080 with netstat -ap. wget on localhost:8080 return the webpage generated by lighttpd (I have lighttpd running on port 80 on this server). Is there a conflict between lighttpd and hudson ? How can I check it ? I have updated my question in order to put log traces. –  Laurent Feb 10 '10 at 16:25
    
do this: lsof -i -n -P | |grep hudson. That will tell you what ports it has open. –  Bill Weiss Feb 10 '10 at 18:48
    
Thanks for tips. Unfortunately, I get port 8080 like expected (update 2). –  Laurent Feb 10 '10 at 19:08
show 2 more comments

1 Answer

up vote 5 down vote accepted

After investigation I believe I know from where the problem is :

lsof -i -n -P | |grep hudson
java      28985      hudson   97u  IPv6 2002707      0t0  TCP *:8080 (LISTEN)
java      28985      hudson   99u  IPv6 2002708      0t0  TCP *:8009 (LISTEN)
java      28985      hudson  147u  IPv6 2002711      0t0  TCP *:59750 (LISTEN)
java      28985      hudson  150u  IPv6 2002712      0t0  UDP *:33848 

As you can see all hudson services are using ipv6. In order to solve the problem I need to force java to launch hudson with ipv4 and not ipv6 by editing /etc/default/hudson :

JAVA_ARGS="-Djava.net.preferIPv4Stack=true"

And now, all works !

Thanks for your help :)

UPDATE: This bug was due to my distribution : Debian Lenny Testing.

In order to solve this issue, edits /etc/sysctl.d/bindv6only.conf to set net.ipv6.bindv6only to 0.

This issue is known : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044

share|improve this answer
    
Perfect, solved my problem! I saw this from netstat: netstat -anp | grep 8080 tcp6 0 0 :::8080 :::* LISTEN 7080/java –  sandos Mar 19 '10 at 9:43
    
Works for me - thanks for the fix. –  Greg Work May 31 '10 at 7:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.