Help installing Heimdall

Hi all, im a beginner but im trying to install heimdall in a jail using THIS guide.
I have followed the step, plus:

  • added this to initial script for fix a previous error
# If release is 13.1-RELEASE, change to 13.2-RELEASE
if [ "${RELEASE}" = "13.1-RELEASE" ]; then
  RELEASE="13.2-RELEASE"
fi 
  • added in the config file
    FILE="v2.6.1.tar.gz"
    for get the latest version

The jail installation go well until the last process, and trying to reach jail ip i got ERROR 502 from browser.
This is the log of intsallation:

Log
Script started on Fri Apr 26 11:30:08 2024
Command: ./heimdall-jail.sh
heimdall successfully created!
 
Testing Host DNS response to pkg.freebsd.org
Testing heimdall's SRV response to pkg.freebsd.org
Testing heimdall's DNSSEC response to pkg.freebsd.org
 
Installing pkg... 
 
Installing supplied packages:
  - nano... 
  - caddy... 
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
=====
Message from caddy-2.7.6_5:
 
--
To enable caddy:
 
 - Edit /usr/local/etc/caddy/Caddyfile
 See https://caddyserver.com/docs/
- Run 'service enable caddy'
 
Note while Caddy currently defaults to running as root:wheel, it is strongly
recommended to run the server as an unprivileged user, such as www:www --
 
- Use security/portacl-rc to enable privileged port binding:

  # pkg install security/portacl-rc
  # sysrc portacl_users+=www
  # sysrc portacl_user_www_tcp="http https"
  # sysrc portacl_user_www_udp="https"
  # service portacl enable
  # service portacl start
 
- Configure caddy to run as www:www
 
  # sysrc caddy_user=www caddy_group=www

- Note if Caddy has been started as root previously, files in
  /var/log/caddy, /var/db/caddy, and /var/run/caddy may require their ownership
  changing manually.

/usr/local/etc/rc.d/caddy has the following defaults:

- Server log: /var/log/caddy/caddy.log
  (runtime messages, NOT an access.log)
- Automatic SSL certificate storage: /var/db/caddy/data/caddy/
- Administration endpoint: //unix/var/run/caddy/caddy.sock
- Runs as root:wheel (this will change to www:www in the future)
  - php80... 
pkg: No packages available to install matching 'php80' have been found in the repositories
    - php80 failed to install, retry #1
pkg: No packages available to install matching 'php80' have been found in the repositories
    - php80 failed to install, retry #2
pkg: No packages available to install matching 'php80' have been found in the repositories
    - php80 failed to install, retry #3

  - php80-mbstring... 
pkg: No packages available to install matching 'php80-mbstring' have been found in the repositories
    - php80-mbstring failed to install, retry #1
pkg: No packages available to install matching 'php80-mbstring' have been found in the repositories
    - php80-mbstring failed to install, retry #2
pkg: No packages available to install matching 'php80-mbstring' have been found in the repositories
    - php80-mbstring failed to install, retry #3

  - php80-zip... 
pkg: No packages available to install matching 'php80-zip' have been found in the repositories
    - php80-zip failed to install, retry #1
pkg: No packages available to install matching 'php80-zip' have been found in the repositories
    - php80-zip failed to install, retry #2
pkg: No packages available to install matching 'php80-zip' have been found in the repositories
    - php80-zip failed to install, retry #3

  - php80-tokenizer... 
pkg: No packages available to install matching 'php80-tokenizer' have been found in the repositories
    - php80-tokenizer failed to install, retry #1
pkg: No packages available to install matching 'php80-tokenizer' have been found in the repositories
    - php80-tokenizer failed to install, retry #2
pkg: No packages available to install matching 'php80-tokenizer' have been found in the repositories
    - php80-tokenizer failed to install, retry #3

  - php80-openssl... 
pkg: No packages available to install matching 'php80-openssl' have been found in the repositories
    - php80-openssl failed to install, retry #1
pkg: No packages available to install matching 'php80-openssl' have been found in the repositories
    - php80-openssl failed to install, retry #2
pkg: No packages available to install matching 'php80-openssl' have been found in the repositories
    - php80-openssl failed to install, retry #3
 
  - php80-pdo... 
pkg: No packages available to install matching 'php80-pdo' have been found in the repositories
    - php80-pdo failed to install, retry #1
pkg: No packages available to install matching 'php80-pdo' have been found in the repositories
    - php80-pdo failed to install, retry #2
pkg: No packages available to install matching 'php80-pdo' have been found in the repositories
    - php80-pdo failed to install, retry #3
 
  - php80-pdo_sqlite... 
 pkg: No packages available to install matching 'php80-pdo_sqlite' have been found in the repositories
    - php80-pdo_sqlite failed to install, retry #1
pkg: No packages available to install matching 'php80-pdo_sqlite' have been found in the repositories
    - php80-pdo_sqlite failed to install, retry #2
pkg: No packages available to install matching 'php80-pdo_sqlite' have been found in the repositories
    - php80-pdo_sqlite failed to install, retry #3
 
  - php80-filter... 
pkg: No packages available to install matching 'php80-filter' have been found in the repositories
    - php80-filter failed to install, retry #1
pkg: No packages available to install matching 'php80-filter' have been found in the repositories
    - php80-filter failed to install, retry #2
pkg: No packages available to install matching 'php80-filter' have been found in the repositories
    - php80-filter failed to install, retry #3

  - php80-xml... 
pkg: No packages available to install matching 'php80-xml' have been found in the repositories
    - php80-xml failed to install, retry #1
pkg: No packages available to install matching 'php80-xml' have been found in the repositories
    - php80-xml failed to install, retry #2
pkg: No packages available to install matching 'php80-xml' have been found in the repositories
    - php80-xml failed to install, retry #3

  - php80-ctype... 
pkg: No packages available to install matching 'php80-ctype' have been found in the repositories
    - php80-ctype failed to install, retry #1
pkg: No packages available to install matching 'php80-ctype' have been found in the repositories
    - php80-ctype failed to install, retry #2
pkg: No packages available to install matching 'php80-ctype' have been found in the repositories
    - php80-ctype failed to install, retry #3

  - sqlite3... 
  - php80-session... 
pkg: No packages available to install matching 'php80-session' have been found in the repositories
    - php80-session failed to install, retry #1
pkg: No packages available to install matching 'php80-session' have been found in the repositories
    - php80-session failed to install, retry #2
pkg: No packages available to install matching 'php80-session' have been found in the repositories
    - php80-session failed to install, retry #3

  - go... 
  - git... 
===> Creating groups.
Creating group 'git_daemon' with gid '964'.
===> Creating users
Creating user 'git_daemon' with uid '964'.
=====
Message from python39-3.9.18_2:

--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

py39-gdbm       databases/py-gdbm@py39
py39-sqlite3    databases/py-sqlite3@py39
py39-tkinter    x11-toolkits/py-tkinter@py39
=====
Message from git-2.44.0:

--
If you installed the GITWEB option please follow these instructions:

In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.

All you have to do to make gitweb work is:
1) Please be sure you're able to execute CGI scripts in
   /usr/local/share/examples/git/gitweb.
2) Set the GITWEB_CONFIG variable in your webserver's config to
   /usr/local/etc/git/gitweb.conf. This variable is passed to gitweb.cgi.
3) Restart server.


If you installed the CONTRIB option please note that the scripts are
installed in /usr/local/share/git-core/contrib. Some of them require
other ports to be installed (perl, python, etc), which you may need to
install manually.
No default gateway found for ipv6.
* Starting heimdall
  + Started OK
  + Using devfs_ruleset: 1000 (iocage generated default)
  + Configuring VNET OK
  + Using IP options: vnet
  + Starting services OK
  + Executing poststart OK
Successfully added mount to heimdall's fstab
fetch: https://github.com/linuxserver/Heimdall/archive/v2.6.1.tar.gz: size of remote file is not known

/tmp/v2.6.1.tar.gz                                       0  B    0  Bps
/tmp/v2.6.1.tar.gz                                    2432 kB 3919 kBps
/tmp/v2.6.1.tar.gz                                    7040 kB 4615 kBps
/tmp/v2.6.1.tar.gz                                      11 MB 4629 kBps
/tmp/v2.6.1.tar.gz                                      15 MB 4615 kBps
/tmp/v2.6.1.tar.gz                                      16 MB 4504 kBps    04s
php_fpm_enable:  -> YES
caddy_enable:  -> YES
caddy_config:  -> /usr/local/www/Caddyfile
sh: php: not found
Command: sh -c cd /usr/local/www/html/ && php artisan key:generate failed!
php-fpm does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
Command: service php-fpm start failed!
Starting caddy... done
Log: /var/log/caddy/caddy.log

Command exit status: 0
Script done on Fri Apr 26 11:31:43 2024

someone can help me? Thanks a lot

@dan

1 Like

The script was using PHP 8.0 packages, which have now been deprecated. Updating to use PHP 8.2 (and at the same defaulting to Heimdall 2.6.1 and adding the 13.2 release) seems to have fixed this.

@oxyde, try pulling the most recent update to the script (git pull) and running it again.

1 Like

Thanks a lot! But im unlucky, it seems not working :sweat_smile:
At first time i visit jail’s ip, it show an error message… i try reload page and always error 500 now.
I didn’t find anything in installation log, but ill post it anyway

log
> Script started on Fri Apr 26 14:38:58 2024
> Command: ./heimdall-jail.sh
> heimdall successfully created!
> 
> Testing Host DNS response to pkg.freebsd.org
> Testing heimdall's SRV response to pkg.freebsd.org
> Testing heimdall's DNSSEC response to pkg.freebsd.org
> 
> Installing pkg... 
> 
> Installing supplied packages:
>   - nano... 
>   - caddy... 
> ===> Creating groups.
> Using existing group 'www'.
> ===> Creating users
> Using existing user 'www'.
> =====
> Message from caddy-2.7.6_5:
> 
> --
> To enable caddy:
> 
> - Edit /usr/local/etc/caddy/Caddyfile
>   See https://caddyserver.com/docs/
> - Run 'service enable caddy'
> 
> Note while Caddy currently defaults to running as root:wheel, it is strongly
> recommended to run the server as an unprivileged user, such as www:www --
> 
> - Use security/portacl-rc to enable privileged port binding:
> 
>   # pkg install security/portacl-rc
>   # sysrc portacl_users+=www
>   # sysrc portacl_user_www_tcp="http https"
>   # sysrc portacl_user_www_udp="https"
>   # service portacl enable
>   # service portacl start
> 
> - Configure caddy to run as www:www
> 
>   # sysrc caddy_user=www caddy_group=www
> 
> - Note if Caddy has been started as root previously, files in
>   /var/log/caddy, /var/db/caddy, and /var/run/caddy may require their ownership
>   changing manually.
> 
> /usr/local/etc/rc.d/caddy has the following defaults:
> 
> - Server log: /var/log/caddy/caddy.log
>   (runtime messages, NOT an access.log)
> - Automatic SSL certificate storage: /var/db/caddy/data/caddy/
> - Administration endpoint: //unix/var/run/caddy/caddy.sock
> - Runs as root:wheel (this will change to www:www in the future)
>   - php82... 
>   - php82-mbstring... 
> =====
> Message from php82-mbstring-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-mbstring.ini.sample
>   - php82-zip... 
> =====
> Message from php82-zip-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-zip.ini.sample
>   - php82-tokenizer... 
> =====
> Message from php82-tokenizer-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-tokenizer.ini.sample
>   - php82-openssl... 
> pkg: No packages available to install matching 'php82-openssl' have been found in the repositories
>     - php82-openssl failed to install, retry #1
> pkg: No packages available to install matching 'php82-openssl' have been found in the repositories
>     - php82-openssl failed to install, retry #2
> pkg: No packages available to install matching 'php82-openssl' have been found in the repositories
>     - php82-openssl failed to install, retry #3
> 
>   - php82-pdo... 
> =====
> Message from php82-pdo-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-pdo.ini.sample
>   - php82-pdo_sqlite... 
> =====
> Message from php82-pdo_sqlite-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-30-pdo_sqlite.ini.sample
>   - php82-filter... 
> =====
> Message from php82-filter-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-filter.ini.sample
>   - php82-xml... 
> =====
> Message from php82-xml-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-xml.ini.sample
>   - php82-ctype... 
> =====
> Message from php82-ctype-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-ctype.ini.sample
>   - php82-dom... 
> =====
> Message from php82-dom-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-dom.ini.sample
>   - php82-fileinfo... 
> =====
> Message from php82-fileinfo-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-20-fileinfo.ini.sample
>   - sqlite3... 
> The most recent versions of packages are already installed
>   - php82-session... 
> =====
> Message from php82-session-8.2.18:
> 
> --
> This file has been added to automatically load the installed extension:
> /usr/local/etc/php/ext-18-session.ini.sample
>   - go... 
>   - git... 
> ===> Creating groups.
> Creating group 'git_daemon' with gid '964'.
> ===> Creating users
> Creating user 'git_daemon' with uid '964'.
> =====
> Message from python39-3.9.18_2:
> 
> --
> Note that some standard Python modules are provided as separate ports
> as they require additional dependencies. They are available as:
> 
> py39-gdbm       databases/py-gdbm@py39
> py39-sqlite3    databases/py-sqlite3@py39
> py39-tkinter    x11-toolkits/py-tkinter@py39
> =====
> Message from git-2.44.0:
> 
> --
> If you installed the GITWEB option please follow these instructions:
> 
> In the directory /usr/local/share/examples/git/gitweb you can find all files to
> make gitweb work as a public repository on the web.
> 
> All you have to do to make gitweb work is:
> 1) Please be sure you're able to execute CGI scripts in
>    /usr/local/share/examples/git/gitweb.
> 2) Set the GITWEB_CONFIG variable in your webserver's config to
>    /usr/local/etc/git/gitweb.conf. This variable is passed to gitweb.cgi.
> 3) Restart server.
> 
> 
> If you installed the CONTRIB option please note that the scripts are
> installed in /usr/local/share/git-core/contrib. Some of them require
> other ports to be installed (perl, python, etc), which you may need to
> install manually.
> No default gateway found for ipv6.
> * Starting heimdall
>   + Started OK
>   + Using devfs_ruleset: 1001 (iocage generated default)
>   + Configuring VNET OK
>   + Using IP options: vnet
>   + Starting services OK
>   + Executing poststart OK
> Successfully added mount to heimdall's fstab
> fetch: https://github.com/linuxserver/Heimdall/archive/v2.6.1.tar.gz: size of remote file is not known
> 
> /tmp/v2.6.1.tar.gz                                       0  B    0  Bps
> /tmp/v2.6.1.tar.gz                                    2384 kB 3775 kBps
> /tmp/v2.6.1.tar.gz                                    7024 kB 4626 kBps
> /tmp/v2.6.1.tar.gz                                      11 MB 4632 kBps
> /tmp/v2.6.1.tar.gz                                      15 MB 4614 kBps
> /tmp/v2.6.1.tar.gz                                      16 MB 4480 kBps    04s
> php_fpm_enable:  -> YES
> caddy_enable:  -> YES
> caddy_config:  -> /usr/local/www/Caddyfile
> 
>   e[37;44m INFO e[39;49m Application key set successfully.  
> 
> Performing sanity check on php-fpm configuration:
> [26-Apr-2024 14:40:34] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful
> 
> Starting php_fpm.
> Starting caddy... done
> Log: /var/log/caddy/caddy.log
> 
> Command exit status: 0
> Script done on Fri Apr 26 14:40:35 2024

What im missing in configuration?

I’m seeing two problems in your log, first that php82-openssl didn’t install (which isn’t really a problem as it’s deprecated; I’ve just updated the script to remove that), and second that it looks like there were some problems downloading Heimdall itself. Kind of strange. Can you get a screen shot of the actual error you’re seeing?

that “custom” error page apperead once, now i got only this standard browser error 500

I have also try a new installation with same resulta… Can be related to some caddyfile missconfig?

Were you able to capture the actual error message (before it started just giving 500 errors)?

After the updates I made to the script yesterday, it installs and works just fine for me, so I’m a little surprised you’re having problems–this installation just isn’t that complicated (compared to, say, Nextcloud). Did you see any error messages during the installation? Can you check if php-fpm is running in the jail? (inside the jail, run service php-fpm status)

1 Like

no error message logged during last installation (after the php82-openssl dependency removed), all seems go fine during this process.
Anyway this is the last log installation file

log
Script started on Fri Apr 26 21:46:31 2024
Command: ./heimdall-jail.sh
heimdall successfully created!

Testing Host DNS response to pkg.freebsd.org
Testing heimdall's SRV response to pkg.freebsd.org
Testing heimdall's DNSSEC response to pkg.freebsd.org

Installing pkg... 

Installing supplied packages:
  - nano... 
  - caddy... 
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
=====
Message from caddy-2.7.6_5:

--
To enable caddy:

- Edit /usr/local/etc/caddy/Caddyfile
  See https://caddyserver.com/docs/
- Run 'service enable caddy'

Note while Caddy currently defaults to running as root:wheel, it is strongly
recommended to run the server as an unprivileged user, such as www:www --

- Use security/portacl-rc to enable privileged port binding:

  # pkg install security/portacl-rc
  # sysrc portacl_users+=www
  # sysrc portacl_user_www_tcp="http https"
  # sysrc portacl_user_www_udp="https"
  # service portacl enable
  # service portacl start

- Configure caddy to run as www:www

  # sysrc caddy_user=www caddy_group=www

- Note if Caddy has been started as root previously, files in
  /var/log/caddy, /var/db/caddy, and /var/run/caddy may require their ownership
  changing manually.

/usr/local/etc/rc.d/caddy has the following defaults:

- Server log: /var/log/caddy/caddy.log
  (runtime messages, NOT an access.log)
- Automatic SSL certificate storage: /var/db/caddy/data/caddy/
- Administration endpoint: //unix/var/run/caddy/caddy.sock
- Runs as root:wheel (this will change to www:www in the future)
  - php82... 
  - php82-mbstring... 
=====
Message from php82-mbstring-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-mbstring.ini.sample
  - php82-zip... 
=====
Message from php82-zip-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-zip.ini.sample
  - php82-tokenizer... 
=====
Message from php82-tokenizer-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-tokenizer.ini.sample
  - php82-pdo... 
=====
Message from php82-pdo-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-pdo.ini.sample
  - php82-pdo_sqlite... 
=====
Message from php82-pdo_sqlite-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-30-pdo_sqlite.ini.sample
  - php82-filter... 
=====
Message from php82-filter-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-filter.ini.sample
  - php82-xml... 
=====
Message from php82-xml-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-xml.ini.sample
  - php82-ctype... 
=====
Message from php82-ctype-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-ctype.ini.sample
  - php82-dom... 
=====
Message from php82-dom-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-dom.ini.sample
  - php82-fileinfo... 
=====
Message from php82-fileinfo-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-fileinfo.ini.sample
  - sqlite3... 
The most recent versions of packages are already installed
  - php82-session... 
=====
Message from php82-session-8.2.18:

--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-18-session.ini.sample
  - go... 
  - git... 
===> Creating groups.
Creating group 'git_daemon' with gid '964'.
===> Creating users
Creating user 'git_daemon' with uid '964'.
=====
Message from python39-3.9.18_2:

--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

py39-gdbm       databases/py-gdbm@py39
py39-sqlite3    databases/py-sqlite3@py39
py39-tkinter    x11-toolkits/py-tkinter@py39
=====
Message from git-2.44.0:

--
If you installed the GITWEB option please follow these instructions:

In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.

All you have to do to make gitweb work is:
1) Please be sure you're able to execute CGI scripts in
   /usr/local/share/examples/git/gitweb.
2) Set the GITWEB_CONFIG variable in your webserver's config to
   /usr/local/etc/git/gitweb.conf. This variable is passed to gitweb.cgi.
