rollbar-php
rollbar-php copied to clipboard
Error when running rollbar-agent service
I'm trying to use rollbar-agent for asynchronous log reporting for php project (Using Codeigniter framework).
Whenever I try to start the rollbar-agent service below error is logged in /var/log/rollbar-agent.log
/usr/bin/python: can't find '__main__' module in '/usr/local/rollbar-agent'
Can anyone help me out?
This tells us Python can't find the rollbar-agent entry point to execute. There are a few reasons this could be.
- The symbolic link path is incorrect https://github.com/rollbar/rollbar-agent#set-up-the-rollbar-agent-service.
- There was an error setting up the virtual environment. If some of the files were not copied correctly, that could result in that issue.
If you run ls in your terminal inside the virtual environment directory you should see the following files from rollbar-agent.
LICENSE
requirements.txt
rollbar-agent
rollbar-agent-init.sh
rollbar-agent.conf
To test it you should be able to test the agent is running by following these steps...
- Activate the virtual environment.
source ./<venv name>/bin/activateshould do the trick. - Start the agent manually
python rollbar-agent. You may need to run with escalated permissions. - Once you are done you can deactivate the virtual environment with the
deactivatecommand.
Thank you for replying @danielmorell !!
I'm not using virtual environment.
When I tried running python rollbar-agent it worked perfectly, Application error log files were getting parsed and I received the Rollbar notifications over email as well.
But when I start the Rollbar service using service rollbar-agent start , Application error logs are not getting parsed and same error which I mentioned in above question is getting logged in /var/log/rollbar-agent.log
Can you provide the contents of your rollbar-agent service file?
What do you get when you run...
$ service rollbar-agent status
I am going to close this issue due to inactivity.