Hudson installed from RPM won't start on RHEL5

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Hudson installed from RPM won't start on RHEL5

Matthew Saltzman
I have
      * redhat-release-5Server-5.4.0.3
      * hudson-1.349-1.1
      * java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 (but I get a similar
        failure if I use Sun Java 1.5.0)

When I attempt to start the Hudson service, I get:
        $ sudo /sbin/service hudson start
        Starting Hudson Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at Main.main(Main.java:81)
        Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna8547980376337168520.tmp: /tmp/jna8547980376337168520.tmp: failed to map segment from shared object: Operation not permitted
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
        at java.lang.Runtime.load0(Runtime.java:787)
        at java.lang.System.load(System.java:1022)
        at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
        at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
        at com.sun.jna.Native.<clinit>(Native.java:108)
        at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
        at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
        at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
        at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
        at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
        at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
        at com.sun.akuma.Daemon.all(Daemon.java:59)
        ... 5 more
                                                                   [FAILED]

Any suggestion as to what I'm missing or what I'm doing wrong welcome.

TIA.
--
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

Sami Tikka
Just to be sure you are really using the OpenJDK Java 1.6, could you
verify what gets printed when you do:

which java

If it is a symlink, please check where it points to.

If "java" really is OpenJDK Java 1.6, please try it manually:

java -jar /PATH/TO/hudson.war

I'm suspecting that /etc/init.d/hudson does not run Hudson using the
latest and greatest JDK you have installed.

-- Sami

2010/3/14 Matthew Saltzman <[hidden email]>:

> I have
>      * redhat-release-5Server-5.4.0.3
>      * hudson-1.349-1.1
>      * java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 (but I get a similar
>        failure if I use Sun Java 1.5.0)
>
> When I attempt to start the Hudson service, I get:
>        $ sudo /sbin/service hudson start
>        Starting Hudson Exception in thread "main" java.lang.reflect.InvocationTargetException
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                at java.lang.reflect.Method.invoke(Method.java:616)
>                at Main.main(Main.java:81)
>        Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna8547980376337168520.tmp: /tmp/jna8547980376337168520.tmp: failed to map segment from shared object: Operation not permitted
>                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>                at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
>                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
>                at java.lang.Runtime.load0(Runtime.java:787)
>                at java.lang.System.load(System.java:1022)
>                at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
>                at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
>                at com.sun.jna.Native.<clinit>(Native.java:108)
>                at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
>                at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
>                at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
>                at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
>                at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
>                at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
>                at com.sun.akuma.Daemon.all(Daemon.java:59)
>                ... 5 more
>                                                                   [FAILED]
>
> Any suggestion as to what I'm missing or what I'm doing wrong welcome.
>
> TIA.
> --
>                Matthew Saltzman
>
> Clemson University Math Sciences
> mjs AT clemson DOT edu
> http://www.math.clemson.edu/~mjs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

Matthew Saltzman
On Sun, 2010-03-14 at 07:59 +0200, Sami Tikka wrote:
> Just to be sure you are really using the OpenJDK Java 1.6, could you
> verify what gets printed when you do:
>
> which java
>
> If it is a symlink, please check where it points to.

$ which java
/usr/bin/java
$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Mar 13 16:53 /usr/bin/java
-> /etc/alternatives/java
$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 39 Mar 13 16:53 /etc/alternatives/java
-> /usr/lib/jvm/jre-1.6.0-openjdk/bin/java

It's the only Java I have installed right now.

>
> If "java" really is OpenJDK Java 1.6, please try it manually:
>
> java -jar /PATH/TO/hudson.war
>
> I'm suspecting that /etc/init.d/hudson does not run Hudson using the
> latest and greatest JDK you have installed.

