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 when trying to use Gmail for notifications #8231

Closed
2 tasks done
caveni51 opened this issue Jul 15, 2020 · 8 comments
Closed
2 tasks done

Error when trying to use Gmail for notifications #8231

caveni51 opened this issue Jul 15, 2020 · 8 comments
Labels

Comments

@caveni51
Copy link

Please confirm you have done the following before posting your bug report:

Describe the bug
A clear and concise description of what the bug is.
When I go to make a backup (Which should trigger an email notification) I get the, "Whoops and error has occurred" error screen.

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings
  2. Click on backups
  3. Click generate backup
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
I expect, a new file to be created and an email notification be sent.

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Snipe-IT Version
  • OS: [Ubuntu Desktop 18.04]
  • Web Server: [Apache]
  • PHP Version 7.2.24

Desktop (please complete the following information):

  • OS: [MacOS]
  • Browser [Brave]
  • Version [latest]

Error Messages

(1/1) Swift_TransportExceptionConnection could not be established with host artdeptassets@gmail.com :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known

in StreamBuffer.php line 269
at Swift_Transport_StreamBuffer->{closure}(2, 'stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known', '/var/www/snipeit/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php', 272, array('host' => 'tcp://artdeptassets@gmail.com', 'timeout' => 30, 'options' => array(), 'streamContext' => resource, 'errno' => 0, 'errstr' => 'php_network_getaddresses: getaddrinfo failed: Name or service not known'))
at stream_socket_client('tcp://artdeptassets@gmail.com:587', 0, 'php_network_getaddresses: getaddrinfo failed: Name or service not known', 30, 4, resource)in StreamBuffer.php line 272
at Swift_Transport_StreamBuffer->establishSocketConnection()in StreamBuffer.php line 58
at Swift_Transport_StreamBuffer->initialize(array('protocol' => 'tcp', 'host' => 'artdeptassets@gmail.com', 'port' => 587, 'timeout' => 30, 'blocking' => 1, 'tls' => true, 'type' => 1, 'stream_context_options' => array()))in AbstractSmtpTransport.php line 143
at Swift_Transport_AbstractSmtpTransport->start()in Mailer.php line 65
at Swift_Mailer->send(object(Swift_Message), array())in Mailer.php line 451
at Mailer->sendSwiftMessage(object(Swift_Message))in Mailer.php line 235
at Mailer->send(object(HtmlString), array('level' => 'error', 'subject' => 'Failed back up of Snipe-IT', 'greeting' => null, 'salutation' => null, 'introLines' => array('Important: An error occurred while backing up Snipe-IT', 'Exception message: unlink(/var/www/snipeit/storage/app/backup-temp/temp/db-dumps/mysql-snipeit.sql): Permission denied', 'Exception trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'unlink(/var/www...', '/var/www/snipei...', 150, Array) #1 /var/www/snipeit/vendor/spatie/temporary-directory/src/TemporaryDirectory.php(150): unlink('/var/www/snipei...') #2 /var/www/snipeit/vendor/spatie/temporary-directory/src/TemporaryDirectory.php(158): Spatie\TemporaryDirectory\TemporaryDirectory->deleteDirectory('/var/www/snipei...') #3 /var/www/snipeit/vendor/spatie/temporary-directory/src/TemporaryDirectory.php(158): Spatie\TemporaryDirectory\TemporaryDirectory->deleteDirectory('/var/www/snipei...') #4 /var/www/snipeit/vendor/spatie/temporary-directory/src/TemporaryDirectory.php(35): Spatie\TemporaryDirectory\TemporaryDirectory->deleteDirectory('/var/www/snipei...') #5 /var/www/snipeit/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(134): Spatie\TemporaryDirectory\TemporaryDirectory->create() #6 /var/www/snipeit/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(52): Spatie\Backup\Tasks\Backup\BackupJob->run() #7 [internal function]: Spatie\Backup\Commands\BackupCommand->handle() #8 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array) #9 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #10 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #11 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #12 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array) #13 /var/www/snipeit/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle)) #14 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle)) #15 /var/www/snipeit/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput)) #16 /var/www/snipeit/vendor/symfony/console/Application.php(987): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput)) #17 /var/www/snipeit/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput)) #18 /var/www/snipeit/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput)) #19 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput)) #20 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Application.php(177): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput)) #21 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(249): Illuminate\Console\Application->call('backup:run', Object(Illuminate\Support\Collection), NULL) #22 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Foundation\Console\Kernel->call('backup:run') #23 /var/www/snipeit/app/Http/Controllers/SettingsController.php(971): Illuminate\Support\Facades\Facade::__callStatic('call', Array) #24 [internal function]: App\Http\Controllers\SettingsController->postBackups() #25 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array) #26 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('postBackups', Array) #27 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\SettingsController), 'postBackups') #28 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\Routing\Route->runController() #29 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Route->run() #30 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #31 /var/www/snipeit/app/Http/Middleware/CheckPermissions.php(28): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #32 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckPermissions->handle(Object(Illuminate\Http\Request), Object(Closure), 'superuser') #33 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #34 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #35 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure)) #36 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #37 /var/www/snipeit/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #38 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #39 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #40 /var/www/snipeit/app/Http/Middleware/CheckForTwoFactor.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #41 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure)) #42 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #43 /var/www/snipeit/app/Http/Middleware/CheckLocale.php(42): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #44 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure)) #45 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #46 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(68): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #47 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #48 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #49 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #50 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #51 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #52 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #53 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #54 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #55 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #56 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #57 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #58 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route)) #59 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(590): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #60 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #61 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #62 /var/www/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #63 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure)) #64 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #65 /var/www/snipeit/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #66 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\SecurityHeaders->handle(Object(Illuminate\Http\Request), Object(Closure)) #67 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #68 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #69 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #70 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #71 /var/www/snipeit/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #72 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure)) #73 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #74 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #75 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure)) #76 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #77 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #78 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #79 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #80 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #81 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #82 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #83 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #84 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #85 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #86 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #87 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #88 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #89 /var/www/snipeit/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(29): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #90 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Cors\HandlePreflight->handle(Object(Illuminate\Http\Request), Object(Closure)) #91 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #92 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #93 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #94 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #95 /var/www/snipeit/public/index.php(58): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #96 {main}'), 'outroLines' => array(), 'actionText' => null, 'actionUrl' => null, 'message' => object(Message)), object(Closure))in MailChannel.php line 64
at MailChannel->send(object(Notifiable), object(BackupHasFailed))in NotificationSender.php line 113
at NotificationSender->sendToNotifiable(object(Notifiable), '5dbf9d5a-a7b5-440f-919e-53228be8da03', object(BackupHasFailed), 'mail')in NotificationSender.php line 89
at NotificationSender->sendNow(array(object(Notifiable)), object(BackupHasFailed))in NotificationSender.php line 64
at NotificationSender->send(array(object(Notifiable)), object(BackupHasFailed))in ChannelManager.php line 35
at ChannelManager->send(object(Notifiable), object(BackupHasFailed))in RoutesNotifications.php line 18
at Notifiable->notify(object(BackupHasFailed))in EventHandler.php line 33
at EventHandler->Spatie\Backup\Notifications{closure}(object(BackupHasFailed))in Dispatcher.php line 350
at Dispatcher->Illuminate\Events{closure}('Spatie\Backup\Events\BackupHasFailed', array(object(BackupHasFailed)))in Dispatcher.php line 200
at Dispatcher->dispatch('Spatie\Backup\Events\BackupHasFailed')in helpers.php line 467
at event(object(BackupHasFailed))in BackupCommand.php line 59
at BackupCommand->handle()
at call_user_func_array(array(object(BackupCommand), 'handle'), array())in BoundMethod.php line 29
at BoundMethod::Illuminate\Container{closure}()in BoundMethod.php line 87
at BoundMethod::callBoundMethod(object(Application), array(object(BackupCommand), 'handle'), object(Closure))in BoundMethod.php line 31
at BoundMethod::call(object(Application), array(object(BackupCommand), 'handle'), array(), null)in Container.php line 549
at Container->call(array(object(BackupCommand), 'handle'))in Command.php line 183
at Command->execute(object(ArrayInput), object(OutputStyle))in Command.php line 255
at Command->run(object(ArrayInput), object(OutputStyle))in Command.php line 170
at Command->run(object(ArrayInput), object(BufferedOutput))in BaseCommand.php line 16
at BaseCommand->run(object(ArrayInput), object(BufferedOutput))in Application.php line 987
at Application->doRunCommand(object(BackupCommand), object(ArrayInput), object(BufferedOutput))in Application.php line 255
at Application->doRun(object(ArrayInput), object(BufferedOutput))in Application.php line 148
at Application->run(object(ArrayInput), object(BufferedOutput))in Application.php line 88
at Application->run(object(ArrayInput), object(BufferedOutput))in Application.php line 177
at Application->call('backup:run', object(Collection), null)in Kernel.php line 249
at Kernel->call('backup:run')in Facade.php line 221
at Facade::__callStatic('call', array('backup:run'))in SettingsController.php line 971
at SettingsController->postBackups()
at call_user_func_array(array(object(SettingsController), 'postBackups'), array())in Controller.php line 54
at Controller->callAction('postBackups', array())in ControllerDispatcher.php line 45
at ControllerDispatcher->dispatch(object(Route), object(SettingsController), 'postBackups')in Route.php line 212
at Route->runController()in Route.php line 169
at Route->run()in Router.php line 658
at Router->Illuminate\Routing{closure}(object(Request))in Pipeline.php line 30
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckPermissions.php line 28
at CheckPermissions->handle(object(Request), object(Closure), 'superuser')in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in Authenticate.php line 43
at Authenticate->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CreateFreshApiToken.php line 49
at CreateFreshApiToken->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForTwoFactor.php line 49
at CheckForTwoFactor->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckLocale.php line 42
at CheckLocale->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in VerifyCsrfToken.php line 68
at VerifyCsrfToken->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in Pipeline.php line 102
at Pipeline->then(object(Closure))in Router.php line 660
at Router->runRouteWithinStack(object(Route), object(Request))in Router.php line 635
at Router->runRoute(object(Request), object(Route))in Router.php line 601
at Router->dispatchToRoute(object(Request))in Router.php line 590
at Router->dispatch(object(Request))in Kernel.php line 176
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))in Pipeline.php line 30
at Pipeline->Illuminate\Routing{closure}(object(Request))in InjectDebugbar.php line 65
at InjectDebugbar->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in SecurityHeaders.php line 26
at SecurityHeaders->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForDebug.php line 25
at CheckForDebug->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForSetup.php line 27
at CheckForSetup->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in TrustProxies.php line 57
at TrustProxies->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in StartSession.php line 63
at StartSession->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in HandlePreflight.php line 29
at HandlePreflight->handle(object(Request), object(Closure))in Pipeline.php line 149
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in Pipeline.php line 102
at Pipeline->then(object(Closure))in Kernel.php line 151
at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 116
at Kernel->handle(object(Request))in index.php line 58

Additional context
-This is a fresh install. All I have done is imported Assets and Users. ~70 and ~50 respectively

  • I used the install sh to install SnipeIT
  • I have not edited any data directly in the database

Screen Shot 2020-07-15 at 11 54 20 AM

Add any other context about the problem here.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

My mail config looks as follows:

--------------------------------------------

REQUIRED: OUTGOING MAIL SERVER SETTINGS

--------------------------------------------

MAIL_DRIVER=smtp
MAIL_HOST=OUREMAIL@gmail.com
MAIL_PORT=587
MAIL_USERNAME=OUREMAIL@gmail.com
MAIL_PASSWORD=APPGENERATEDPASSWORD(This is apparently the route Gmail wants me to go since I have 2FA on the account)
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDR=OUREMAIL@gmail.com
MAIL_FROM_NAME='Snipe-IT'
MAIL_REPLYTO_ADDR=OUREMAIL@gmail.com
MAIL_REPLYTO_NAME='Snipe-IT'
MAIL_BACKUP_NOTIFICATION_ADDRESS=OUREMAIL@gmail.com

@Relix360
Copy link

try this

MAIL_DRIVER=smtp
MAIL_HOST=smtp@gmail.com
MAIL_PORT=587
MAIL_USERNAME=OUREMAIL@gmail.com
MAIL_PASSWORD=APPGENERATEDPASSWORD(This is apparently the route Gmail wants me to go since I have 2FA on the account)
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDR=OUREMAIL@gmail.com
MAIL_FROM_NAME='Snipe-IT'
MAIL_REPLYTO_ADDR=OUREMAIL@gmail.com
MAIL_REPLYTO_NAME='Snipe-IT'
MAIL_BACKUP_NOTIFICATION_ADDRESS=OUREMAIL@gmail.com

@caveni51
Copy link
Author

@Relix360 Thanks for the response. I mistyped when I entered that portion of the .env into my original post, so I changed the MAIL_HOST and ran again and got the same error.

I did notice something strange in the stacktrace however. I saw this error (LOG.error: Connection could not be established with host smtp@gmail.com :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known {"userId":1,"email":"OLDEMAIL@YOURDOMAIN.COM","exception":{}}) where the "OLDEMAIL@YOURDOMAIN" has since been purged from my .env and from my settings in Settings --> Notifications --> CC email settings. My point being, my instance of snipeIT shouldn't be trying to contact that email. Is there something I need to do while troubleshooting to clear out cache when I change a setting and go to reproduce the issue?

What I have been doing is just running:
php artisan config:clear
systemctl restart apache2
In the command line in between trying troubleshooting steps. Is this the correct procedure or is there somthing else that I should be doing?

@Relix360
Copy link

try changing the .evn and then run this 2 commands

php artisan config:clear
php artisan config:cache

@caveni51
Copy link
Author

try changing the .evn and then run this 2 commands

php artisan config:clear
php artisan config:cache

I ran both of these commands and my console returned:
Configuration cache cleared!
Configuration cached successfully!

I went back to run SnipeIT after restarting my Apache web server. I received the same exception ({"userId":1,"email":"OLDEMAIL@YOURDOMAIN.COM","exception":{}}) where the "OLDEMAIL@YOURDOMAIN" has since been purged from my .env and from my settings in Settings --> Notifications --> CC email settings.) when trying to make a backup. Oddly enough, I also received the same error referencing "OLDEMAIL@YOURDOMAIN.com" I am not sure what is holding onto this credential, but I have a feeling it has to do with why things aren't working.

@caveni51
Copy link
Author

So, I tried just setting the 'MAIL_BACKUP_NOTIFICATION_ADDRESS=' to null to get around this issue, and now I only get an error within the Snipe-IT web GUI. It says ' Error: Starting backup... Backup failed because: unlink(/var/www/snipeit/storage/app/backup-temp/temp/db-dumps/mysql-snipeit.sql): Permission denied.'

I also ran:
php artisan snipeit:backup -vvv
from the CLI and got the same error. ( Error: Starting backup... Backup failed because: unlink(/var/www/snipeit/storage/app/backup-temp/temp/db-dumps/mysql-snipeit.sql): Permission denied.)

@boring10
Copy link

Try doing chmod -R 775 on your backup-temp directory to ensure that there is rwxrwxr-x.

I'm not certain but I believe that items inside your backup-temp can be deleted since I think that is the staging area for when the backup is being generated before being bundled as a zip in the backups directory.

@stale
Copy link

stale bot commented Sep 20, 2020

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

@stale stale bot added the stale label Sep 20, 2020
@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.

@stale stale bot closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants