Laravel version: 6.5.2
Backup: 6.7.4
PHP: 7.3.2
Cron: $schedule->command('backup:run --only-db')->hourly();
Hello, i've got today that error, tried to reproduce by running backup again, but no success. I thought i turned off mail notifications by these configuration:
'notifications' => [
'notifications' => [
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => [],
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => [],
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => [],
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => [],
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => [],
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => [],
],
/*
* Here you can specify the notifiable to which the notifications should be sent. The default
* notifiable will use the variables specified in this config file.
*/
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
'mail' => [
'to' => '',
],
'slack' => [
'webhook_url' => '',
/*
* If this is set to null the default channel of the webhook will be used.
*/
'channel' => null,
],
],
but according to log it tried to send mail somewhere. I didn't get that error before and after running again there was no error. But definitly something went wrong.
[2019-11-29 07:00:28] production.ERROR: Expected response code 220 but got an empty response {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 220 but got an empty response at /var/www/homepage/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:445)
[stacktrace]
#0 /var/www/homepage/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(358): Swift_Transport_AbstractSmtpTransport->assertResponseCode('', Array)
#1 /var/www/homepage/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(147): Swift_Transport_AbstractSmtpTransport->readGreeting()
#2 /var/www/homepage/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(65): Swift_Transport_AbstractSmtpTransport->start()
#3 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(484): Swift_Mailer->send(Object(Swift_Message), Array)
#4 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(259): Illuminate\\Mail\\Mailer->sendSwiftMessage(Object(Swift_Message))
#5 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php(65): Illuminate\\Mail\\Mailer->send(Object(Illuminate\\Support\\HtmlString), Array, Object(Closure))
#6 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(144): Illuminate\\Notifications\\Channels\\MailChannel->send(Object(Spatie\\Backup\\Notifications\\Notifiable), Object(Spatie\\Backup\\Notifications\\Notifications\\BackupWasSuccessful))
#7 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(103): Illuminate\\Notifications\\NotificationSender->sendToNotifiable(Object(Spatie\\Backup\\Notifications\\Notifiable), '5feeb115-545c-4...', Object(Spatie\\Backup\\Notifications\\Notifications\\BackupWasSuccessful), 'mail')
#8 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\\Notifications\\NotificationSender->Illuminate\\Notifications\\{closure}()
#9 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(105): Illuminate\\Notifications\\NotificationSender->withLocale(NULL, Object(Closure))
#10 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(77): Illuminate\\Notifications\\NotificationSender->sendNow(Array, Object(Spatie\\Backup\\Notifications\\Notifications\\BackupWasSuccessful))
#11 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(39): Illuminate\\Notifications\\NotificationSender->send(Array, Object(Spatie\\Backup\\Notifications\\Notifications\\BackupWasSuccessful))
#12 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\\Notifications\\ChannelManager->send(Object(Spatie\\Backup\\Notifications\\Notifiable), Object(Spatie\\Backup\\Notifications\\Notifications\\BackupWasSuccessful))
#13 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Notifications/EventHandler.php(33): Spatie\\Backup\\Notifications\\Notifiable->notify(Object(Spatie\\Backup\\Notifications\\Notifications\\BackupWasSuccessful))
#14 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(347): Spatie\\Backup\\Notifications\\EventHandler->Spatie\\Backup\\Notifications\\{closure}(Object(Spatie\\Backup\\Events\\BackupWasSuccessful))
#15 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(196): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Spatie\\\\Backup\\\\E...', Array)
#16 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(482): Illuminate\\Events\\Dispatcher->dispatch('Spatie\\\\Backup\\\\E...')
#17 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(279): event(Object(Spatie\\Backup\\Events\\BackupWasSuccessful))
#18 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(712): Spatie\\Backup\\Tasks\\Backup\\BackupJob->Spatie\\Backup\\Tasks\\Backup\\{closure}()
#19 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(282): rescue(Object(Closure), Object(Closure))
#20 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(266): Spatie\\Backup\\Tasks\\Backup\\BackupJob->sendNotification(Object(Spatie\\Backup\\Events\\BackupWasSuccessful))
#21 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php(176): Spatie\\Backup\\Tasks\\Backup\\BackupJob->Spatie\\Backup\\Tasks\\Backup\\{closure}(Object(Spatie\\Backup\\BackupDestination\\BackupDestination), 0)
#22 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(272): Illuminate\\Support\\Collection->each(Object(Closure))
#23 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(151): Spatie\\Backup\\Tasks\\Backup\\BackupJob->copyToBackupDestinations('/var/www/homepage/www/...')
#24 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(52): Spatie\\Backup\\Tasks\\Backup\\BackupJob->run()
#25 [internal function]: Spatie\\Backup\\Commands\\BackupCommand->handle()
#26 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#27 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(34): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#28 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#29 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#30 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#31 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(202): Illuminate\\Container\\Container->call(Array)
#32 /var/www/homepage/www/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#33 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(189): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#34 /var/www/homepage/www/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#35 /var/www/homepage/www/vendor/symfony/console/Application.php(934): Spatie\\Backup\\Commands\\BaseCommand->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#36 /var/www/homepage/www/vendor/symfony/console/Application.php(273): Symfony\\Component\\Console\\Application->doRunCommand(Object(Spatie\\Backup\\Commands\\BackupCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#37 /var/www/homepage/www/vendor/symfony/console/Application.php(149): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#38 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Console/Application.php(90): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#39 /var/www/homepage/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#40 /var/www/homepage/www/artisan(47): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
The error is from your mail service, not the package. Check your mail details if correct and try to change email provider to see if it works
@djunehor i know that this error from mail service. Did you read what i wrote or just checked callstack? I'm UNABLE TO TURN OFF mail notifications, even with this config:
'notifications' => [
'notifications' => [
/*
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => [],
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => [],
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => [],
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => [],
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => [],
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => [],
*/
],
/*
* Here you can specify the notifiable to which the notifications should be sent. The default
* notifiable will use the variables specified in this config file.
*/
'notifiable' => null,
'mail' => [
'to' => null,
],
'slack' => [
'webhook_url' => '',
/*
* If this is set to null the default channel of the webhook will be used.
*/
'channel' => null,
],
],
it still trying to sent it to [email protected]
I can't replicate that behaviour on my installation, which means the settings work for me. Can you try clearing config cache php artisan config:clear, then run php artisan backup:run again.
this error makes me very tired. I try and try all solution but no change ):
hi hi, is this already resolved?
Most helpful comment
this error makes me very tired. I try and try all solution but no change ):