ricbra / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
247 stars 49 forks source link

How to see consumer error? #17

Closed tuttiflirty closed 9 years ago

tuttiflirty commented 9 years ago

Hello, sometimes the error appears in appropriate error log file (defined in the config file) but sometimes I can see only below line in error log. How to see what happens?

2015/07/08 14:55:38 Failed: 
2015/07/08 14:55:38 Error: fork/exec app/console: no such file or directory
ricbra commented 9 years ago

Based on tiny bit of information I have absolutely no clue what's happening or what problem you're experiencing. Please provide more information so I can reproduce the issue.

tuttiflirty commented 9 years ago

Well, the command script is working fine, I tested with simulated serialized message.

My cli consumer can work fine but need to stop/restart it (sometimes queue purge needed):

/rabbitmq-cli-consumer -c /rabbitmq/configuration_error_logger.conf -e "app/console project:consumer:error-logger -e=prod" -V

But there can be a situation when execution fails, without any explicit error and I'm just receiving constantly this message:

tail -f rabbitmq/rabbitmq-cli-consumer/error_log_error.log 
2015/07/08 21:04:24 Failed: 
2015/07/08 21:04:24 Error: fork/exec app/console: no such file or directory
2015/07/08 21:04:24 Failed: 
2015/07/08 21:04:24 Error: fork/exec app/console: no such file or directory
2015/07/08 21:04:24 Failed: 
2015/07/08 21:04:24 Error: fork/exec app/console: no such file or directory
2015/07/08 21:04:24 Failed: 
2015/07/08 21:04:24 Error: fork/exec app/console: no such file or directory
2015/07/08 21:04:24 Failed: 
2015/07/08 21:04:24 Error: fork/exec app/console: no such file or directory
2015/07/08 21:04:24 Failed: 
2015/07/08 21:04:24 Error: fork/exec app/console: no such file or directory
2015/07/08 21:04:24 Failed: 
....

My exchange is a direct type. Version: rabbitmq-cli-consumer version 1.1.0

ricbra commented 9 years ago

According to the error the path does not exist. You're using a relative path: app/console project:consumer:error-logger -e=prod. What happens if you try full path:

/rabbitmq-cli-consumer -c /rabbitmq/configuration_error_logger.conf -e "/home/your-user/app/console project:consumer:error-logger -e=prod" -V
tuttiflirty commented 9 years ago

Yes, seems it was a problem, thank you.

Anyways, I use to receive another kind of error in some cases (but I don't have more precisions):

2015/07/09 11:12:49 Error: fork/exec /domain/current/app/console: argument list too long
2015/07/09 11:12:49 Processing message...
2015/07/09 11:12:49 Failed. Check error log for details.
2015/07/09 11:12:49 Failed: 
2015/07/09 11:12:49 Error: fork/exec /var/www/domain/current/app/console: argument list too long

Similar to the issue #2.

When this error occurs I need to stop the script, purge the queue and relaunch.

ricbra commented 9 years ago

I think the messages you pass around on the queue are too big. You could try to use the compress functionality. I'm closing this issue as this isn't a (new) bug.

tuttiflirty commented 9 years ago

If a changed parameter in config file from Off to On for compression attribute:

[rabbitmq]
host = host
username = user
password = pwd
port=port
queue=log_error
compression=On

but I receive this kind of error now:

2015/07/09 13:59:21 Error: exit status 1
2015/07/09 13:59:21 Compressed message
2015/07/09 13:59:21 Processing message...
2015/07/09 13:59:21 Failed. Check error log for details.
2015/07/09 13:59:21 Failed: 

  [InvalidArgumentException]  
  Invalid input received
tuttiflirty commented 9 years ago

Well, it probably happens when my message is too big, you're right. Still compression doesn't seem to work.