1

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 ?

7
  • Is it listening on the right interface? netstat -ap should tell you..
    – Joril
    Feb 10, 2010 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, 2010 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, 2010 at 16:25
  • do this: lsof -i -n -P | |grep hudson. That will tell you what ports it has open.
    – Bill Weiss
    Feb 10, 2010 at 18:48
  • Thanks for tips. Unfortunately, I get port 8080 like expected (update 2).
    – Laurent
    Feb 10, 2010 at 19:08

1 Answer 1

5

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

1
  • Perfect, solved my problem! I saw this from netstat: netstat -anp | grep 8080 tcp6 0 0 :::8080 :::* LISTEN 7080/java
    – sandos
    Mar 19, 2010 at 9:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .