E
E
entermix2015-05-25 20:36:47
linux
entermix, 2015-05-25 20:36:47

Why doesn't curl work in Kohana Minion_Task?

There is a site on Kohana 3.3 and a module that makes requests to an external site using Request
. I need to run this module through cron, I use Minion_Task , but I get an error:

Request_Exception [ 0 ]: Error fetching remote /sys/send.php [ status 0 ] Failure when receiving data from the peer ~ SYSPATH/classes/Kohana/Request/Client/Curl.php [ 102 ]

Why is that? If you run the module not via the command line (Minion_Task), but via SSH manually, everything is OK
Scheduler:
root# /usr/bin/php -q /var/www/mydomain/data/www/mydomain.com/index.php --task=Send
25.05.2015 21:55 start
25.05.2015 21:55 all messages count: 1
Request_Exception [ 0 ]: Error fetching remote /sys/send.php [ status 0 ] Failure when receiving data from the peer ~ SYSPATH/classes/Kohana/Request/Client/Curl.php [ 102 ]

SSH:
[[email protected]~]# /usr/bin/php -q /var/www/mydomain/data/www/mydomain.com/index.php --task=Send
25.05.2015 21:53 start
25.05.2015 21:53 all messages count: 1
25.05.2015 21:53 sent messages count all: 1
25.05.2015 21:53 ok

Scheduler:
root# cd /var/www/mydomain/data/www/mydomain.com/ && /usr/bin/php -q /var/www/mydomain/data/www/mydomain.com/index.php --task=Send
25.05.2015 22:49 start
25.05.2015 22:49 all messages count: 1
Request_Exception [ 0 ]: Error fetching remote /sys/send.php [ status 0 ] Failure when receiving data from the peer ~ SYSPATH/classes/Kohana/Request/Client/Curl.php [ 102 ]

SSH:
[[email protected] ~]# cd /var/www/mydomain/data/www/mydomain.com/ && /usr/bin/php -q /var/www/mydomain/data/www/mydomain.com
/index.php --task=Send
25.05.2015 22:51 start
25.05.2015 22:51 all messages count: 1
25.05.2015 22:51 sent messages count all: 1
25.05.2015 22:51 ok
[[email protected] mydomain.com]#

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
Andrew, 2015-05-26
@caa888

Maybe cron was assigned a task incorrectly?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question