3) Restart server.


If you installed the CONTRIB option please note that the scripts are
installed in /usr/local/share/git-core/contrib. Some of them require
other ports to be installed (perl, python, etc), which you may need to
install manually.
No default gateway found for ipv6.
* Starting heimdall
  + Started OK
  + Using devfs_ruleset: 1001 (iocage generated default)
  + Configuring VNET OK
  + Using IP options: vnet
  + Starting services OK
  + Executing poststart OK
Successfully added mount to heimdall's fstab
fetch: https://github.com/linuxserver/Heimdall/archive/v2.6.1.tar.gz: size of remote file is not known

/tmp/v2.6.1.tar.gz                                       0  B    0  Bps
/tmp/v2.6.1.tar.gz                                     752 kB 2546 kBps
/tmp/v2.6.1.tar.gz                                    5376 kB 4632 kBps
/tmp/v2.6.1.tar.gz                                       9 MB 4617 kBps
/tmp/v2.6.1.tar.gz                                      14 MB 4616 kBps
/tmp/v2.6.1.tar.gz                                      16 MB 4459 kBps    04s
php_fpm_enable:  -> YES
caddy_enable:  -> YES
caddy_config:  -> /usr/local/www/Caddyfile

  e[37;44m INFO e[39;49m Application key set successfully.  

Performing sanity check on php-fpm configuration:
[26-Apr-2024 21:48:01] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
Starting caddy... done
Log: /var/log/caddy/caddy.log

Command exit status: 0
Script done on Fri Apr 26 21:48:02 2024

And unfortunately i can’t reproduce that error page had the first time, but was kinda “generic”.
I confirm you that php-fpm is running.
I see some “warn” in caddy log

caddy

{“level”:“info”,“ts”:1714160882.0708559,“msg”:“using provided configuration”,“config_file”:“/usr/local/www/Caddyfile”,“config_adapter”:“caddyfile”}
{“level”:“warn”,“ts”:1714160882.0728843,“msg”:“Caddyfile input is not formatted; run ‘caddy fmt --overwrite’ to fix inconsistencies”,“adapter”:“caddyfile”,“file”:“/usr/local/www/Caddyfile”,“line”:14}
{“level”:“info”,“ts”:1714160882.0733244,“logger”:“admin”,“msg”:“admin endpoint started”,“address”:“unix//var/run/caddy/caddy.sock”,“enforce_origin”:false,“origins”:[“”,“//127.0.0.1”,“//::1”]}
{“level”:“warn”,“ts”:1714160882.0734787,“logger”:“http.auto_https”,“msg”:“server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server”,“server_name”:“srv0”,“http_port”:80}
{“level”:“info”,“ts”:1714160882.073514,“logger”:“tls.cache.maintenance”,“msg”:“started background certificate maintenance”,“cache”:“0xc00051ec00”}
{“level”:“warn”,“ts”:1714160882.073878,“logger”:“tls”,“msg”:“unable to get instance ID; storage clean stamps will be incomplete”,“error”:“open /var/db/caddy/data/caddy/instance.uuid: no such file or directory”}
{“level”:“info”,“ts”:1714160882.0739448,“logger”:“http.log”,“msg”:“server running”,“name”:“srv0”,“protocols”:[“h1”,“h2”,“h3”]}
{“level”:“info”,“ts”:1714160882.0740352,“msg”:“autosaved config (load with --resume flag)”,“file”:“/var/db/caddy/config/caddy/autosave.json”}
{“level”:“info”,“ts”:1714160882.074042,“msg”:“serving initial configuration”}
Successfully started Caddy (pid=48170) - Caddy is running in the background
{“level”:“info”,“ts”:1714160882.0747373,“logger”:“tls”,“msg”:“cleaning storage unit”,“storage”:“FileStorage:/var/db/caddy/data/caddy”}
{“level”:“info”,“ts”:1714160882.0749097,“logger”:“tls”,“msg”:“finished cleaning storage units”}
{“level”:“info”,“ts”:1714161179.4003055,“logger”:“admin.api”,“msg”:“received request”,“method”:“POST”,“host”:“127.0.0.1”,“uri”:“/stop”,“remote_ip”:“”,“remote_port”:“”,“headers”:{“Accept-Encoding”:[“gzip”],“Content-Length”:[“0”],“User-Agent”:[“Go-http-client/1.1”]}}

dont know if they can help investigate

based on my experience, i also tried:

  • check connection to database, and seems work fine… could connect to sqlite3 and run some basic select query on tables i found on it
  • fixed the “Caddyfile input is not formatted; run ‘caddy fmt --overwrite’ to fix inconsistencies” (i knew was just a warning, but i tried)
  • check permission on the html/public folder - file - subfolder… i have applied special permission on all
  • reinstalled with other ip as jail ip (to avoid browser caching too) but same result
  • removing from caddyfile

root * /usr/local/www/html/public
file_server

make a blank page load, insteand pointing to this make the 500 error

I have made some test trying to debug this issue, and seems related to laravel.
Hope someone can help me :slight_smile:
I could reproduce the error page:

in the index.php of heimdall, the error is throwed there:

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

at every jail start, laravel log a lot of error for access denied to file, like

[2024-04-29 17:35:57] local.DEBUG: Process Apps dispatched  
[2024-04-29 17:35:58] local.ERROR: fopen(/usr/local/www/html/storage/framework/sessions/rnsg5VTM7EK5q3Js4cFPszZjm1YisJqh3G0oJnzJ): Failed to open stream: Permission denied {"exception":"[object] (ErrorException(code: 0): fopen(/usr/local/www/html/storage/framework/sessions/rnsg5VTM7EK5q3Js4cFPszZjm1YisJqh3G0oJnzJ): Failed to open stream: Permission denied at /usr/local/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:87)

related to this

    public function sharedGet($path)
    {
        $contents = '';

        $handle = fopen($path, 'rb');

        if ($handle) {
            try {
                if (flock($handle, LOCK_SH)) {
                    clearstatcache(true, $path);

                    $contents = fread($handle, $this->size($path) ?: 1);

                    flock($handle, LOCK_UN);
                }
            } finally {
                fclose($handle);
            }
        }

        return $contents;
    }

Finally i got it work.
For some reason, permission was denied to file in those 2 folder:

  • usr\local\www\html\storage\framework\sessions
  • usr\local\www\html\storage\framework\views

some other error appear in next step but now that i know how to debug, i make a clean install and retry. Thanks to all

1 Like