#397 ✓resolved
Charles Scott

request debian packaging

Reported by Charles Scott | July 19th, 2011 @ 08:39 AM | in Rundeck 1.4 (closed)

In the previous 1.3 release candidate recently announced there was a debian package for rundeck. The official 1.3 release does not include this. Can we get this back in?

Comments and changes to this ticket

  • Charles Scott

    Charles Scott September 29th, 2011 @ 01:00 PM

    I've taken a look at the development debian package version 1.4.0 and was able to adjust the init hook on an ubuntu system to get the service to successfully start, stop, and restart.

    • OS

      root@ubuntu-10-10-64-vm11:/tmp# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.10 DISTRIB_CODENAME=maverick DISTRIB_DESCRIPTION="Ubuntu 10.10"

    • Debian Install of development rundeck 1.4.0

      root@ubuntu-10-10-64-vm11:/tmp# curl -sO http://build.rundeck.org/job/rundeck-development/lastSuccessfulBuil... root@ubuntu-10-10-64-vm11:/tmp# dpkg -i rundeck-1.4.0-0.deb Selecting previously deselected package rundeck. (Reading database ... 78733 files and directories currently installed.) Unpacking rundeck (from rundeck-1.4.0-0.deb) ... Setting up rundeck (1.4.0) ... triggers for ureadahead ... Processing triggers for man-db ...

    • Adjust /etc/init.d/rundeckd

      root@ubuntu-10-10-64-vm11:/tmp# cp /etc/init.d/rundeckd /tmp/rundeckd root@ubuntu-10-04-64-vm10:/tmp# vi /etc/init.d/rundeckd

    • Apply the following fixes (as shown in unified diff):

    root@ubuntu-10-04-64-vm10:/tmp# diff -u /tmp/rundeckd /etc/init.d/rundeckd 
    --- /tmp/rundeckd       2011-09-29 12:44:59.512439290 -0700
    +++ /etc/init.d/rundeckd        2011-09-29 12:48:47.712441256 -0700
    @@ -17,6 +17,7 @@
     ### END INIT INFO
     
     # Source function library
    +. /lib/lsb/init-functions
     . /etc/rundeck/profile
     
     prog="rundeckd"
    @@ -26,15 +27,16 @@
     
     start() {
            echo -n $"Starting $prog: "
    -       nohup su -l rundeck -c "$rundeckd" 2>&1 >>/var/log/rundeck/service.log &
    +       cd /tmp
    +        nohup su -s /bin/bash  rundeck -c "$rundeckd" 2>&1 >>/var/log/rundeck/service.log &
            RETVAL=$?
            PID=$!
            echo $PID > /var/run/rundeckd.pid
            if [ $RETVAL -eq 0 ]; then 
    -               touch /var/lock/subsys/$prog
    -               echo_success
    +               touch /var/run/$prog
    +               log_success_msg
            else
    -               echo_failure
    +               log_failure_msg
            fi
            echo
            return $RETVAL
    @@ -45,7 +47,7 @@
            killproc -p /var/run/rundeckd.pid "$rundeckd"
            RETVAL=$?
            echo
    -       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
    +       [ $RETVAL -eq 0 ] && rm -f /var/run/$prog
            return $RETVAL
     }
     
    @@ -74,7 +76,7 @@
                    start
                    ;;
            condrestart)
    -               if [ -f /var/lock/subsys/$prog ]; then
    +               if [ -f /var/run/$prog ]; then
                            stop
                            start
                    fi
    
    • Start the service
    root@ubuntu-10-04-64-vm10:/tmp# /etc/init.d/rundeckd start
    Starting rundeckd:  * 
    
    root@ubuntu-10-04-64-vm10:/tmp# nohup: redirecting stderr to stdout
    
    • tail log to verify success
    root@ubuntu-10-04-64-vm10:/tmp# tail -f /var/log/rundeck/service.log 
    WARNING: HTTPS is not enabled, specify -Drundeck.ssl.config=/etc/rundeck/server/config/ssl.properties to enable.
    2011-09-29 12:56:21.686::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
    2011-09-29 12:56:21.756::INFO:  jetty-6.1.21
    2011-09-29 12:57:21.229:/:INFO:  Initializing Spring root WebApplicationContext
    using rdeck.base system property: /etc/rundeck
    Installed outputstreams.
    --------------------------------------
    2011-09-29 12:57:45.050:/:INFO:  Initializing Spring FrameworkServlet 'grails'
    2011-09-29 12:57:45.074::INFO:  Started SocketConnector@0.0.0.0:4440
    
  • Greg Schueler

    Greg Schueler September 29th, 2011 @ 02:34 PM

    • Milestone set to Rundeck 1.4
    • Milestone order changed from “76” to “0”
  • Greg Schueler

    Greg Schueler October 5th, 2011 @ 03:02 PM

    is this part nohup su -s /bin/bash rundeck supposed to be nohup su -s /bin/bash -l rundeck ?

  • Greg Schueler

    Greg Schueler October 5th, 2011 @ 04:00 PM

    nb: doesn't seem to matter using "-l" or not.

    another question: is cd /tmp necessary?

  • Greg Schueler
  • Charles Scott

    Charles Scott October 5th, 2011 @ 04:25 PM

    it shouldn't but in my short investigation it got me around an error that I am yet to understand. In rundeck service.log we get the following when "cd /tmp" does not exist:

    #

        java.io.FileNotFoundException: stacktrace.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
        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 org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
        at org.codehaus.groovy.grails.plugins.logging.Log4jConfig.createFullstackTraceAppender(Log4jConfig.groovy:169)
        at org.codehaus.groovy.grails.plugins.logging.Log4jConfig.this$2$createFullstackTraceAppender(Log4jConfig.groovy)
        at org.codehaus.groovy.grails.plugins.logging.Log4jConfig$this$2$createFullstackTraceAppender.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
        at org.codehaus.groovy.grails.plugins.logging.Log4jConfig.configure(Log4jConfig.groovy:136)
        at org.codehaus.groovy.grails.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:63)
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:224)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at com.dtolabs.rundeck.RunServer.run(Unknown Source)
        at com.dtolabs.rundeck.RunServer.main(Unknown Source)
    

    #

    When I insert the "cd /tmp", look at this file resulting from the startup:

    #

    root@ubuntu-10-04-64-vm10:~# /etc/init.d/rundeckd start Starting rundeckd: *

    root@ubuntu-10-04-64-vm10:~# nohup: redirecting stderr to stdout root@ubuntu-10-04-64-vm10:~# ls -l /tmp/stacktrace.log -rw-rw-r-- 1 rundeck rundeck 0 2011-10-05 16:21 /tmp/stacktrace.log

    #

    it is an empty stackstrace log. The ownership, being rundeck, if it should exist at all, should be in the tmpdir or perhaps /var/log/rundeck?

    #

    ls -ld /var/log/rundeck drwxr-s--x 2 rundeck adm 4096 2011-10-05 16:21 /var/log/rundeck

    #

  • Greg Schueler

    Greg Schueler October 5th, 2011 @ 04:33 PM

    hmm, i think that is coming from log4j or grails, i will investigate. it should be directed to the rundeck log dir, you are correct.

  • Greg Schueler

    Greg Schueler October 5th, 2011 @ 04:42 PM

    i think grails automatically creates the stacktrace log4j logger, and by default it just goes to "stacktrace.log" which would be relative to whatever the current directory is. so perhaps in lieu of config changes to adjust this value, we can set the init script to cd to the log dir prior to doing the nohup and starting java

  • Greg Schueler

    Greg Schueler October 5th, 2011 @ 04:51 PM

    changing to do cd /var/log/rundeck prior to nohup

  • Greg Schueler
  • Greg Schueler

    Greg Schueler October 10th, 2011 @ 01:05 PM

    • State changed from “new” to “needs_verification”
    • Tag set to build, debian, enhancement
  • Greg Schueler

    Greg Schueler October 25th, 2011 @ 10:19 AM

    • State changed from “needs_verification” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

People watching this ticket

Referenced by

Pages