Puppet error : Could not create master.pid

try: puppet agent --test --server localhost

if that works then you don't have the server parameter set properly in your puppet agent config.