500: Server Error after update

Version v5.11.28

Environment

Ubuntu 24.04.2 LTS
installed version: v5.11.28
trying to get to v5.11.40

Describe the bug

When trying to update, I get a popup with the error:

500: Server Error

Steps To Reproduce

Try to update

Expected Behavior

Update

Logs

This is a VM that is using ZFS snapshots.
I rolled it back.

These errors exist BEFORE I try to update.
There are NO additional errors after I try to update.

So maybe these errors are totally unrelated.

From the webGUI system checker:

[2025-02-14 08:16:39] production.ERROR: SQLSTATE[HY000] [2002] No such file or directory {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:66)

laravel.log:

[2025-02-14 08:16:39] production.ERROR: SQLSTATE[HY000] [2002] No such file or directory {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:66)

[stacktrace]

#0 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(66): PDO->__construct()

#1 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(85): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()

#2 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection()

#3 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()

#4 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(185): Illuminate\\Database\\Connectors\\MySqlConnector->connect()

#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()

#6 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1231): call_user_func()

#7 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(187): Illuminate\\Database\\Connection->getPdo()

#8 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(153): Illuminate\\Database\\Connection->handleBeginTransactionException()

#9 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(127): Illuminate\\Database\\Connection->createTransaction()

#10 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(26): Illuminate\\Database\\Connection->beginTransaction()

#11 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(226): Illuminate\\Database\\Connection->transaction()

#12 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(351): Illuminate\\Queue\\DatabaseQueue->pop()

#13 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(366): Illuminate\\Queue\\Worker->Illuminate\\Queue\\{closure}()

#14 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(164): Illuminate\\Queue\\Worker->getNextJob()

#15 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(149): Illuminate\\Queue\\Worker->daemon()

#16 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(132): Illuminate\\Queue\\Console\\WorkCommand->runWorker()

#17 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()

#18 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()

#19 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()

#20 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()

#21 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\\Container\\BoundMethod::call()

#22 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call()

#23 /usr/share/nginx/invoiceninja/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute()

#24 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run()

#25 /usr/share/nginx/invoiceninja/vendor/symfony/console/Application.php(1094): Illuminate\\Console\\Command->run()

#26 /usr/share/nginx/invoiceninja/vendor/symfony/console/Application.php(342): Symfony\\Component\\Console\\Application->doRunCommand()

#27 /usr/share/nginx/invoiceninja/vendor/symfony/console/Application.php(193): Symfony\\Component\\Console\\Application->doRun()

#28 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(198): Symfony\\Component\\Console\\Application->run()

#29 /usr/share/nginx/invoiceninja/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()

#30 {main}

"}

Hi,

You can manually update by copying over the latest release tar.

Seems like a workaround and not a solution to the issue.

Just to be sure, mv the extracted tar and overwrite everything?

Yes, this is a workaround. Also happy to try to help you debug the issue, I suggest deleting/moving the log file, upgrading and then checking again.

Correct, you can backup the .env file if you have concerns.

There are not log files after the update.

After turning on
APP_DEBUG=“true”

the error changes now to

500: The command “ninja:design” does not exist.

/storage/logs is still empty

I found this issue which shows a fix made was made but doesn’t have other info, I think you may need to use the manual update option.

That worked.

Saving .env was not necessary, since it was not overwritten.

Just in case anyone else has the same problem:

cd /tmp
wget https://github.com/invoiceninja/invoiceninja/releases/download/v5.11.40/invoiceninja.tar
 
sudo -u www-data tar -xf invoiceninja.tar -C /usr/share/nginx/invoiceninja/

rm invoiceninja.tar 
1 Like

Glad to hear it, thanks for the update!

1 Like

Thanks for the fast help as always with you guys :smiling_face_with_three_hearts:

1 Like