Hide Forgot
Description of problem: oot@hp-dl2x170g6-02 ~]# [root@hp-dl2x170g6-02 ~]# cat /var/log/deltacloud-core/mock.log /usr/bin/deltacloudd[6510]: >> Thin web server (v1.2.5 codename This Is Not A Web Server) /usr/bin/deltacloudd[6510]: >> Debugging ON /usr/bin/deltacloudd[6510]: >> Maximum connections set to 1024 /usr/bin/deltacloudd[6510]: >> Listening on localhost:3002, CTRL+C to stop /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/utils.rb:105: warning: already initialized constant HEX /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/utils.rb:107: warning: already initialized constant TO_REMEMBER /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/utils.rb:108: warning: already initialized constant ASCII /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/errors.rb:128: warning: already initialized constant DEFAULT_CLOSE_ON_4XX_PROBABILITY /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/parsers.rb:47: warning: already initialized constant DEFAULT_XML_LIBRARY /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/awsbase.rb:66: warning: already initialized constant AMAZON_PROBLEMS /usr/bin/deltacloudd[6510]: /usr/lib/ruby/gems/1.8/gems/aws-2.5.5/lib/ses/../awsbase/awsbase.rb:86: warning: already initialized constant DEFAULT_SIGNATURE_VERSION /usr/bin/deltacloudd[8221]: >> Thin web server (v1.2.5 codename This Is Not A Web Server) /usr/bin/deltacloudd[8221]: >> Debugging ON /usr/bin/deltacloudd[8221]: >> Maximum connections set to 1024 /usr/bin/deltacloudd[8221]: >> Listening on localhost:3002, CTRL+C to stop /usr/bin/deltacloudd[8221]: /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_tcp_server' /usr/bin/deltacloudd[8221]: : /usr/bin/deltacloudd[8221]: no acceptor /usr/bin/deltacloudd[8221]: ( /usr/bin/deltacloudd[8221]: RuntimeError /usr/bin/deltacloudd[8221]: ) /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_server' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/backends/tcp_server.rb:16:in `connect' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/backends/base.rb:49:in `start' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `call' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/backends/base.rb:57:in `start' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/server.rb:156:in `start' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/controllers/controller.rb:80:in `start' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:177:in `send' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:177:in `run_command' /usr/bin/deltacloudd[8221]: from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:143:in `run!' /usr/bin/deltacloudd[8221]: from /usr/share/deltacloud-core/bin/deltacloudd:223 /usr/bin/deltacloudd[8221]: from /usr/bin/deltacloudd:5:in `load' /usr/bin/deltacloudd[8221]: from /usr/bin/deltacloudd:5 Starting Deltacloud API :: mock :: http://localhost:3002/api /usr/bin/deltacloudd[6510]: >> Stopping ... Starting Deltacloud API :: mock :: http://localhost:3002/api /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:163:in `chdir': Permission denied - /root (Errno::EACCES) from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:163:in `run_command' from /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:143:in `run!' from /usr/share/deltacloud-core/bin/deltacloudd:223 from /usr/bin/deltacloudd:5:in `load' from /usr/bin/deltacloudd:5 Starting Deltacloud API :: mock :: http://localhost:3002/api
The 'no acceptor' error means that the port you want to run Deltacloud API on is already occupied by something else (another DC instance?). The '/usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:163:in `chdir': Permission denied - /root (Errno::EACCES)' is more weird, since it try to cd into the /root directory. My 50cents that you're trying to run DC as the 'root' user, which obviously is not correct.
Sure.. running as root is a bad thing.. but as a user we're not setting this up. aeolus-configure is.
aeolus-configure is just running the service via init. It appears to try to run as $DELTACLOUD_USER or nobody in there.
#!/bin/sh # # deltacloud-core Deltacloud API Core # chkconfig: 345 90 60 # description: deltacloud-core is primary server process for the \ # Deltacloud Core component. ### BEGIN INIT INFO # Provides: deltacloud-core # Required-Start: # Required-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Deltacloud Core API deamon # Description: Deltacloud Core API provides access to different cloud providers \ # using single REST API ### END INIT INFO . /etc/rc.d/init.d/functions [ -r /etc/sysconfig/deltacloud-core ] && . /etc/sysconfig/deltacloud-core exec="/usr/bin/deltacloudd" prog="deltacloud-core" [ ! -d /var/log/$prog ] && mkdir -p /var/log/$prog # You can overide these variables using /etc/sysconfig/deltacloud-core API_ENV="${API_ENV:-production}" DRIVER="${DRIVER:-mock}" PORT="${PORT:-3002}" HOST="${HOST:-localhost}" DELTACLOUD_USER="${DELTACLOUD_USER:-nobody}" LOGFILE="${LOGFILE:-/var/log/$prog/$DRIVER.log}" LOCKFILE="${LOCKFILE:-/var/lock/subsys/$prog}" [ -r $LOGFILE ] && chown nobody $LOGFILE [ -r $LOCKFILE ] && chown nobody $LOCKFILE start() { [ -x $exec ] || exit 5 echo -n $"Starting $prog: " daemon --user "$DELTACLOUD_USER" "$exec -i $DRIVER -e $API_ENV --port $PORT -r $HOST >> $LOGFILE 2>&1 &" retval=$? if [ $retval -eq 0 ] && touch $LOCKFILE ; then echo_success echo else echo_failure echo fi return $retval } stop() { echo -n $"Shutting down $prog: " killproc deltacloudd retval=$? if [ $retval -eq 0 ] && rm -f $LOCKFILE ; then echo_success echo else echo_failure echo fi return $retval } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; reload) ;; force-reload) restart ;; status) status -p $PIDFILE $prog retval=$? ;; *) echo "Usage: $prog {start|stop|restart|status}" exit 1 ;; esac exit $retval [root@hp-dl2x170g6-02 ~]#
OK, so the next possible reason for this is just old thin. The version 1.2.5 which is shipped in EPEL sounds pretty old (1.2.11 in Fedora now). I'll try to update the gem tomorrow. Meanwhile please could you try to manually install 'thin' gem (gem install thin) just to test if this helps?
Actually I think we figured this one out. By default, thin tries to start in Dir.pwd. If you launch the initscript as root, then this is typically /root. However, prior to launching thin we also transition to nobody:nobody. So what this means is that a process as nobody:nobody tries to cd to /root, and it fails. This works in the systemd case because systemd starts the process with a clean environment, in /, by default. I fixed it by adding an explicit cd / in the initscript, which fixes the issue.
verified in 0.4.0 build
taking off tracker
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0586.html