laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.54k stars 11.02k forks source link

Self triggered SQS requests on dev #26122

Closed Eugene-Melbourne closed 6 years ago

Eugene-Melbourne commented 6 years ago

I recently updated to latest laravel v5.7.9, on my dev Homestead.

I'm not using queues in my project. QUEUE_DRIVER=sync, I have never touched file \app\Console\Kernel.php and never configured SQS in .env.

But Now I'm getting file worker.log in my project root. It is always empty.

Plus.

My Laravel.log file is getting too big for no reason. Yesterday was Sunday, I did not even switch on my Notebook (Windows 10, it may switch on by itself).

Today, I switched my computer on and find 8 Mb of a log file. First line was 8.752.288 entities of the special character null, then it was

...[2018-10-14 22:07:41] local.ERROR: Error executing "ReceiveMessage" on "https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name"; AWS HTTP error: Client error: `POST https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name` resulted in a `403 Forbidden` response:

the 403 is reasonable, I don't have SQS configured, but why did it started sending something to AWS at 10 pm on Sunday, from my dev homestead?

the last record in the log was dated on [2018-10-14 22:09:27] and it did not continue triggering this stuff on Monday when I started my computer.

Please Help

*Please find full log record below:**

2018-10-14 22:07:41] local.ERROR: Error executing "ReceiveMessage" on "https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name"; AWS HTTP error: Client error: POST https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name resulted in a 403 Forbidden response: <?xml version="1.0"?>SenderI (truncated...) InvalidClientTokenId (client): The security token included in the request is invalid. - <?xml version="1.0"?>SenderInvalidClientTokenIdThe security token included in the request is invalid. blah - blah - blah {"exception":"[object] (Aws\Sqs\Exception\SqsException(code: 0): Error executing \"ReceiveMessage\" on \"https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name\"; AWS HTTP error: Client error: POST https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name resulted in a 403 Forbidden response: <?xml version=\"1.0\"?><ErrorResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\">SenderI (truncated...) InvalidClientTokenId (client): The security token included in the request is invalid. - <?xml version=\"1.0\"?><ErrorResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\">SenderInvalidClientTokenIdThe security token included in the request is invalid.blah - blah - blah at /home/vagrant/code/my_project/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:191, GuzzleHttp\Exception\ClientException(code: 403): Client error: POST https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name resulted in a 403 Forbidden response: <?xml version=\"1.0\"?><ErrorResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\">SenderI (truncated...) at /home/vagrant/code/my_project/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113) [stacktrace]

0 /home/vagrant/code/my_project/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(100): Aws\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\Psr7\Request), Object(Aws\Command), Array)

1 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(203): Aws\WrappedHttpHandler->Aws\{closure}(Array)

2 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler(2, Array, Array)

3 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/RejectedPromise.php(40): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Array)

4 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}()

5 /home/vagrant/code/my_project/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run()

6 /home/vagrant/code/my_project/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick()

7 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true)

8 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn()

9 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending()

10 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList()

11 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending()

12 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList()

13 /home/vagrant/code/my_project/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()

14 /home/vagrant/code/my_project/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()

15 /home/vagrant/code/my_project/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(77): Aws\AwsClient->execute(Object(Aws\Command))

16 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php(120): Aws\AwsClient->__call('receiveMessage', Array)

17 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(247): Illuminate\Queue\SqsQueue->pop('https://sqs.us-...')

18 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(107): Illuminate\Queue\Worker->getNextJob(Object(Illuminate\Queue\SqsQueue), 'your-queue-name')

19 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(102): Illuminate\Queue\Worker->daemon('sqs', 'your-queue-name', Object(Illuminate\Queue\WorkerOptions))

20 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(86): Illuminate\Queue\Console\WorkCommand->runWorker('sqs', 'your-queue-name')

21 [internal function]: Illuminate\Queue\Console\WorkCommand->handle()

22 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)

23 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

24 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))

25 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)

26 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)

27 /home/vagrant/code/my_project/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

28 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

29 /home/vagrant/code/my_project/vendor/symfony/console/Application.php(886): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

30 /home/vagrant/code/my_project/vendor/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

31 /home/vagrant/code/my_project/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

32 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Console/Application.php(89): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

33 /home/vagrant/code/my_project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

34 /home/vagrant/code/my_project/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

35 {main}

"} [2018-10-14 22:07:43] local.ERROR: Error executing "ReceiveMessage" on "https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name"; AWS HTTP error: Client error: POST https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name resulted in a 403 Forbidden response:

laurencei commented 6 years ago

Something is running on your local machine. We cant tell you what it is.

One option is destroy your Homestead box and re-create it, and see if the issue persists.

Eugene-Melbourne commented 6 years ago

You are right it was a supervisor. Thank you very much.

joshuaziering commented 4 years ago

Just for other searchers who might be frustrated:

Make sure there isn't a semi colon ending your superivsord.conf command section. The semi colon was ending up as part of the queue name and freaking everything out

ScholarshipDevelopers commented 2 years ago

Anyone else come across this, this was most likely due to having "...queue:work SQS" in the supervisord config's command... which tells laravel to use SQS connection in the config/queue.php