Closed shankar240698 closed 5 months ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
We’d need the app logs, per the getting help documentation
in my server /storage/logs directory is empty only, There are no log files.
Below is the error shown after enabling of app debug
@throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
return $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
}
/**
Log a query in the connection's query log.
@param string $query
@param array $bindings
@param float|null $time
@return void
*/
public function logQuery($query, $bindings, $time = null)
{
Hi Team,
i want to share anything from my end pls let me know
Please check the permissions on our storage
directory and subdirectories. The app log lives in storage/logs/laravel.log
and if the system can't write to that, you'll find all kinds of odd stuff pop up.
Hi, attached our Log:
[2024-05-30 10:23:05] production.ERROR: Spatie\DbDumper\DbDumper::setPort(): Argument #1 ($port) must be of type int, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 56 {"userId":3,"exception":"[object] (TypeError(code: 0): Spatie\\DbDumper\\DbDumper::setPort(): Argument #1 ($port) must be of type int, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 56 at /var/www/html/vendor/spatie/db-dumper/src/DbDumper.php:120)
[stacktrace]
#0 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php(56): Spatie\\DbDumper\\DbDumper->setPort()
#1 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(30): Spatie\\Backup\\Tasks\\Backup\\DbDumperFactory::createFromConnection()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(742): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::Spatie\\Backup\\Tasks\\Backup\\{closure}()
#3 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(31): Illuminate\\Support\\Collection->mapWithKeys()
#4 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(15): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::createDbDumpers()
#5 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(31): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::createFromArray()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\\Backup\\Commands\\BackupCommand->handle()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#12 /var/www/html/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#14 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\\Console\\Command->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(68): Spatie\\Backup\\Commands\\BaseCommand->run()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\\Console\\Command->runCommand()
#17 /var/www/html/app/Console/Commands/SystemBackup.php(48): Illuminate\\Console\\Command->call()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\SystemBackup->handle()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#24 /var/www/html/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#26 /var/www/html/vendor/symfony/console/Application.php(1040): Illuminate\\Console\\Command->run()
#27 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand()
#28 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application->run()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(186): Illuminate\\Console\\Application->run()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(263): Illuminate\\Console\\Application->call()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Foundation\\Console\\Kernel->call()
#33 /var/www/html/app/Http/Controllers/SettingsController.php(1143): Illuminate\\Support\\Facades\\Facade::__callStatic()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\SettingsController->postBackups()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\\Routing\\Route->run()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#40 /var/www/html/app/Http/Middleware/CheckPermissions.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CheckPermissions->handle()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\AuthenticateSession->handle()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authenticate->handle()
#46 /var/www/html/app/Http/Middleware/AssetCountForSidebar.php(120): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\AssetCountForSidebar->handle()
#48 /var/www/html/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\\Passport\\Http\\Middleware\\CreateFreshApiToken->handle()
#50 /var/www/html/app/Http/Middleware/CheckForTwoFactor.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CheckForTwoFactor->handle()
#52 /var/www/html/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CheckUserIsActivated->handle()
#54 /var/www/html/app/Http/Middleware/CheckLocale.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CheckLocale->handle()
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\\Pipeline\\Pipeline->then()
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\\Routing\\Router->runRouteWithinStack()
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\\Routing\\Router->runRoute()
#66 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\\Routing\\Router->dispatchToRoute()
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\\Routing\\Router->dispatch()
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#69 /var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\\DisableBrowserCache->handle()
#71 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#72 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle()
#73 /var/www/html/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#74 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle()
#75 /var/www/html/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#76 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\PreventBackHistory->handle()
#77 /var/www/html/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#78 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\SecurityHeaders->handle()
#79 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#80 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#81 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#82 /var/www/html/app/Http/Middleware/CheckForDebug.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#83 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CheckForDebug->handle()
#84 /var/www/html/app/Http/Middleware/CheckForSetup.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#85 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CheckForSetup->handle()
#86 /var/www/html/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#87 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle()
#88 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#89 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#90 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#91 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#92 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle()
#93 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#94 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#95 /var/www/html/app/Http/Middleware/NoSessionStore.php(28): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#96 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\NoSessionStore->handle()
#97 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#98 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\\Pipeline\\Pipeline->then()
#99 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#100 /var/www/html/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle()
#101 {main}
"}
What do you have as your DB_PORT in your config?
I had nothing set. Just set it to DB_PORT=3306 and got the same error
I stumbled upon the same issue, both when manually taking a backup through the web interface as well as whilst upgrading using php upgrade.php
My setup is currently running version 6.3.3.
If have chmod -R 777 ./storage
& chown apache:apache ./storage
inside the container because the upgrade script was throwing errors regarding the storage folder permissions (even when setting up a fresh install using git pull):
The following directories/files do not seem writable:
--------------------------------------------------------
✘ PERMISSIONS ERROR: /var/www/html/storage/logs/laravel.log is NOT writable
✘ PERMISSIONS ERROR: /var/www/html/storage/app/backup-temp is NOT writable
--------------------- !! ERROR !! ----------------------
I then had to create the laravel.log
file and the backup-temp
folder manually because they did not exist.
Then I ran the php upgrade.php
again with these errors:
--------------------------------------------------------
STEP 3: Checking directory permissions:
--------------------------------------------------------
√ /var/www/html/bootstrap/cache is writable
√ /var/www/html/storage is writable
√ /var/www/html/storage/logs is writable
√ /var/www/html/storage/logs/laravel.log is writable
√ /var/www/html/storage/framework is writable
√ /var/www/html/storage/framework/cache is writable
√ /var/www/html/storage/framework/sessions is writable
√ /var/www/html/storage/framework/views is writable
√ /var/www/html/storage/app is writable
√ /var/www/html/storage/app/backups is writable
√ /var/www/html/storage/app/backup-temp is writable
√ /var/www/html/storage/private_uploads is writable
√ /var/www/html/public/uploads is writable
--------------------------------------------------------
STEP 4: Backing up database:
--------------------------------------------------------
[2024-06-06 09:40:03] production.ERROR: TypeError: Spatie\DbDumper\DbDumper::setPort(): Argument #1 ($port) must be of type int, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 56 and defined in /var/www/html/vendor/spatie/db-dumper/src/DbDumper.php:120
Stack trace:
#0 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php(56): Spatie\DbDumper\DbDumper->setPort()
#1 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(30): Spatie\Backup\Tasks\Backup\DbDumperFactory::createFromConnection()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(742): Spatie\Backup\Tasks\Backup\BackupJobFactory::Spatie\Backup\Tasks\Backup\{closure}()
#3 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(31): Illuminate\Support\Collection->mapWithKeys()
#4 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(15): Spatie\Backup\Tasks\Backup\BackupJobFactory::createDbDumpers()
#5 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(31): Spatie\Backup\Tasks\Backup\BackupJobFactory::createFromArray()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\Backup\Commands\BackupCommand->handle()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#12 /var/www/html/vendor/symfony/console/Command/Command.php(298): Illuminate\Console\Command->execute()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#14 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\Console\Command->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(68): Spatie\Backup\Commands\BaseCommand->run()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\Console\Command->runCommand()
#17 /var/www/html/app/Console/Commands/SystemBackup.php(50): Illuminate\Console\Command->call()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\SystemBackup->handle()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#24 /var/www/html/vendor/symfony/console/Command/Command.php(298): Illuminate\Console\Command->execute()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#26 /var/www/html/vendor/symfony/console/Application.php(1040): Illuminate\Console\Command->run()
#27 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#28 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\Component\Console\Application->run()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
#31 /var/www/html/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#32 {main}
[2024-06-06 09:40:03] production.ERROR: Spatie\DbDumper\DbDumper::setPort(): Argument #1 ($port) must be of type int, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 56 {"exception":"[object] (TypeError(code: 0): Spatie\\DbDumper\\DbDumper::setPort(): Argument #1 ($port) must be of type int, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 56 at /var/www/html/vendor/spatie/db-dumper/src/DbDumper.php:120)
[stacktrace]
#0 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php(56): Spatie\\DbDumper\\DbDumper->setPort()
#1 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(30): Spatie\\Backup\\Tasks\\Backup\\DbDumperFactory::createFromConnection()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(742): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::Spatie\\Backup\\Tasks\\Backup\\{closure}()
#3 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(31): Illuminate\\Support\\Collection->mapWithKeys()
#4 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(15): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::createDbDumpers()
#5 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(31): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::createFromArray()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\\Backup\\Commands\\BackupCommand->handle()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#12 /var/www/html/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#14 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\\Console\\Command->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(68): Spatie\\Backup\\Commands\\BaseCommand->run()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\\Console\\Command->runCommand()
#17 /var/www/html/app/Console/Commands/SystemBackup.php(50): Illuminate\\Console\\Command->call()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\SystemBackup->handle()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#24 /var/www/html/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#26 /var/www/html/vendor/symfony/console/Application.php(1040): Illuminate\\Console\\Command->run()
#27 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand()
#28 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application->run()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run()
#31 /var/www/html/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#32 {main}
"}
-- Starting backup...
TypeError
Spatie\DbDumper\DbDumper::setPort(): Argument #1 ($port) must be of type int, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 56
at vendor/spatie/db-dumper/src/DbDumper.php:120
116▕ * @param int $port
117▕ *
118▕ * @return $this
119▕ */
➜ 120▕ public function setPort(int $port)
121▕ {
122▕ $this->port = $port;
123▕
124▕ return $this;
+17 vendor frames
18 app/Console/Commands/SystemBackup.php:50
Illuminate\Console\Command::call()
+13 vendor frames
32 artisan:35
Illuminate\Foundation\Console\Kernel::handle()
Something went wrong with your backup. Aborting!
/var/www/html # ls -al storage/app/
total 24
drwxrwxrwx 1 apache apache 4096 Jun 6 09:39 .
drwxrwxrwx 1 apache apache 4096 Mar 27 15:27 ..
-rwxrwxrwx 1 apache apache 23 Mar 27 15:12 .gitignore
drwxrwxr-x 2 apache apache 4096 Jun 6 09:39 backup-temp
lrwxrwxrwx 1 apache root 22 Mar 27 15:27 backups -> /var/lib/snipeit/dumps
Steps to reproduce:
docker-compose up -d
docker exec -it snipeit php upgrade.php
Issue was resolved by adding DB_PORT=3306
to the .env.docker
file as suggested on Discord by @phil-flip.
Glad you're sorted!
Debug mode
Describe the bug
When I want to take the backup for the configuration for Snipe-IT, it shows a 500 server error.
Reproduction steps
Expected behavior
After clicking the generate button do the snipe IT configuration and data backup
Screenshots
No response
Snipe-IT Version
v6.4.0
Operating System
Ubuntu 22.04.4 LTS
Web Server
apache
PHP Version
PHP 8.1.27
Operating System
Windows 11
Browser
Brave
Version
Version 1.65.126 Chromium: 124.0.6367.118 (Official Build) (64-bit)
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
No response