[Puppet Users] How to assure that puppet service starts after puppetserver and puppetdb

2018-02-13 Thread wernerbahlke
We are running Opensource Puppet 4.10.10 on a VM. When booting the VM the 
puppetserver, puppetdb, mcollective all come up fine. But a systemctl 
status puppet shows that it could not run, maybe because the pupperserver 
was not up yet. Any way to assure that it starts later? We tried to changed 
/lib/systemd/system puppet.service and puppetserver.service with Before and 
After statements but to no avail. A systemctl restart puppet starts up the 
service correctly.

Thanks for any hints. Here is the output for systemctl status puppet after 
boot:

● puppet.service - Puppet agent
   Loaded: loaded (/lib/systemd/system/puppet.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Tue 2018-02-13 09:46:31 EST; 50s ago
 Main PID: 1342 (puppet)
Tasks: 2
   Memory: 131.3M
  CPU: 12.333s
   CGroup: /system.slice/puppet.service
   └─1342 /opt/puppetlabs/puppet/bin/ruby 
/opt/puppetlabs/puppet/bin/puppet agent --no-daemonize

Feb 13 09:46:36 puppetmaster puppet-agent[1342]: Starting Puppet client 
version 4.10.10
Feb 13 09:46:36 puppetmaster puppet-agent[1769]: Unable to fetch my node 
definition, but the agent run will continue:
Feb 13 09:46:36 puppetmaster puppet-agent[1769]: Connection refused - 
connect(2) for "10.10.254.1" port 8140
Feb 13 09:46:36 puppetmaster puppet-agent[1769]: 
(/File[/opt/puppetlabs/puppet/cache/facts.d]) Failed to generate additional 
resources using 'eval_generate': Connection refused - connect(2) for 
"10.10.254.1" port 8140
Feb 13 09:46:36 puppetmaster puppet-agent[1769]: 
(/File[/opt/puppetlabs/puppet/cache/facts.d]) Could not evaluate: Could not 
retrieve file metadata for puppet:///pluginfacts: Connection refused - 
connect(2) for "10.10.254.1" port 8140
Feb 13 09:46:37 puppetmaster puppet-agent[1769]: 
(/File[/opt/puppetlabs/puppet/cache/lib]) Failed to generate additional 
resources using 'eval_generate': Connection refused - connect(2) for 
"10.10.254.1" port 8140
Feb 13 09:46:37 puppetmaster puppet-agent[1769]: 
(/File[/opt/puppetlabs/puppet/cache/lib]) Could not evaluate: Could not 
retrieve file metadata for puppet:///plugins: Connection refused - 
connect(2) for "10.10.254.1" port 8140
Feb 13 09:46:45 puppetmaster puppet-agent[1769]: Could not retrieve catalog 
from remote server: Connection refused - connect(2) for "10.10.254.1" port 
8140
Feb 13 09:46:45 puppetmaster puppet-agent[1769]: Applied catalog in 0.05 
seconds
Feb 13 09:46:45 puppetmaster puppet-agent[1769]: Could not send report: 
Connection refused - connect(2) for "10.10.254.1" port 8140


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ba2d9e6f-5f6f-4dc1-9325-95f1333c457b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Problems logging into PE dashboard after inactivity

2014-08-12 Thread wernerbahlke
I have recently noticed the following problem: after long periods of 
inactivity I do not succeed logging into the PE dashboard. Here is the 
error:

https://puppet/api/server_status?ticket=ST-1407871225rFODw30IRUDwdOspCwK

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

Even when executing https:://puppet again Rails always redirects me to this 
url.

Sometimes restarting the Puppet master helps, or I have to go to 
https://puppet/nodes/host name of Puppet master.

Any suggestions will be greatly appreciated.

Werner

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3faf3053-81a5-43ee-806c-df6b5d7f265f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: connection error in console UI

2014-01-10 Thread wernerbahlke
Hi Raj,

I am seeing the same error. Usually a couple of page refreshes will 
eventually get you the page with your classes. But is seems that not all 
classes on your master might be replaced. Not sure yet what the solution 
is, I had filed a bug but Puppet support could not come up with a clear 
solution.

Werner

On Saturday, November 16, 2013 6:40:08 AM UTC-5, Raj kumar V wrote:

 When I click Add Class, I am seeing

 We found these classes on your system [image: Notice]
 [image: Failed]Connection error. We could not find classes on your master.
 Does your puppet master allow querying resource types?
 Don't see a class? [image: Notice]
 Type in a class to add
 What should I fix?


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b78f4de3-55c8-4865-89c7-d99e33d88569%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Problem using hiera-eyaml

2013-12-30 Thread wernerbahlke
Hi Kit,

Thanks for posting. No, I did not resolve it and have put it on the back 
burner. Quite possible that it is a Ruby / gems issue. 

Keep us posted if you resolve it before me.

Werner

On Saturday, December 21, 2013 11:13:46 AM UTC-5, Kit Plummer wrote:

 Did you resolve this?

 I'm having a similar problem.  But, I think it is because the eyaml 
 backend isn't getting loaded :) :

 Cannot load backend eyaml: cannot load such file -- 
 hiera/backend/eyaml_backend

 I'm wondering if this is because the Ruby version/Gems that are used by PE.

 On Friday, December 6, 2013 8:10:35 AM UTC-7, wernerbahlke wrote:

 I am trying to use hiera-eyaml and have followed the README instructions.

 eyaml seems to work, I can encrypt and decrypt files and passwords.

 I can also use hiera -c to get at an encrypted value like so:

 hiera -c /etc/puppetlabs/puppet/hiera.yaml rootpwd 

 But when running this simple test module it fails with cannot find the 
 data item rootpwd defined in hieradata/defaults.eyaml.

 class test {
 $test = hiera('test')
 $rootpwd = hiera('rootpwd')
 notify { Test: ${test}: }
 }
 If I just have the test variable defined in defaults.yaml it works fine. 
 So it cannot find the defaults.eyaml file.

 Here is my hiera.yaml:
 --

 :backends:

- yaml
- eyaml 
- :hierarchy:
   - defaults
   - %{clientcert}
   - %{environment}
   - global 
   - :yaml: :datadir: /etc/puppetlabs/puppet/modules/hieradata 
   - :eyaml: :datadir: /etc/puppetlabs/puppet/modules/hieradata 
   -:pkcs7_private_key: 
   /etc/puppetlabs/puppet/secure/keys/private_key.pkcs7.pem 
   -:pkcs7_public_key: 
   /etc/puppetlabs/puppet/secure/keys/public_key.pkcs7.pem

 And my defaults.eyaml file:
 --

 rootpwd: 
 ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQAwDQYJKoZIhvcNAQE
  
 ...]
 Any hints will be greatly appreciated.

 I am running Puppet Enterprise 3.1.0 on Ubuntu 12.04.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/eed4dd1d-6fc0-4538-b1c5-1621f78ab509%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Problem using hiera-eyaml

2013-12-06 Thread wernerbahlke


I am trying to use hiera-eyaml and have followed the README instructions.

eyaml seems to work, I can encrypt and decrypt files and passwords.

I can also use hiera -c to get at an encrypted value like so:

hiera -c /etc/puppetlabs/puppet/hiera.yaml rootpwd 

But when running this simple test module it fails with cannot find the data 
item rootpwd defined in hieradata/defaults.eyaml.

class test {
$test = hiera('test')
$rootpwd = hiera('rootpwd')
notify { Test: ${test}: }
}
If I just have the test variable defined in defaults.yaml it works fine. So 
it cannot find the defaults.eyaml file.

Here is my hiera.yaml:
--

:backends:

   - yaml
   - eyaml 
   - :hierarchy:
  - defaults
  - %{clientcert}
  - %{environment}
  - global 
  - :yaml: :datadir: /etc/puppetlabs/puppet/modules/hieradata 
  - :eyaml: :datadir: /etc/puppetlabs/puppet/modules/hieradata 
  -:pkcs7_private_key: 
  /etc/puppetlabs/puppet/secure/keys/private_key.pkcs7.pem 
  -:pkcs7_public_key: 
  /etc/puppetlabs/puppet/secure/keys/public_key.pkcs7.pem
   
And my defaults.eyaml file:
--

