I configured my rsync daemon to be restarted when the rsyncd configuration file changes. When the rsync daemon gets restarted by puppet, it listens on the same port puppetd does, so running puppetd again results in an error. The init script for rsync is small and can not be changed from puppet (all variables are declared within the init script and it only searches for the path where the rsync executable file is located). This is the full output: 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 CCMT-A --server CCMT-A 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 CCMT-A --server CCMT-A 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 _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 12 January 2007 10:18, Koen Vereeken wrote:> 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> 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/rsyncThat looks as if rsyncd inherits the open port from puppetd via fork and exec, but I have no clue how Kernel.system() works under ruby. Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFp5be/Pp1N6Uzh0URAhTyAJsFw0yB+KsAkCgRAXqe67UIBAautgCgj6vr JN+xMKqjHZo55w7TGl8MAbY=sHwG -----END PGP SIGNATURE----- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Jan 12, 2007, at 8:18 PM, Koen Vereeken wrote:> I configured my rsync daemon to be restarted when the rsyncd > configuration file changes. > When the rsync daemon gets restarted by puppet, it listens on the > same port puppetd does, so running puppetd again results in an error. > The init script for rsync is small and can not be changed from > puppet (all variables are declared within the init script and it > only searches for the path where the rsync executable file is > located).[snip]> 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/rsyncThis is very odd. It must be that the open port is inherited as an open filehandle by the child process, and is probably a result of the recent switch to using fork instead of just a straight system() call. I would have never figured that open ports would be retained. Hmm. Can you file this as a bug? It''ll be a bit difficult to isolate into a clean test, but it''s clearly a problem. -- Sabbagh''s Second Law: The biggest problem with communication is the illusion that it has occurred. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com