-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/09/2012 07:02 AM, Phillip B Oldham wrote:
> Hi
> 
> I'm getting the following error when trying to run supervisor via
> `sudo` on OS X Lion using Python 2.7.3:
> 
> Traceback (most recent call last): File "/usr/local/bin/supervisord",
> line 9, in <module> load_entry_point('supervisor==3.0a12',
> 'console_scripts', 'supervisord')() File 
> "/usr/local/pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/supervisor/supervisord.py",
>
> 
line 363, in main
> go(options) File 
> "/usr/local/pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/supervisor/supervisord.py",
>
> 
line 373, in go
> d.main() File 
> "/usr/local/pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/supervisor/supervisord.py",
>
> 
line 66, in main
> setuid_msg = self.options.set_uid() File 
> "/usr/local/pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/supervisor/options.py",
>
> 
line 1116, in set_uid
> msg = self.dropPrivileges(self.uid) File 
> "/usr/local/pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/supervisor/options.py",
>
> 
line 1145, in dropPrivileges
> os.setgroups(groups) ValueError: too many groups
> 
> This is when running the command: sudo /usr/local/bin/supervisord -n
> -c /usr/local/etc/supervisord.conf
> 
> It runs fine without sudo, as the currently logged-in user, but 
> unfortunately I can't run it as this - I need supervisord to start
> via launchctl.
> 
> Advice?

On my Linux system, Python allows up to 65K groups passed to os.setgroups
(the maximum is inspecatble via os.NGROUPS_MAX)::

 $ python
 Python 2.7.3 (default, Apr 20 2012, 22:39:59)
 [GCC 4.6.3] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import os
 >>> os.NGROUPS_MAX
 65536


First, I would figure out how many groups are assigned to the effective
user, and why the number is so large (by default,

You can then either:

- - Reduce spurious groups granted to the user.

- - Configure a new user which has only the needed groups.

- - Recompile Python with NGROUPS_MAX set to a big enough number to a
  big enough number (e.g., '-D-DNGROUPS_MAX=65536).



Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          [email protected]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/6z+wACgkQ+gerLs4ltQ71fwCgw6bi/I/v6POO8vLQ9ldZROYX
R0YAnRZWcrAvux7v7tDtnhSVFO6kHGwo
=/u1n
-----END PGP SIGNATURE-----
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to