Bug #440
port inheritage
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.22.1 | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
This doesn’t seem to occur on any daemon that gets restarted by puppet (eg. when restarting httpd, but it does when restarting rsyncd).
First everything looks normal:
-bash-3.00# netstat -alp|grep rsync tcp 0 0 *:rsync *:* LISTEN 9877/rsync tcp 0 0 *:rsync *:* LISTEN 9877/rsync
I run puppetd which will update my rsyncd.conf file and restart the rsync daemon:
-bash-3.00# puppetd --test --serve serv1 --server serv1 info: Starting handler for Runner info: Starting server for Puppet version 0.22.0 info: Listening on port 8139 notice: Ignoring --listen on onetime run info: Caching configuration at /var/lib/puppet/localconfig.yaml notice: Starting configuration run info: //serv1./systemimager/File[/etc/systemimager/rsyncd.conf]: Filebucketed to backup with sum 720e2bc25914a472146ccc05c1a3ec42 notice: /serv1./systemimager/File[/etc/systemimager/rsyncd.conf]/source: replacing from source puppet://serv2/overrides/etc/systemimager/rsyncd.conf info: //serv1./systemimager/File[/etc/systemimager/rsyncd.conf]: Scheduling refresh of Service[systemimager-server-rsyncd] notice: //serv1./systemimager/Service[systemimager-server-rsyncd]: Triggering 'refresh' from 1 dependencies notice: Finished configuration run in 7.78 seconds
Then I try to run puppetd again:
-bash-3.00# puppetd --test --serve serv1 --server serv1 info: Starting handler for Runner info: Starting server for Puppet version 0.22.0 Address already in use - bind(2) /usr/lib/ruby/1.8/webrick/utils.rb:70:in @create_listeners' /usr/lib/ruby/1.8/webrick/ssl.rb:87:in @listen' /usr/lib/ruby/1.8/webrick/server.rb:63:in @initialize' /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in @initialize' /usr/lib/site_ruby/1.8/puppet/server.rb:129:in @initialize' /usr/sbin/puppetd:390:in @new' /usr/sbin/puppetd:390
Now netstat gives the following output:
-bash-3.00# netstat -alp|grep rsync tcp 0 0 *:rsync *:* LISTEN 9519/rsync tcp 0 0 *:8139 *:* LISTEN 9519/rsync tcp 0 0 *:rsync *:* LISTEN 9519/rsync
Restarting the rsync daemon solves this issue:
-bash-3.00# /etc/init.d/systemimager-server-rsyncd restart Stopping rsync daemon for systemimager: rsync. Starting rsync daemon for systemimager: rsync. -bash-3.00# netstat -alp|grep rsync tcp 0 0 *:rsync *:* LISTEN 9877/rsync tcp 0 0 *:rsync *:* LISTEN 9877/rsync
Something else: when trying to restart apache I get the following bug:
info: //ccmt-b./webserver/File[/etc/httpd/conf.d/repo.conf]: Scheduling refresh of Service"notice: //ccmt-b./webserver/Service[httpd":httpd]: Triggering 'refresh' from 1 dependencies err: Found a bug: stack level too deep
However, the httpd daemon gets restarted though.
- Koen Vereeken
History
Updated by Luke Kanies over 5 years ago
- Status changed from 1 to Closed
- 7 set to fixed
Fixed in r2120.
The basic problem is that
close_on_execdoes not appear to be being set on the open sockets, even though Webrick explicitly sets it. Trying to set it manually does no apparent good, at least in 1.8.4 on Debian.
The best long-term solution is to figure out why this isn’t working and to fix it. The almost-as-good long-term solution is to store a reference to all running listeners and close them explicitly, rather than iterating over all objects just to find the listeners. However, this is “good enough”, IMO.