Running as root:

        # java -jar /usr/lib/hudson/hudson.war
        Running from: /usr/lib/hudson/hudson.war
        [Winstone 2010/03/14 04:42:36] - Beginning extraction from war file
        hudson home directory: /root/.hudson
        [Winstone 2010/03/14 04:42:41] - HTTP Listener started: port=8080
        [Winstone 2010/03/14 04:42:41] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
        [Winstone 2010/03/14 04:42:41] - AJP13 Listener started: port=8009
        Mar 14, 2010 4:42:41 AM hudson.model.Hudson$4 onAttained
        INFO: Started initialization
        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
        INFO: Listed all plugins
        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
        INFO: Prepared all plugins
        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
        INFO: Started all plugins
        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
        INFO: Loaded all jobs
        Mar 14, 2010 4:42:46 AM hudson.model.Hudson$4 onAttained
        INFO: Completed initialization
        Mar 14, 2010 4:42:46 AM hudson.TcpSlaveAgentListener <init>
        INFO: JNLP slave agent listener started on TCP port 52388
        [Winstone 2010/03/14 04:44:30] - Control thread shutdown successfully
        [Winstone 2010/03/14 04:44:30] - Winstone shutdown successfully

Same happens when running as a regular user.  Trying to su to user
hudson and run results in nothing at all (but then,
       
As I said, the same failure running the service occurs when using Sun
Java 1.5.0.

BTW, selinux is running in permissive mode.

Thanks for the suggestions, though.

Another question: what ports need to be open in iptables and in my
router's firewall?  I have port 8080 open, but I notice that hudson also
has listeners on ports 8009 and 52443.

>
> -- Sami
>
> 2010/3/14 Matthew Saltzman <[hidden email]>:
> > I have
> >      * redhat-release-5Server-5.4.0.3
> >      * hudson-1.349-1.1
> >      * java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 (but I get a similar
> >        failure if I use Sun Java 1.5.0)
> >
> > When I attempt to start the Hudson service, I get:
> >        $ sudo /sbin/service hudson start
> >        Starting Hudson Exception in thread "main" java.lang.reflect.InvocationTargetException
> >                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >                at java.lang.reflect.Method.invoke(Method.java:616)
> >                at Main.main(Main.java:81)
> >        Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna8547980376337168520.tmp: /tmp/jna8547980376337168520.tmp: failed to map segment from shared object: Operation not permitted
> >                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> >                at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
> >                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
> >                at java.lang.Runtime.load0(Runtime.java:787)
> >                at java.lang.System.load(System.java:1022)
> >                at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
> >                at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
> >                at com.sun.jna.Native.<clinit>(Native.java:108)
> >                at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
> >                at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
> >                at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
> >                at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
> >                at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
> >                at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
> >                at com.sun.akuma.Daemon.all(Daemon.java:59)
> >                ... 5 more
> >                                                                   [FAILED]
> >
> > Any suggestion as to what I'm missing or what I'm doing wrong welcome.
> >
> > TIA.
> > --
> >                Matthew Saltzman
> >
> > Clemson University Math Sciences
> > mjs AT clemson DOT edu
> > http://www.math.clemson.edu/~mjs
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

Sami Tikka
When you su to hudson, what exactly do you? "su hudson" or "su -
hudson"? The former just changes uid, the latter also changes
environment variables, like HOME. If HOME=/.root and Hudson runs as
user hudson who has no write permission to /.root, it might not work
right.

Of course things like this should have been taken care of by the RPM
package. Maybe the RPM package has contact information for the person
who authored the package? You could try contacting him directly.

-- Sami

2010/3/14 Matthew Saltzman <[hidden email]>:

> On Sun, 2010-03-14 at 07:59 +0200, Sami Tikka wrote:
>> Just to be sure you are really using the OpenJDK Java 1.6, could you
>> verify what gets printed when you do:
>>
>> which java
>>
>> If it is a symlink, please check where it points to.
>
> $ which java
> /usr/bin/java
> $ ls -l /usr/bin/java
> lrwxrwxrwx 1 root root 22 Mar 13 16:53 /usr/bin/java
> -> /etc/alternatives/java
> $ ls -l /etc/alternatives/java
> lrwxrwxrwx 1 root root 39 Mar 13 16:53 /etc/alternatives/java
> -> /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
>
> It's the only Java I have installed right now.
>
>>
>> If "java" really is OpenJDK Java 1.6, please try it manually:
>>
>> java -jar /PATH/TO/hudson.war
>>
>> I'm suspecting that /etc/init.d/hudson does not run Hudson using the
>> latest and greatest JDK you have installed.
>
> Running as root:
>
>        # java -jar /usr/lib/hudson/hudson.war
>        Running from: /usr/lib/hudson/hudson.war
>        [Winstone 2010/03/14 04:42:36] - Beginning extraction from war file
>        hudson home directory: /root/.hudson
>        [Winstone 2010/03/14 04:42:41] - HTTP Listener started: port=8080
>        [Winstone 2010/03/14 04:42:41] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
>        [Winstone 2010/03/14 04:42:41] - AJP13 Listener started: port=8009
>        Mar 14, 2010 4:42:41 AM hudson.model.Hudson$4 onAttained
>        INFO: Started initialization
>        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
>        INFO: Listed all plugins
>        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
>        INFO: Prepared all plugins
>        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
>        INFO: Started all plugins
>        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
>        INFO: Loaded all jobs
>        Mar 14, 2010 4:42:46 AM hudson.model.Hudson$4 onAttained
>        INFO: Completed initialization
>        Mar 14, 2010 4:42:46 AM hudson.TcpSlaveAgentListener <init>
>        INFO: JNLP slave agent listener started on TCP port 52388
>        [Winstone 2010/03/14 04:44:30] - Control thread shutdown successfully
>        [Winstone 2010/03/14 04:44:30] - Winstone shutdown successfully
>
> Same happens when running as a regular user.  Trying to su to user
> hudson and run results in nothing at all (but then,
>
> As I said, the same failure running the service occurs when using Sun
> Java 1.5.0.
>
> BTW, selinux is running in permissive mode.
>
> Thanks for the suggestions, though.
>
> Another question: what ports need to be open in iptables and in my
> router's firewall?  I have port 8080 open, but I notice that hudson also
> has listeners on ports 8009 and 52443.
>
>>
>> -- Sami
>>
>> 2010/3/14 Matthew Saltzman <[hidden email]>:
>> > I have
>> >      * redhat-release-5Server-5.4.0.3
>> >      * hudson-1.349-1.1
>> >      * java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 (but I get a similar
>> >        failure if I use Sun Java 1.5.0)
>> >
>> > When I attempt to start the Hudson service, I get:
>> >        $ sudo /sbin/service hudson start
>> >        Starting Hudson Exception in thread "main" java.lang.reflect.InvocationTargetException
>> >                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >                at java.lang.reflect.Method.invoke(Method.java:616)
>> >                at Main.main(Main.java:81)
>> >        Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna8547980376337168520.tmp: /tmp/jna8547980376337168520.tmp: failed to map segment from shared object: Operation not permitted
>> >                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>> >                at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
>> >                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
>> >                at java.lang.Runtime.load0(Runtime.java:787)
>> >                at java.lang.System.load(System.java:1022)
>> >                at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
>> >                at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
>> >                at com.sun.jna.Native.<clinit>(Native.java:108)
>> >                at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
>> >                at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
>> >                at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
>> >                at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
>> >                at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
>> >                at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
>> >                at com.sun.akuma.Daemon.all(Daemon.java:59)
>> >                ... 5 more
>> >                                                                   [FAILED]
>> >
>> > Any suggestion as to what I'm missing or what I'm doing wrong welcome.
>> >
>> > TIA.
>> > --
>> >                Matthew Saltzman
>> >
>> > Clemson University Math Sciences
>> > mjs AT clemson DOT edu
>> > http://www.math.clemson.edu/~mjs
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> --
>                Matthew Saltzman
>
> Clemson University Math Sciences
> mjs AT clemson DOT edu
> http://www.math.clemson.edu/~mjs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

Matthew Saltzman
On Sun, 2010-03-14 at 11:08 +0200, Sami Tikka wrote:
> When you su to hudson, what exactly do you? "su hudson" or "su -
> hudson"? The former just changes uid, the latter also changes
> environment variables, like HOME. If HOME=/.root and Hudson runs as
> user hudson who has no write permission to /.root, it might not work
> right.

Tried both ways, with the same result.  The RPM creates user hudson with
shell /bin/false and home directory /var/lib/hudson.

>
> Of course things like this should have been taken care of by the RPM
> package. Maybe the RPM package has contact information for the person
> who authored the package? You could try contacting him directly.

The RPM is the one from the hudson download site.  It does list the
author as Kohsuke Kawaguchi <[hidden email]>.  I will write
to him directly.  The init script is apparently written for SUSE bu
Pascal Bleser (no other contact info).

Thanks.

>
> -- Sami
>
> 2010/3/14 Matthew Saltzman <[hidden email]>:
> > On Sun, 2010-03-14 at 07:59 +0200, Sami Tikka wrote:
> >> Just to be sure you are really using the OpenJDK Java 1.6, could you
> >> verify what gets printed when you do:
> >>
> >> which java
> >>
> >> If it is a symlink, please check where it points to.
> >
> > $ which java
> > /usr/bin/java
> > $ ls -l /usr/bin/java
> > lrwxrwxrwx 1 root root 22 Mar 13 16:53 /usr/bin/java
> > -> /etc/alternatives/java
> > $ ls -l /etc/alternatives/java
> > lrwxrwxrwx 1 root root 39 Mar 13 16:53 /etc/alternatives/java
> > -> /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
> >
> > It's the only Java I have installed right now.
> >
> >>
> >> If "java" really is OpenJDK Java 1.6, please try it manually:
> >>
> >> java -jar /PATH/TO/hudson.war
> >>
> >> I'm suspecting that /etc/init.d/hudson does not run Hudson using the
> >> latest and greatest JDK you have installed.
> >
> > Running as root:
> >
> >        # java -jar /usr/lib/hudson/hudson.war
> >        Running from: /usr/lib/hudson/hudson.war
> >        [Winstone 2010/03/14 04:42:36] - Beginning extraction from war file
> >        hudson home directory: /root/.hudson
> >        [Winstone 2010/03/14 04:42:41] - HTTP Listener started: port=8080
> >        [Winstone 2010/03/14 04:42:41] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
> >        [Winstone 2010/03/14 04:42:41] - AJP13 Listener started: port=8009
> >        Mar 14, 2010 4:42:41 AM hudson.model.Hudson$4 onAttained
> >        INFO: Started initialization
> >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> >        INFO: Listed all plugins
> >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> >        INFO: Prepared all plugins
> >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> >        INFO: Started all plugins
> >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> >        INFO: Loaded all jobs
> >        Mar 14, 2010 4:42:46 AM hudson.model.Hudson$4 onAttained
> >        INFO: Completed initialization
> >        Mar 14, 2010 4:42:46 AM hudson.TcpSlaveAgentListener <init>
> >        INFO: JNLP slave agent listener started on TCP port 52388
> >        [Winstone 2010/03/14 04:44:30] - Control thread shutdown successfully
> >        [Winstone 2010/03/14 04:44:30] - Winstone shutdown successfully
> >
> > Same happens when running as a regular user.  Trying to su to user
> > hudson and run results in nothing at all (but then,
> >
> > As I said, the same failure running the service occurs when using Sun
> > Java 1.5.0.
> >
> > BTW, selinux is running in permissive mode.
> >
> > Thanks for the suggestions, though.
> >
> > Another question: what ports need to be open in iptables and in my
> > router's firewall?  I have port 8080 open, but I notice that hudson also
> > has listeners on ports 8009 and 52443.
> >
> >>
> >> -- Sami
> >>
> >> 2010/3/14 Matthew Saltzman <[hidden email]>:
> >> > I have
> >> >      * redhat-release-5Server-5.4.0.3
> >> >      * hudson-1.349-1.1
> >> >      * java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 (but I get a similar
> >> >        failure if I use Sun Java 1.5.0)
> >> >
> >> > When I attempt to start the Hudson service, I get:
> >> >        $ sudo /sbin/service hudson start
> >> >        Starting Hudson Exception in thread "main" java.lang.reflect.InvocationTargetException
> >> >                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> >                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >> >                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> >                at java.lang.reflect.Method.invoke(Method.java:616)
> >> >                at Main.main(Main.java:81)
> >> >        Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna8547980376337168520.tmp: /tmp/jna8547980376337168520.tmp: failed to map segment from shared object: Operation not permitted
> >> >                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> >> >                at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
> >> >                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
> >> >                at java.lang.Runtime.load0(Runtime.java:787)
> >> >                at java.lang.System.load(System.java:1022)
> >> >                at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
> >> >                at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
> >> >                at com.sun.jna.Native.<clinit>(Native.java:108)
> >> >                at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
> >> >                at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
> >> >                at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
> >> >                at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
> >> >                at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
> >> >                at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
> >> >                at com.sun.akuma.Daemon.all(Daemon.java:59)
> >> >                ... 5 more
> >> >                                                                   [FAILED]
> >> >
> >> > Any suggestion as to what I'm missing or what I'm doing wrong welcome.
> >> >
> >> > TIA.
> >> > --
> >> >                Matthew Saltzman
> >> >
> >> > Clemson University Math Sciences
> >> > mjs AT clemson DOT edu
> >> > http://www.math.clemson.edu/~mjs
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [hidden email]
> >> > For additional commands, e-mail: [hidden email]
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >
> > --
> >                Matthew Saltzman
> >
> > Clemson University Math Sciences
> > mjs AT clemson DOT edu
> > http://www.math.clemson.edu/~mjs
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

Matthew Saltzman
To recap the story so far:  I have the RPM installation of Hudson
(hudson-1.350-1.1) on a RHEL5.4 system with OpenJDK 1.6.0 (but a similar
problem occurs with Sun Java 1.5.0).  This configuration starts Hudson
as a service on boot with a script in /etc/init.d.  The startup fails on
my system, although starting by hand works.

I've started debugging the initscript and I've gotten to this point.

The command to invoke hudson as a daemon, as constructed in the script,
is essentially this (a few options that don't affect the problem are
deleted):

        sudo /usr/lib/jvm/jre-1.6.0/bin/java -Djava.awt.headless=true
        -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war
        --daemon

That results in the following failure when executed on the command line
by root:

        $ sudo /usr/lib/jvm/jre-1.6.0/bin/java -Djava.awt.headless=true
        -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war
        --daemonForking into background to run as a daemon.
        Use --logfile to redirect output to a file
        Exception in thread "main"
        java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at Main.main(Main.java:81)
        Caused by:
        java.lang.UnsatisfiedLinkError: /tmp/jna5804074834817656455.tmp: /tmp/jna5804074834817656455.tmp: failed to map segment from shared object: Operation not permitted
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
        at java.lang.Runtime.load0(Runtime.java:787)
        at java.lang.System.load(System.java:1022)
        at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:756)
        at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
        at com.sun.jna.Native.<clinit>(Native.java:108)
        at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
        at
        com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
        at
        com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
        at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
        at
        com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
        at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
        at com.sun.akuma.Daemon.all(Daemon.java:59)
        ... 5 more

Deleting the --daemon option from the above line results in a successful
start, but does not fork into the background.

On Sun, 2010-03-14 at 05:18 -0400, Matthew Saltzman wrote:

> On Sun, 2010-03-14 at 11:08 +0200, Sami Tikka wrote:
> > When you su to hudson, what exactly do you? "su hudson" or "su -
> > hudson"? The former just changes uid, the latter also changes
> > environment variables, like HOME. If HOME=/.root and Hudson runs as
> > user hudson who has no write permission to /.root, it might not work
> > right.
>
> Tried both ways, with the same result.  The RPM creates user hudson with
> shell /bin/false and home directory /var/lib/hudson.
>
> >
> > Of course things like this should have been taken care of by the RPM
> > package. Maybe the RPM package has contact information for the person
> > who authored the package? You could try contacting him directly.
>
> The RPM is the one from the hudson download site.  It does list the
> author as Kohsuke Kawaguchi <[hidden email]>.  I will write
> to him directly.  The init script is apparently written for SUSE bu
> Pascal Bleser (no other contact info).
>
> Thanks.
>
> >
> > -- Sami
> >
> > 2010/3/14 Matthew Saltzman <[hidden email]>:
> > > On Sun, 2010-03-14 at 07:59 +0200, Sami Tikka wrote:
> > >> Just to be sure you are really using the OpenJDK Java 1.6, could you
> > >> verify what gets printed when you do:
> > >>
> > >> which java
> > >>
> > >> If it is a symlink, please check where it points to.
> > >
> > > $ which java
> > > /usr/bin/java
> > > $ ls -l /usr/bin/java
> > > lrwxrwxrwx 1 root root 22 Mar 13 16:53 /usr/bin/java
> > > -> /etc/alternatives/java
> > > $ ls -l /etc/alternatives/java
> > > lrwxrwxrwx 1 root root 39 Mar 13 16:53 /etc/alternatives/java
> > > -> /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
> > >
> > > It's the only Java I have installed right now.
> > >
> > >>
> > >> If "java" really is OpenJDK Java 1.6, please try it manually:
> > >>
> > >> java -jar /PATH/TO/hudson.war
> > >>
> > >> I'm suspecting that /etc/init.d/hudson does not run Hudson using the
> > >> latest and greatest JDK you have installed.
> > >
> > > Running as root:
> > >
> > >        # java -jar /usr/lib/hudson/hudson.war
> > >        Running from: /usr/lib/hudson/hudson.war
> > >        [Winstone 2010/03/14 04:42:36] - Beginning extraction from war file
> > >        hudson home directory: /root/.hudson
> > >        [Winstone 2010/03/14 04:42:41] - HTTP Listener started: port=8080
> > >        [Winstone 2010/03/14 04:42:41] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
> > >        [Winstone 2010/03/14 04:42:41] - AJP13 Listener started: port=8009
> > >        Mar 14, 2010 4:42:41 AM hudson.model.Hudson$4 onAttained
> > >        INFO: Started initialization
> > >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> > >        INFO: Listed all plugins
> > >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> > >        INFO: Prepared all plugins
> > >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> > >        INFO: Started all plugins
> > >        Mar 14, 2010 4:42:43 AM hudson.model.Hudson$4 onAttained
> > >        INFO: Loaded all jobs
> > >        Mar 14, 2010 4:42:46 AM hudson.model.Hudson$4 onAttained
> > >        INFO: Completed initialization
> > >        Mar 14, 2010 4:42:46 AM hudson.TcpSlaveAgentListener <init>
> > >        INFO: JNLP slave agent listener started on TCP port 52388
> > >        [Winstone 2010/03/14 04:44:30] - Control thread shutdown successfully
> > >        [Winstone 2010/03/14 04:44:30] - Winstone shutdown successfully
> > >
> > > Same happens when running as a regular user.  Trying to su to user
> > > hudson and run results in nothing at all (but then,
> > >
> > > As I said, the same failure running the service occurs when using Sun
> > > Java 1.5.0.
> > >
> > > BTW, selinux is running in permissive mode.
> > >
> > > Thanks for the suggestions, though.
> > >
> > > Another question: what ports need to be open in iptables and in my
> > > router's firewall?  I have port 8080 open, but I notice that hudson also
> > > has listeners on ports 8009 and 52443.
> > >
> > >>
> > >> -- Sami
> > >>
> > >> 2010/3/14 Matthew Saltzman <[hidden email]>:
> > >> > I have
> > >> >      * redhat-release-5Server-5.4.0.3
> > >> >      * hudson-1.349-1.1
> > >> >      * java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 (but I get a similar
> > >> >        failure if I use Sun Java 1.5.0)
> > >> >
> > >> > When I attempt to start the Hudson service, I get:
> > >> >        $ sudo /sbin/service hudson start
> > >> >        Starting Hudson Exception in thread "main" java.lang.reflect.InvocationTargetException
> > >> >                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >> >                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > >> >                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > >> >                at java.lang.reflect.Method.invoke(Method.java:616)
> > >> >                at Main.main(Main.java:81)
> > >> >        Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna8547980376337168520.tmp: /tmp/jna8547980376337168520.tmp: failed to map segment from shared object: Operation not permitted
> > >> >                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> > >> >                at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1747)
> > >> >                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1643)
> > >> >                at java.lang.Runtime.load0(Runtime.java:787)
> > >> >                at java.lang.System.load(System.java:1022)
> > >> >                at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
> > >> >                at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
> > >> >                at com.sun.jna.Native.<clinit>(Native.java:108)
> > >> >                at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:54)
> > >> >                at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:103)
> > >> >                at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:91)
> > >> >                at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:81)
> > >> >                at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:69)
> > >> >                at com.sun.akuma.Daemon.daemonize(Daemon.java:77)
> > >> >                at com.sun.akuma.Daemon.all(Daemon.java:59)
> > >> >                ... 5 more
> > >> >                                                                   [FAILED]
> > >> >
> > >> > Any suggestion as to what I'm missing or what I'm doing wrong welcome.
> > >> >
> > >> > TIA.
> > >> > --
> > >> >                Matthew Saltzman
> > >> >
> > >> > Clemson University Math Sciences
> > >> > mjs AT clemson DOT edu
> > >> > http://www.math.clemson.edu/~mjs
> > >> >
> > >> > ---------------------------------------------------------------------
> > >> > To unsubscribe, e-mail: [hidden email]
> > >> > For additional commands, e-mail: [hidden email]
> > >> >
> > >> >
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: [hidden email]
> > >> For additional commands, e-mail: [hidden email]
> > >>
> > >
> > > --
> > >                Matthew Saltzman
> > >
> > > Clemson University Math Sciences
> > > mjs AT clemson DOT edu
> > > http://www.math.clemson.edu/~mjs
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>

