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

Heimdall no longer starts in Ubuntu 22.04 LXC #1335

Open
komoricodrutz opened this issue May 13, 2024 · 1 comment
Open

Heimdall no longer starts in Ubuntu 22.04 LXC #1335

komoricodrutz opened this issue May 13, 2024 · 1 comment

Comments

@komoricodrutz
Copy link

Hi,
I installed Heimdall at the beginning of December 2022 (at that time v2.5.3 was out) in a Proxmox LXC container running ubuntu 22.04, following the guide I found here.
Heimdall has been working flawlessly ever since and it successfully survived all upgrades up to and including v2.5.8.
However, since version 2.6.0, if I upgrade it, the service configured according to the tutorial mentioned above, fails to start.
I waited for a new version to show up, thinking the bug may get fixed.
However, now with 2.6.1 the same seems to happen, so I started performing some troubleshooting:

PHP Version:

php -v
PHP 8.1.2-1ubuntu2.17 (cli) (built: May  1 2024 10:10:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.17, Copyright (c), by Zend Technologies
Service status:
systemctl status heimdall
* heimdall.service - Heimdall
     Loaded: loaded (/etc/systemd/system/heimdall.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2024-05-13 07:58:16 UTC; 2s ago
    Process: 342 ExecStart=/usr/bin/php artisan serve --host=0.0.0.0 --port=4949 (code=exited, status=255/EXCEPTION)
   Main PID: 342 (code=exited, status=255/EXCEPTION)
        CPU: 8ms

After digging around a bit, I found this when trying to check the php artisan version:

php artisan -V
Composer detected issues in your platform:

Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.2-1ubuntu2.17.

PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.2-1ubuntu2.17. in /[path-to-]Heimdall/vendor/composer/platform_check.php on line 24

So I upgraded to PHP 8.2 and set it to default following the instructions here and reinstalling the dependencies mentioned in the initial guide mentioned at the start.
After reboot, Heimdall still doesn't start.
Now the service fails starting with a different error:

systemctl status heimdall
* heimdall.service - Heimdall
     Loaded: loaded (/etc/systemd/system/heimdall.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2024-05-13 08:17:20 UTC; 5s ago
    Process: 9588 ExecStart=/usr/bin/php artisan serve --host=0.0.0.0 --port=4949 (code=exited, status=1/FAILURE)
   Main PID: 9588 (code=exited, status=1/FAILURE)
        CPU: 55ms

May 13 08:17:25 [heimdallhostname] systemd[1]: heimdall.service: Scheduled restart job, restart counter is at 234.
May 13 08:17:25 [heimdallhostname] systemd[1]: Stopped Heimdall.

And I now get a different error from artisan:

php artisan -V

In ProviderRepository.php line 206:
                                                             
  Class "Facade\Ignition\IgnitionServiceProvider" not found

I am by no means savvy about php, artisan and any other related topics. However, I can follow some instructions.
Therefore, any help will be greatly appreciated. Of course I will provide additional info upon "guided" request.

Thank you all for the great work you've done!
I will restore the container to its previous backup, so I may have to replicate the steps leading to the failure in the future, should additional info be required.

@komoricodrutz
Copy link
Author

komoricodrutz commented May 13, 2024

Additional info.
I took some additional baby steps in trying to add some additional troubleshooting info.
I have created a new LXC container, this time based on debian bookworm and used the same guide as the one I mentioned in the previous post, with some extra packages: php-dom php-mbstring.
It worked just fine.
I tried to replicate it by installing those two additional packages, but the issue still remains the same.
On the fresh installation:

php artisan -V
Laravel Framework 10.44.0

On the old installation (before attempting to upgrade):

php artisan -V
Laravel Framework 8.83.26

So i am starting to assume that this Laravel Framework does not also update, but don't know how to really check this after the failed upgrade, as it spits out that Facade error mentioned above

I found a guide on how to migrate from laravel 8 to 10 here, however there are some differences in the Heimdall composer.json file and I wouldn't want to break something:
From the guide:
Update the versions of the following packages in your composer.json file:

{
  “require”: {
    “php”: “^8.1”,
    “laravel/framework”: “^10.0”,
    “laravel/sanctum”: “^3.2”,
    “doctrine/dbal”: “^3.0”,
    “laravel/passport”: “^11.0”
  },
  “require-dev”: {
    “nunomaduro/collision”: “^6.1”,
    “spatie/laravel-ignition”: “^2.0”
  }
}

From the existing composer.json file:

{
   "require": {
        "php": ">=7.4.32",
        "facade/ignition": "^2.3.6",
        "fideloper/proxy": "^4.0",
        "graham-campbell/github": "^10.5",
        "guzzlehttp/guzzle": "^7.4",
        "laravel/framework": "^8.0",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^3.0",
        "laravelcollective/html": "^6.0",
        "nunomaduro/collision": "^5.0",
        "symfony/yaml": "^5.4",
        "ext-json": "*",
        "ext-intl": "*"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.12",
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~9.0",
        "squizlabs/php_codesniffer": "3.*",
        "symfony/thanks": "^1.0"
    },

From the fresh install composer.json file:

    "require": {
        "php": "^8.1",
        "graham-campbell/github": "^12.0",
        "guzzlehttp/guzzle": "^7.4",
        "laravel/framework": "^10.44",
        "laravel/tinker": "^2.8",
        "laravel/ui": "^4.2",
        "laravelcollective/html": "^6.4",
        "nunomaduro/collision": "^6.3",
        "symfony/yaml": "^6.2",
        "ext-json": "*",
        "ext-intl": "*",
        "league/flysystem-aws-s3-v3": "^3.0",
        "spatie/laravel-ignition": "^2.0"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.13",
        "filp/whoops": "^2.8",
        "mockery/mockery": "^1.4.4",
        "phpunit/phpunit": "^9.5.10",
        "squizlabs/php_codesniffer": "3.*",
        "symfony/thanks": "^1.2",
        "fakerphp/faker": "^1.9.1"
    },

I see that the ignition entry is missing in both the upgrade guide and the fresh installation.

I also repeated the entire ordeal and after the upgrade to 2.6.1 the composer.json has been overwritten with the same version as in the fresh install and still getting the same error about ignition.
I have reached the end of my capabilities now, so please assist!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Non-Docker Issues
Development

No branches or pull requests

1 participant