# need to reboot the agent server after installation the agent

I am very new to Puppet and please help me .I have installed puppet and puppetdb with different servers using module.Both are up and running ,please verify the below versions information puppetserver version: 2.7.2 puppetdb version: 4.3.2

then trying to install the agent on RHEL 7 and installed successfully , the version of the agent is puppet agent version :4.9.4

after trying to run the command puppet --version or puppet agent --t and unable run the command and showing below error

after reboot the agent server we are able to run the command .please confirm is it require to reboot the agent server while install the agent first time?

Thanks & Regards, Kotireddy G

edit retag close merge delete

Sort by » oldest newest most voted

In brief, it is not necessary to restart your server. Simply enter another shell by running bash, or log out and log in again., or use the fully qualified path to puppet (e.g. /opt/puppetlabs/bin/puppet agent -tv)

Here's an explanation of why that is necessary:

In Linux you can execute commands two ways. You can either fully specify the path to the executable (e.g. /bin/ls) or by just using the executable name and having the OS find it for you (e.g. ls).

In the second case the OS searches the directories specified in the PATH variable for the executable. Typically this includes /bin, /sbin, /usr/bin, etc. The Puppet executables however are installed in /opt/puppetlabs/bin, which by default is not in the PATH. Installing the Puppet agent adds it to the PATH, but in order to get that new value you need to refresh your shell.

In order to refresh your shell you need to log out and back in, or you need to start a new instance by running bash. Rebooting the server also accomplishes this by forcing you to log back in.

Alternatively you can just specify the full path to the executable (/opt/puppetlabs/bin/puppet) so that you don't need PATH set correctly.

more