Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 on Dashboard #2077

Closed
apssupport opened this issue Aug 21, 2016 · 27 comments
Closed

Error 500 on Dashboard #2077

apssupport opened this issue Aug 21, 2016 · 27 comments

Comments

@apssupport
Copy link

Before submitting your issue, please make sure that you've checked the checkboxes below.

  • [✓ ] I am running the latest release version of Cachet.
  • [✓ ] I am running at least PHP 5.5.9. You can check this by running php -v.
  • [✓ ] I have ran rm -rf bootstrap/cache/*.

Expected behaviour

*Should be able to access dashboard.

Actual behaviour

*Getting HTTP Error 500. Looked at past issues, and saw a mention about xml extension. Xml is already installed and running on system.

@ConnorVG
Copy link
Contributor

Is this an altered version of Cachet? Could be to do with how the resolve email was implemented.

@apssupport
Copy link
Author

Yup this is the one we modified yesterday with the resolve email. Could that have caused the backend to stop loading?

@ConnorVG
Copy link
Contributor

I'm unsure how it could but it might be worth removing it to see if it is resolved. If not then the first thing to do would be to share the storage/logs log file that is the latest (https://gist.github.com)

@apssupport
Copy link
Author

Seeing this in the log, not sure if that is the issue:

[2016-08-21 14:35:01] production.ERROR: PDOException: could not find driver in /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:55
Stack trace:
#0 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(55): PDO->__construct('mysql:host=loca...', 'cachet', 'cachet_password', Array)

@ConnorVG
Copy link
Contributor

Ah. Seems your .env is incorrectly configured for your database driver. Ensure that is exists and that the correct db credentials are in there. (be careful not to accidentally post them here, too!)

@apssupport
Copy link
Author

It might sound strange, but I cannot locate my .env file anymore. Looks like I might have to recreate it or something. The other strange part is that the front page works normally. I see all components and groups.

Thank you for pointing me in the right direction.

@apssupport
Copy link
Author

Correction, the .env file is there still. Troubleshooting the file now.

@apssupport
Copy link
Author

apssupport commented Aug 21, 2016

PDO issue was resolved, now log shows this: Sorry for the length of it.

#12 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(58): Illuminate\Database\Console\Migrations\MigrateCommand->prepareDatabase()
#13 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire()
#14 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)
#15 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array)
#16 /var/www/Cachet/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#17 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console$
#18 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(185): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#19 /var/www/Cachet/vendor/graham-campbell/core/src/Subscribers/CommandSubscriber.php(112): Illuminate\Console\Command->call('migrate', Array)
#20 [internal function]: GrahamCampbell\Core\Subscribers\CommandSubscriber->onRunMigrations(Object(GrahamCampbell\Core\Console\Commands\AppUpdate))
#21 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(347): call_user_func_array(Array, Array)
#22 [internal function]: Illuminate\Events\Dispatcher->Illuminate\Events\{closure}(Object(GrahamCampbell\Core\Console\Commands\AppUpdate))
#23 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(221): call_user_func_array(Object(Closure), Array)
#24 /var/www/Cachet/vendor/graham-campbell/core/src/Console/Commands/AppUpdate.php(70): Illuminate\Events\Dispatcher->fire('command.runmigr...', Array)
#25 [internal function]: GrahamCampbell\Core\Console\Commands\AppUpdate->handle()
#26 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)
#27 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array)
#28 /var/www/Cachet/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\C$
#30 /var/www/Cachet/vendor/symfony/console/Application.php(794): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#31 /var/www/Cachet/vendor/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(GrahamCampbell\Core\Console\Commands\AppUpdate), Object(Symfony\Component\Console\Inpu$
#32 /var/www/Cachet/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOu$
#33 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Compo$
#34 /var/www/Cachet/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 {main} {"identification":{"id":"1ad0e48e-4a54-4b46-b490-2dd547632b3b"}}

@ConnorVG
Copy link
Contributor

Could you please post the whole stack trace? And could you please do so in a gist or at-least a code block?

Cheers.

@apssupport
Copy link
Author

My apologies, will provide it in gist. Is there a specific section this is located for cachet?

@apssupport
Copy link
Author

Sorry for the delay, here is the full stack:

https://gist.github.com/apssupport/ce5b3a834b520b8913def5370434fca3

@GrahamCampbell
Copy link
Contributor

You need to install the pdo mysql extension driver, as every exception in that log indicates.

@apssupport
Copy link
Author

apssupport commented Aug 21, 2016

Good evening Graham,

PDO is installed but that hasn't fixed the issue.

 php -i|grep PDO
PDO
PDO support => enabled
PDO drivers => mysql, pgsql
PDO Driver for MySQL => enabled
PDO Driver for PostgreSQL => enabled
PDO

PDO support => enabled
PDO drivers => mysql, pgsql

pdo_mysql

PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $

@apssupport
Copy link
Author

This is the new stack trace:

`Stack trace:
#0 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php(120): Illuminate\Cache\ApcWrapper->flush()
#1 [internal function]: Illuminate\Cache\ApcStore->flush()
#2 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(487): call_user_func_array(Array, Array)
#3 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php(56): Illuminate\Cache\Repository->__call('flush', Array)
#4 [internal function]: Illuminate\Cache\Console\ClearCommand->fire()
#5 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)
#6 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array)
#7 /var/www/Cachet/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#8 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#9 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(185): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#10 /var/www/Cachet/vendor/graham-campbell/core/src/Subscribers/CommandSubscriber.php(137): Illuminate\Console\Command->call('cache:clear')
#11 [internal function]: GrahamCampbell\Core\Subscribers\CommandSubscriber->onUpdateCache(Object(GrahamCampbell\Core\Console\Commands\AppUpdate))
#12 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(347): call_user_func_array(Array, Array)
#13 [internal function]: Illuminate\Events\Dispatcher->Illuminate\Events\{closure}(Object(GrahamCampbell\Core\Console\Commands\AppUpdate))
#14 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(221): call_user_func_array(Object(Closure), Array)
#15 /var/www/Cachet/vendor/graham-campbell/core/src/Console/Commands/AppUpdate.php(71): Illuminate\Events\Dispatcher->fire('command.updatec...', Array)
#16 [internal function]: GrahamCampbell\Core\Console\Commands\AppUpdate->handle()
#17 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)
#18 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array)
#19 /var/www/Cachet/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleO$
#21 /var/www/Cachet/vendor/symfony/console/Application.php(794): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/Cachet/vendor/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(GrahamCampbell\Core\Console\Commands\AppUpdate), Object(Symfony\Component\Console\Input\ArgvInput), Object(S$
#23 /var/www/Cachet/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Co$
#25 /var/www/Cachet/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 {main} {"identification":{"id":"02e6825e-a77a-4bb6-a057-119ebd232f25"}}

`

@apssupport
Copy link
Author

Some progress, I now see the login screen, but get Houston We A Problem after logging in.

@apssupport
Copy link
Author

I got in, had to install PHP 5.6 again, disable PHP 7.0 and enable 5.6.

@ConnorVG
Copy link
Contributor

How did I not see that :facepalm:

@GrahamCampbell
Copy link
Contributor

This is the new stack trace:

You've cut off the top which is the one thing that actually matters?

@ConnorVG
Copy link
Contributor

As a side note, php -i|grep PDO shouldn't be used.

Instead:

  • using php-fpm: php-fpm -m | grep pdo
  • using php-cli: php -m | grep pdo

Don't forget that php-fpm almost always runs from a separate configuration file.

@apssupport
Copy link
Author

@ConnorVG after further working with it last night, if I disabled both php5 and php5.6, php7.0 and cachet together work as well (98%) which I didn't doubt that it won't. I just ran the command you gave and good news, it still shows them installed.

The issue I am now facing is that, from the dashboard if I want to update an incident and change the status to "Fixed" the page goes to a 500 Internal Server Error. At first I thought the zabbix-cachet tigger monitor that I am running stopped functioning, but it seems something in my Cachet is getting 500 internal server error when setting to fixed.

This is what I get from that program, which coincides with what I see in the dashboard.

2016-08-21 21:21:46  INFO: (MainThread) Zabbix Cachet v.0.1 started
2016-08-21 21:21:46  INFO: (MainThread) JSON-RPC Server Endpoint: http://zabbix.pqus.com/zabbix/api_jsonrpc.php
2016-08-21 21:21:48  INFO: (MainThread) Restart triggers_watcher worker
2016-08-21 21:21:48  INFO: (Trigger Watcher) start trigger watcher
2016-08-21 21:33:51  INFO: (Trigger Watcher) Incident Web Platforms | ServiceDesk Service Down (id=12) was created for component id 21.
2016-08-21 21:35:51  ERROR: (Trigger Watcher) ClientHttpError[http://status.pqus.com/api/v1/incidents/12, 500: {"errors":[{"id":"dfda8721-afcf-4750-81bb-cef0535e1dce","status":500,"title":"Internal Server Error","detail":"An error has occurred and this resource cannot be displayed."}]}]

@GrahamCampbell Apologies for cutting off the top of the stack trace, I thought the log started after the message.

@apssupport
Copy link
Author

Just an update on this, looking at the stack trace, it looks like it doesn't like something with the custom file app/Bus/Handlers/Events/Incident/SendIncidentResolvedEmailNotificationHandler.php and throws an exception.

[2016-08-22 14:01:43] production.CRITICAL: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendIncidentResolvedEmailNotificationHandler::handle() must be an instance of CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent, instance of CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent given in /var/www/Cachet/app/Bus/Handlers/Events/Incident/SendIncidentResolvedEmailNotificationHandler.php:50
Stack trace:
#0 [internal function]: CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendIncidentResolvedEmailNotificationHandler->handle(Object(CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent))
#1 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(347): call_user_func_array(Array, Array)
#2 [internal function]: Illuminate\Events\Dispatcher->Illuminate\Events\{closure}(Object(CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent))
#3 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(221): call_user_func_array(Object(Closure), Array)
#4 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(419): Illuminate\Events\Dispatcher->fire('CachetHQ\\Cachet...', Array, false)
#5 /var/www/Cachet/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php(91): event(Object(CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent))
#6 [internal function]: CachetHQ\Cachet\Bus\Handlers\Commands\Incident\UpdateIncidentCommandHandler->handle(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#7 /var/www/Cachet/vendor/alt-three/bus/src/Dispatcher.php(225): call_user_func(Array, Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#8 [internal function]: AltThree\Bus\Dispatcher->AltThree\Bus\{closure}(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#9 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(150): call_user_func(Object(Closure), Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#10 /var/www/Cachet/app/Bus/Middleware/UseDatabaseTransactions.php(35): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#11 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php(527): CachetHQ\Cachet\Bus\Middleware\UseDatabaseTransactions->CachetHQ\Cachet\Bus\Middleware\{closure}(Object(Illuminate\Database\MySqlConnection))
#12 [internal function]: Illuminate\Database\Connection->transaction(Object(Closure))
#13 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(317): call_user_func_array(Array, Array)
#14 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Database\DatabaseManager->__call('transaction', Array)
#15 /var/www/Cachet/app/Bus/Middleware/UseDatabaseTransactions.php(36): Illuminate\Support\Facades\Facade::__callStatic('transaction', Array)
#16 [internal function]: CachetHQ\Cachet\Bus\Middleware\UseDatabaseTransactions->handle(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand), Object(Closure))
#17 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#18 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#19 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#20 /var/www/Cachet/vendor/alt-three/bus/src/Dispatcher.php(226): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#21 /var/www/Cachet/vendor/alt-three/bus/src/Dispatcher.php(201): AltThree\Bus\Dispatcher->dispatchNow(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand), NULL)
#22 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(323): AltThree\Bus\Dispatcher->dispatch(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#23 /var/www/Cachet/app/Http/Controllers/Dashboard/IncidentController.php(245): dispatch(Object(CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand))
#24 [internal function]: CachetHQ\Cachet\Http\Controllers\Dashboard\IncidentController->editIncidentAction(Object(CachetHQ\Cachet\Models\Incident))
#25 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(80): call_user_func_array(Array, Array)
#26 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(146): Illuminate\Routing\Controller->callAction('editIncidentAct...', Array)
#27 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(94): Illuminate\Routing\ControllerDispatcher->call(Object(CachetHQ\Cachet\Http\Controllers\Dashboard\IncidentController), Object(Illuminate\Routing\Route), 'editIncidentAct...')
#28 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#29 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#31 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#32 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(96): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#33 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(54): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(CachetHQ\Cachet\Http\Controllers\Dashboard\IncidentController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'editIncidentAct...')
#34 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Route.php(174): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'CachetHQ\\Cachet...', 'editIncidentAct...')
#35 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Route.php(140): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#36 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Router.php(724): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#37 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#38 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#39 /var/www/Cachet/app/Http/Middleware/Authenticate.php(54): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#40 [internal function]: CachetHQ\Cachet\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#42 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#44 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(64): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#45 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#46 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#47 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#49 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#50 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#52 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#53 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#54 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#55 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#56 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#57 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#58 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#59 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#60 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#62 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#64 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#65 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#67 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#68 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#69 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#70 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#71 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Router.php(726): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#72 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Router.php(699): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#73 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Router.php(675): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#74 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(246): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#75 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#76 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#77 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#78 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#79 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#80 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#81 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#82 /var/www/Cachet/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#83 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#84 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#85 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#86 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#87 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#88 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#89 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#90 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(99): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#91 /var/www/Cachet/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#92 {main} {"identification":{"id":"4baa9e25-2ca6-4330-9043-247626481904"}} 

@ConnorVG
Copy link
Contributor

Then change it to IncidentWasUpdatedEvent (including the use statement). This mistake wouldn't have been made if I wasn't in a rush. Apologies.

@apssupport
Copy link
Author

Hi Connor,

Before I try that, I think the issue might have been how it copied over from the browser to the box. I was comparing them side by side and on my side it was off. I corrected the new files you had created and will test it out soon. If I do need to change it to what you just suggested, which line would I make this change on?

Also, the fact you took time to cook something up like this for me on a Saturday is highly appreciated and no apologies needed!

@apssupport
Copy link
Author

@ConnorVG Ok, scratch that, looks like I will need to update to what you said. When you have time, what needs to be changed to IncidentWasUpdatedEvent ?

@apssupport
Copy link
Author

@ConnorVG I changed the few instances of IncidentWasReportedEvent to IncidentWasUpdatedEvent in that first file and now the good news is that the fixed message goes through from zabbix to cachet as well as the dashboard, but now the initial email of an incident got sent out 17 minutes after the incident occurred. Should I have only changed the first instance, line 14 and not the rest? Would something like this cause email delays? I'll see if the resolved email gets sent out as well delayed. So far that hasn't been sent.
+use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;

@ConnorVG
Copy link
Contributor

Just change this line: https://github.com/ConnorVG/Cachet/commit/d5d0260101d44f6b364b9bc9fafb18b1ed61beb6#diff-e552f0e5b068c915b8e3dbfc607b788cR14

and this line: https://github.com/ConnorVG/Cachet/commit/d5d0260101d44f6b364b9bc9fafb18b1ed61beb6#diff-e552f0e5b068c915b8e3dbfc607b788cR57

That's all you need to do. Change those to IncidentWasUpdatedEvent.

Let's stop this discussion here, it's going a bit too off course.

Cheers,

@apssupport
Copy link
Author

@ConnorVG Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants