paulS
2012-Feb-21 19:59 UTC
[Puppet Users] white space in fileservers.conf file causes ''connection refused - connect(2)'' error
This is a heads up. I didn''t see this particular root cause to the ''connection refused'' error upon google search, so thought I''d pass it on. I tried to make a bug report, but couldn''t figure out how to do that. I may not have permission. Arguably it''s a ''sensitivity,'' though an undocumented one. ### Error seen root@puppet-client-1:~# puppet agent --no-daemonize --verbose -- onetime # returned the error: err: Could not retrieve catalog from remote server: Connection refused - connect(2) ### Troubleshooting # Cleaned certificates and keys from the puppetmaster and certificates from the agent. # Restarted the puppetmaster to re-create certificates and keys on the puppetmaster. # to request a new signed certificate from the puppetmaster. root@puppet-client-1:~# puppet agent --no-daemonize --verbose -- onetime # Returned the error: err: Could not request certificate: Connection refused - connect(2) # Also getting the following errors upon puppetmaster restart. root@puppetmaster # puppet master --no-daemonize --verbose notice: Starting Puppet master version 2.7.9 err: Removing mount files: /etc/puppet/files does not exist info: mount[stacks]: allowing * access Could not run: Invalid pattern * at /etc/puppet/fileserver.conf:5 ### Root cause Traced the problem to an extra space after [files] mountpoint path statement in in fileservers.conf I did in fact edit that file to add a custom mountpoint. I don’t think I got the connect error right away, however, because I used the custom mountpoint successfully in a connect from the agent to install the configuration package. Perhaps it occurs after restart of the puppetmaster. The error is reproducible. I can take the space in and out and reproduce and repair the error. '':set list'' will show the extra space. Note the extra space between ''path /etc/puppet/files'' and ''$'' in the files mountpoint, and between ''allow *'' and ''$'' in the custom mountpoint. The first one cased the problem. user@puppetmaster:/etc/puppet# vi fileserver.conf :set list -- snip --- [files]$ path /etc/puppet/files $ # allow *.example.com # deny *.evil.example.com # allow 192.168.0.0/24 [stacks] path /opt/stacks allow * $ -- snip -- Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Craig White
2012-Feb-21 21:30 UTC
Re: [Puppet Users] white space in fileservers.conf file causes ''connection refused - connect(2)'' error
On Feb 21, 2012, at 12:59 PM, paulS wrote:> This is a heads up. I didn''t see this particular root cause to the > ''connection refused'' error upon google search, so thought I''d pass it > on. I tried to make a bug report, but couldn''t figure out how to do > that. I may not have permission. Arguably it''s a ''sensitivity,'' though > an undocumented one. > > ### Error seen > > root@puppet-client-1:~# puppet agent --no-daemonize --verbose -- > onetime # returned the error: > > err: Could not retrieve catalog from remote server: Connection > refused - connect(2) > > ### Troubleshooting > > # Cleaned certificates and keys from the puppetmaster and certificates > from the agent. > # Restarted the puppetmaster to re-create certificates and keys on the > puppetmaster. > > # to request a new signed certificate from the puppetmaster. > root@puppet-client-1:~# puppet agent --no-daemonize --verbose -- > onetime # Returned the error: > > err: Could not request certificate: Connection refused - connect(2) > > # Also getting the following errors upon puppetmaster restart. > > root@puppetmaster # puppet master --no-daemonize --verbose > notice: Starting Puppet master version 2.7.9 > err: Removing mount files: /etc/puppet/files does not exist > info: mount[stacks]: allowing * access > Could not run: Invalid pattern * at /etc/puppet/fileserver.conf:5 > > ### Root cause > > Traced the problem to an extra space after [files] mountpoint path > statement in in fileservers.conf > I did in fact edit that file to add a custom mountpoint. I don’t think > I got the connect error right away, however, because I used the custom > mountpoint successfully in a connect from the agent to install the > configuration package. Perhaps it occurs after restart of the > puppetmaster. > > The error is reproducible. I can take the space in and out and > reproduce and repair the error. '':set list'' will show the extra space. > Note the extra space between ''path /etc/puppet/files'' and ''$'' in the > files mountpoint, and between ''allow *'' and ''$'' in the custom > mountpoint. The first one cased the problem. > > user@puppetmaster:/etc/puppet# vi fileserver.conf > :set list > > -- snip --- > [files]$ > path /etc/puppet/files $ > # allow *.example.com > # deny *.evil.example.com > # allow 192.168.0.0/24 > > [stacks] > path /opt/stacks > allow * $ > -- snip ------ not sure what you are trying to accomplish here but if you don''t have something specific in mind at this point just comment everything out in /etc/puppet/fileserver.conf Craig -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
paulS
2012-Feb-21 22:17 UTC
[Puppet Users] Re: white space in fileservers.conf file causes ''connection refused - connect(2)'' error
I''m checking out a stacks directory from subversion into /opt/stacks on the puppet master then mounting /opt/stacks. The stacks directory contains configuration files for the server stacks, which I''ll want to manage with Puppet. I''m not yet using the [file] mount but am using the [stacks] mount, so I could comment out the file mount. My main point was that one wants to be sure they do not leave any spaces after the path definition, as (I think) after restarting the puppet master the agents will no long connect. Paul On Feb 21, 1:30 pm, Craig White <craig.wh...@ttiltd.com> wrote:> > ---- > not sure what you are trying to accomplish here but if you don''t have something specific in mind at this point just comment everything out in /etc/puppet/fileserver.conf > > Craig-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.