Uwsgi daemon won't start if there is no uid/gid in configuration

Bug #781226 reported by cezio
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
uWSGI Ubuntu package
In Progress
Undecided
Leonid Borisenko

Bug Description

New uwsgi init script won't run uwsgi app if there are no uid or gid values in app configuration, but error message is misleading and giving no clue of what's wrong:

 * Restarting app server(s) uwsgi-python
install: invalid group `'
  [fail]

uid and gid are used as parameters in install command in do_start_specific_daemon in /usr/lib/uwsgi/init/specific_daemon.
If there is no uid/gid, there should be a proper error message or those params should be ommited in installing $SPECIFIC_RUNDIR

Revision history for this message
Leonid Borisenko (leonidborisenko) wrote :

  I can't reproduce this bug.

  But problem related to executing 'install' command is definitely exists in init script.

  Try to apply following patch to /usr/lib/uwsgi/init/snippets and rerun init script with problem configuration file. Does error message disappears after applying of patch or not?

--- /usr/lib/uwsgi/init/snippets.orig 2011-05-11 21:12:24.000000000 +0300
+++ /usr/lib/uwsgi/init/snippets 2011-05-11 21:08:14.000000000 +0300
@@ -45,6 +45,7 @@
 extract_id()
 {
   local KIND="$1"
+ shift
   local CONFNAME="$@"

   local CONFFILE="$(path_to_conffile_with_name "$CONFNAME")"

Changed in uwsgi:
status: New → In Progress
Changed in uwsgi:
assignee: nobody → Leonid Borisenko (leonidborisenko)
Revision history for this message
cezio (c-statkiewicz+lp) wrote :

This seems to do the trick. thx

Revision history for this message
Rowan Wookey (rwky) wrote :

I have the same issue, the above patch resolved it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.