--
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

R. Tyler Croy

On Sun, 14 Mar 2010, Matthew Saltzman wrote:

> To recap the story so far:  I have the RPM installation of Hudson
> (hudson-1.350-1.1) on a RHEL5.4 system with OpenJDK 1.6.0 (but a similar
> problem occurs with Sun Java 1.5.0).  This configuration starts Hudson
> as a service on boot with a script in /etc/init.d.  The startup fails on
> my system, although starting by hand works.

I'm running Hudson with the exact same set up (except for maybe running CentOS
5.4) with OpenJDK without any issues. Are you running with any SELinux modifications
on the machine in addition to the standard RHEL5 install?

Cheers,
-R. Tyler Ballance
--------------------------------------
 Jabber: [hidden email]
 GitHub: http://github.com/rtyler
Twitter: http://twitter.com/agentdero
   Blog: http://unethicalblogger.com


attachment0 (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

Matthew Saltzman
On Sun, 2010-03-14 at 14:31 -0700, R. Tyler Ballance wrote:

> On Sun, 14 Mar 2010, Matthew Saltzman wrote:
>
> > To recap the story so far:  I have the RPM installation of Hudson
> > (hudson-1.350-1.1) on a RHEL5.4 system with OpenJDK 1.6.0 (but a similar
> > problem occurs with Sun Java 1.5.0).  This configuration starts Hudson
> > as a service on boot with a script in /etc/init.d.  The startup fails on
> > my system, although starting by hand works.
>
> I'm running Hudson with the exact same set up (except for maybe running CentOS
> 5.4) with OpenJDK without any issues. Are you running with any SELinux modifications
> on the machine in addition to the standard RHEL5 install?

I'm running SElinux in permissive mode.  I don't think there have been
any explicit changes to the standard policy.

But you did make me think of something and that turns out to be the
issue.  For Web security, /tmp is mounted with options noexec nosuid.
Apparently, I'll have to rethink that policy.

Thanks!

>
> Cheers,
> -R. Tyler Ballance
> --------------------------------------
>  Jabber: [hidden email]
>  GitHub: http://github.com/rtyler
> Twitter: http://twitter.com/agentdero
>    Blog: http://unethicalblogger.com
>

--
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hudson installed from RPM won't start on RHEL5

matthewlmcclure
Instead of mounting /tmp differently, you can change the temp directory that Hudson uses. Add:

-Djava.io.tmpdir=$HUDSON_HOME/tmp

to /etc/sysconfig/hudson, and create /var/lib/hudson/tmp.

Matt