New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default group does not exist #1253

Closed
sbagmeijer opened this Issue Jul 31, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@sbagmeijer

sbagmeijer commented Jul 31, 2014

Hello,

I have some problem with the new version it keeps giving me a group error, I upgraded from 4.0.45 to the new 4.0.48 below the details:

Passenger 4.0.45:
[ 2014-07-31 11:00:57.6187 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2014-07-31 11:01:05.4856 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'test-http', 'default_python' => 'python', 'default_ruby' => '/www/test-http/.rvm/wrappers/ruby-2.1.2@testing/ruby', 'default_user' => 'test-http', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/etc/nginx/modules/passenger', 'passenger_version' => '4.0.45', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.45', 'web_server_pid' => '2543', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '230', 'web_server_worker_uid' => '230' }
[ 2014-07-31 11:01:05.5103 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.2543/generation-0/request
[ 2014-07-31 11:01:05.5299 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.2543/generation-0/logging
[ 2014-07-31 11:01:05.5307 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!

No problems with 4.0.45 it all runs perfect, after the upgrade I get the error below.

Passenger 4.0.48:
[ 2014-07-31 10:59:34.4174 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'test-http', 'default_python' => 'python', 'default_ruby' => '/www/test-http/.rvm/wrappers/ruby-2.1.2@testing/ruby', 'default_user' => 'test-http', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/etc/nginx/modules/passenger', 'passenger_version' => '4.0.48', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.48', 'web_server_pid' => '2269', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '230', 'web_server_worker_uid' => '230' }
2014/07/31 10:59:34 [alert] 2269#0: Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Default group 'test-http' does not exist. (-1: Unknown error)

This is my passenger.conf:
passenger_root /etc/nginx/modules/passenger;
passenger_ruby /www/test-http/.rvm/wrappers/ruby-2.1.2@testing/ruby;
passenger_default_user test-http;
passenger_default_group test-http;

The config was not changed I use the same for both versions.

Is this a bug in the new version or was something changed that i missed perhaps?, after downgrading back to 4.0.45 it works again without issues. Also the group and the user does exist I have double checked this.

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Aug 4, 2014

Member

In 4.0.48, we use getgrnam_r() to lookup group information, instead of getgrnam(). This change was made in order to fix a race condition.

What OS are you on?

Member

FooBarWidget commented Aug 4, 2014

In 4.0.48, we use getgrnam_r() to lookup group information, instead of getgrnam(). This change was made in order to fix a race condition.

What OS are you on?

@sbagmeijer

This comment has been minimized.

Show comment
Hide comment
@sbagmeijer

sbagmeijer Aug 4, 2014

Hi thank you for the reply, we are using RHEL6 on our systems.

sbagmeijer commented Aug 4, 2014

Hi thank you for the reply, we are using RHEL6 on our systems.

@aaron-bru

This comment has been minimized.

Show comment
Hide comment
@aaron-bru

aaron-bru Aug 10, 2014

Experiencing the same issue upgrading from Passenger 4.0.17 to 4.0.48 on OpenSUSE 12.2

Was able to workaround using passenger_user and passenger_group in http block.

Some quick googling and looking at the code revealed that passenger is not using the _SC_GETGR_R_SIZE_MAX config properly, as described in http://tomlee.co/2012/10/problems-with-large-linux-unix-groups-and-getgrgid_r-getgrnam_r/
The group I'm using in nginx is not larger than 1024, however I do have other groups that are, not sure if that's exactly it or not. @sbagmeijer do you have any long group lists on your system?

aaron-bru commented Aug 10, 2014

Experiencing the same issue upgrading from Passenger 4.0.17 to 4.0.48 on OpenSUSE 12.2

Was able to workaround using passenger_user and passenger_group in http block.

Some quick googling and looking at the code revealed that passenger is not using the _SC_GETGR_R_SIZE_MAX config properly, as described in http://tomlee.co/2012/10/problems-with-large-linux-unix-groups-and-getgrgid_r-getgrnam_r/
The group I'm using in nginx is not larger than 1024, however I do have other groups that are, not sure if that's exactly it or not. @sbagmeijer do you have any long group lists on your system?

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Aug 11, 2014

Member

Damn, we are using _SC_GETGR_R_SIZE_MAX. The man page fooled me. I guess I'll just allocate 128 KB or something.

Member

FooBarWidget commented Aug 11, 2014

Damn, we are using _SC_GETGR_R_SIZE_MAX. The man page fooled me. I guess I'll just allocate 128 KB or something.

@FooBarWidget FooBarWidget added this to the 4.0.49 milestone Aug 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment