This usually happens when you have already issued a puppet agent -t command in a session and the process of applying the catalog isn't complete yet.
In this case, if you have to run puppet agent -t, you need to first remove that lock from the file. Try this:
sudo rm /var/lib/puppet/state/agent_catalog_run.lock
sudo /opt/puppetlabs/bin/puppet agent -t
This should resolve the issue.