rootpwd: 
ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQAwDQYJKoZIhvcNAQE
 
...]
Any hints will be greatly appreciated.

I am running Puppet Enterprise 3.1.0 on Ubuntu 12.04.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f09752d0-d67c-4512-9b5f-00c55dc9358e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Windows Pathnames with spaces in Puppet file directive

2013-05-17 Thread wernerbahlke


I have to change a file in c:\Program Files 
x86\MSBuild\Microsoft.Cpp\v4.0. I have tried various ways to encapsule 
the Windows path with spaces but to no avail.

 

The following

 

   file { \c:\\program files 
x86\\MSBuild\\Microsoft.Cpp\\v4.0\\Microsoft.CppCommon.targets\:

  ensure = present,

  source = 
'puppet:///modules/install_programs/Microsoft.CppCommon.targets',

}

 

causes this error:

 

info: Caching catalog for w7entbase.metratech.com

err: Failed to apply catalog: Parameter path failed: File paths must be 
fully qualified, not 'c:\program files 
x86\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets' at 
/etc/puppetlabs/puppet/modules/test/manifests/init.pp:17

 

Any suggestions will be greatly appreciated.


Werner

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Still problem using Chocolatey provider on Windows

2013-03-22 Thread wernerbahlke
I got it to work on Windows 7. On Windows 8 it would not find the provider. 
But the provider does not install the package completely for me yet. As a 
workaround I am using an exec of a powershell script.

On Wednesday, March 20, 2013 6:04:30 PM UTC-4, wernerbahlke wrote:

 As some before me on the group, I have a problem getting the Chocolatey 
 provider to work on Windows.

 I downloaded it from Github and placed it in 
 /etc/puppetlabs/puppet/modules/chocolatey. (I am running Puppet Enterprise 
 2.7.19).

 On a Windows 8 client, I have a very simple manifest:

 class install_notepadplusplus {

   if $::osfamily == 'windows {
 $pkg = 'notepadplusplus'

 package { $pkg:
   ensure   = installed,
   provider = 'chocolatey',
 }
   }
 }

 When I run the agent on the client, I get 

 err: Failed to apply catalog: Parameter provider failed: Invalid package 
 provider 'chocolatey' at ...

 I have pluginsync = true on both master and client which is set by default 
 using PE.

 Any hints will be greatly appreciated.

 Werner


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Still problem using Chocolatey provider on Windows

2013-03-20 Thread wernerbahlke
As some before me on the group, I have a problem getting the Chocolatey 
provider to work on Windows.

I downloaded it from Github and placed it in 
/etc/puppetlabs/puppet/modules/chocolatey. (I am running Puppet Enterprise 
2.7.19).

On a Windows 8 client, I have a very simple manifest:

class install_notepadplusplus {

  if $::osfamily == 'windows {
$pkg = 'notepadplusplus'

package { $pkg:
  ensure   = installed,
  provider = 'chocolatey',
}
  }
}

When I run the agent on the client, I get 

err: Failed to apply catalog: Parameter provider failed: Invalid package 
provider 'chocolatey' at ...

I have pluginsync = true on both master and client which is set by default 
using PE.

Any hints will be greatly appreciated.

Werner

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Puppet freelancers?

2012-07-09 Thread wernerbahlke
Hi Jeremy,

I might be able to help. Currently doing some Puppet consulting work. 
Please drop me a line at werner dot bahlke at gmail.com.

Werner

On Saturday, July 7, 2012 1:05:52 PM UTC-4, JeremyCampbell wrote:

 I run a small shop, around 10 servers and spent some time with Puppet but 
 I'm no programmer. I've created a set of manifests but most have issues and 
 I'm certain that they don't follow best practice etc. I would like to hire 
 a freelancer to both complete the manifests and refactor the existing ones 
 according to best practice. I can't afford to hire Puppetlabs obviously so 
 I was wondering if anyone had any ideas where I might find a freelancer 
 with Puppet expertise. Anyone on this list available? Any advice where to 
 look etc. would be much appreciated. 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/TlgmxSEwODoJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Could not prefetch package provider 'freebsd': No resource and no name in property hash in freebsd instance

2012-03-29 Thread wernerbahlke
Just thought I post the solution which we eventually found.

It has to do with installing the mail/p5-Mail-SpamAssassin package and
how the new package is constructed. When we tried another test and
installed a random package (found in the ports tree) manually and ran
the agent again, we had no problem completing successfully, even
though an unknown package was installed.

The SA rule package is not real in the sense that it comes from the
ports tree and has an entry in the INDEX file that Puppet uses.  The
command that Puppet uses to enumerate packages is missing a piece of
information (the port's origin), and that causes the error that
we've seen.  Any other package installed from the ports tree has an
origin, and Puppet doesn't have a problem, even if it didn't install
it.

We also found that we can prevent the sa-update cron script from
registering the package after it's installed.  This will allow the SA
rules to be updated periodically, but it will also avoid the Puppet
error.

At the very least, we'd love to see a better error message from
Puppet, perhaps including the package name causing the failure.  That
would have tipped us off sooner.

On Mar 26, 10:07 am, wernerbahlke werner.bah...@gmail.com wrote:
 Hi,

 I am puzzled. I installed exim-mysql on a freebsd machine without
 problem before but now this manifest creates an error:

 class exim::install {
   package { [ 'mail/exim-mysql' ]:
     ensure   = installed,
     provider = freebsd,
     source   = 'http://some_url',
   }

 }

 Here is the error:

 err: Could not prefetch package provider 'freebsd': No resource and no
 name in property hash in freebsd instance
 info: Applying configuration version '1332781404'
 err: /Stage[main]/Exim::Install/Package[mail/exim-mysql]: Could not
 evaluate: No resource and no name in property hash in freebsd instance
 err: /Stage[main]/Puppet::Install/Package[sysutils/puppet]: Could not
 evaluate: No resource and no name in property hash in freebsd instance

 I had added new modules but took them all out. I am sure the package
 is installed on the file server. Also, other nodes loading mysql or
 apache work fine.

 Any suggestions?

 Thanks,

 Werner Bahlke

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Could not prefetch package provider 'freebsd': No resource and no name in property hash in freebsd instance

2012-03-26 Thread wernerbahlke
Hi,

I am puzzled. I installed exim-mysql on a freebsd machine without
problem before but now this manifest creates an error:

class exim::install {
  package { [ 'mail/exim-mysql' ]:
ensure   = installed,
provider = freebsd,
source   = 'http://some_url',
  }
}

Here is the error:


err: Could not prefetch package provider 'freebsd': No resource and no
name in property hash in freebsd instance
info: Applying configuration version '1332781404'
err: /Stage[main]/Exim::Install/Package[mail/exim-mysql]: Could not
evaluate: No resource and no name in property hash in freebsd instance
err: /Stage[main]/Puppet::Install/Package[sysutils/puppet]: Could not
evaluate: No resource and no name in property hash in freebsd instance

I had added new modules but took them all out. I am sure the package
is installed on the file server. Also, other nodes loading mysql or
apache work fine.

Any suggestions?

Thanks,

Werner Bahlke

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Creating user with random password (only once)

2012-02-08 Thread wernerbahlke
Hi,

I want to create a user with a random password. Is there a way to only
execute the manifest once when the user does not exist but not once
the user is created?

I know how to create a random password and can use generate to execute
this function (or make it a custom fact provided I get this fact
executed).

So far I call an add_user method define in a users module out of my
base class. Here is the code:

  include users

  users::add_user { 'testuser':
name = 'testuser',
uid  = '777',
password = generate('/usr/local/bin/new_hash'),
shell= '/bin/csh',
groups   = 'testuser',
  }

But alas this will get executed every time the client runs since the
password will have changed due to the new generate call.

One work-around I could think of is to create the user on the client
(FreeBSD) using an exec calling the makepassword and pw command.

Then I could check for existance of the user in the masterpasswd file
with an unless check.

But I much prefer do this with Puppet natively.

Any suggestions will be greatly appreciated.

Werner

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Removing custom facts from Facter

2012-02-07 Thread wernerbahlke
Hi,

I need to remove a custom fact from facter. How to do this? For now, I
set the environment variable FACTER_customfact = something but would
like to get rid of it permanently.

Thanks,

Werner

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.