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

Error 500 After some minutes running #1400

Closed
lucasplcorrea opened this issue Nov 14, 2024 · 12 comments
Closed

Error 500 After some minutes running #1400

lucasplcorrea opened this issue Nov 14, 2024 · 12 comments

Comments

@lucasplcorrea
Copy link

I installed Heimdall via docker compose, but after a few minutes of running, when I try to access a list of users or applications I get a 500 error.

When I check the logs I have:

�[2KHeimdall_BC2C  | [migrations] started
�[2KHeimdall_BC2C  | [migrations] 01-nginx-site-confs-default: skipped
�[2KHeimdall_BC2C  | [migrations] 02-default-location: skipped
�[2KHeimdall_BC2C  | [migrations] done
�[2KHeimdall_BC2C  | ───────────────────────────────────────
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |       ██╗     ███████╗██╗ ██████╗
�[2KHeimdall_BC2C  |       ██║     ██╔════╝██║██╔═══██╗
�[2KHeimdall_BC2C  |       ██║     ███████╗██║██║   ██║
�[2KHeimdall_BC2C  |       ██║     ╚════██║██║██║   ██║
�[2KHeimdall_BC2C  |       ███████╗███████║██║╚██████╔╝
�[2KHeimdall_BC2C  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |    Brought to you by linuxserver.io
�[2KHeimdall_BC2C  | ───────────────────────────────────────
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  | To support LSIO projects visit:
�[2KHeimdall_BC2C  | https://www.linuxserver.io/donate/
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  | ───────────────────────────────────────
�[2KHeimdall_BC2C  | GID/UID
�[2KHeimdall_BC2C  | ───────────────────────────────────────
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  | User UID:    1000
�[2KHeimdall_BC2C  | User GID:    1000
�[2KHeimdall_BC2C  | ───────────────────────────────────────
�[2KHeimdall_BC2C  | Linuxserver.io version: v2.6.3-ls287
�[2KHeimdall_BC2C  | Build-date: 2024-11-05T11:45:29+00:00
�[2KHeimdall_BC2C  | ───────────────────────────────────────
�[2KHeimdall_BC2C  |     
�[2KHeimdall_BC2C  | using keys found in /config/keys
�[2KHeimdall_BC2C  | New container detected, installing Heimdall
�[2KHeimdall_BC2C  | [custom-init] No custom files found, skipping...
�[2KHeimdall_BC2C  | [ls.io-init] done.
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |    GuzzleHttp\Exception\ConnectException 
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |   cURL error 28: Connection timed out after 15001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://appslist.heimdall.site/list.json
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |   at /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
�[2KHeimdall_BC2C  |     206▕         }
�[2KHeimdall_BC2C  |     207▕ 
�[2KHeimdall_BC2C  |     208▕         // Create a connection exception if it was a specific error code.
�[2KHeimdall_BC2C  |     209▕         $error = isset($connectionErrors[$easy->errno])
�[2KHeimdall_BC2C  |   ➜ 210▕             ? new ConnectException($message, $easy->request, null, $ctx)
�[2KHeimdall_BC2C  |     211▕             : new RequestException($message, $easy->request, $easy->response, null, $ctx);
�[2KHeimdall_BC2C  |     212▕ 
�[2KHeimdall_BC2C  |     213▕         return P\Create::rejectionFor($error);
�[2KHeimdall_BC2C  |     214▕     }
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |       �[2m+13 vendor frames �[22m
�[2KHeimdall_BC2C  |   14  /app/www/app/SupportedApps.php:157
�[2KHeimdall_BC2C  |       GuzzleHttp\Client::request()
�[2KHeimdall_BC2C  | 
�[2KHeimdall_BC2C  |   15  /app/www/app/Jobs/ProcessApps.php:41
�[2KHeimdall_BC2C  |       App\SupportedApps::getList()

My docker-compose:

networks:
    1panel-network:
        external: true
services:
    heimdall:
        container_name: ${CONTAINER_NAME}
        deploy:
            resources:
                limits:
                    cpus: ${CPUS}
                    memory: ${MEMORY_LIMIT}
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=${TIME_ZONE}
        image: linuxserver/heimdall:2.6.3
        labels:
            createdBy: Apps
        networks:
            - 1panel-network
        ports:
            - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:80
            - ${HOST_IP}:${PANEL_APP_PORT_HTTPS}:443
        restart: always
        volumes:
            - ./data:/config

After restarting the container it works for a few more minutes and stops working until it is restarted again.

@j0nnymoe
Copy link
Member

j0nnymoe commented Nov 14, 2024

Looks like your setup is causing connection issues:
cURL error 28: Connection timed out after 15001 milliseconds

@lucasplcorrea
Copy link
Author

I'll try to reinstall from another way, but, i think the error is caused by the curl on the wrong location

cURL error 28: Connection timed out after 15001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://appslist.heimdall.site/list.json

curl should made a request on my server, not on applist.heimdall.site, right?

@lucasplcorrea
Copy link
Author

tryed with docker run instead docker-compose, and the error persists

@raphpunk
Copy link

Can you post the logs from the container?

@raphpunk
Copy link

#1397 Had a similar issue. Do you have an adblocker?

@lucasplcorrea
Copy link
Author

Can you post the logs from the container?

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: v2.6.3-ls287
Build-date: 2024-11-05T11:45:29+00:00
───────────────────────────────────────
    
using keys found in /config/keys
New container detected, installing Heimdall
[custom-init] No custom files found, skipping...
[ls.io-init] done.

   GuzzleHttp\Exception\ConnectException 

  cURL error 28: Connection timed out after 15002 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://appslist.heimdall.site/list.json

  at /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
    206▕         }
    207▕ 
    208▕         // Create a connection exception if it was a specific error code.
    209▕         $error = isset($connectionErrors[$easy->errno])
  ➜ 210▕             ? new ConnectException($message, $easy->request, null, $ctx)
    211▕             : new RequestException($message, $easy->request, $easy->response, null, $ctx);
    212▕ 
    213▕         return P\Create::rejectionFor($error);
    214▕     }

      +13 vendor frames 
  14  /app/www/app/SupportedApps.php:157
      GuzzleHttp\Client::request()

  15  /app/www/app/Jobs/ProcessApps.php:41
      App\SupportedApps::getList()

   GuzzleHttp\Exception\ConnectException 

  cURL error 28: Connection timed out after 15002 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://appslist.heimdall.site/list.json

  at /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
    206▕         }
    207▕ 
    208▕         // Create a connection exception if it was a specific error code.
    209▕         $error = isset($connectionErrors[$easy->errno])
  ➜ 210▕             ? new ConnectException($message, $easy->request, null, $ctx)
    211▕             : new RequestException($message, $easy->request, $easy->response, null, $ctx);
    212▕ 
    213▕         return P\Create::rejectionFor($error);
    214▕     }

      +13 vendor frames 
  14  /app/www/app/SupportedApps.php:157
      GuzzleHttp\Client::request()

  15  /app/www/app/Jobs/ProcessApps.php:41
      App\SupportedApps::getList()

I saw that there is an option to run the container offline, where it would not perform this online query, perhaps this would help, but since I am running it in a container, I do not know what the correct APP_SOURCE variable would be.

APP_SOURCE=https://heimdall.local/

in my .env it looks like this:

CONTAINER_NAME="1Panel-heimdall-u0aP"
CPUS=0
HOST_IP="172.30.31.250"
MEMORY_LIMIT=0
PANEL_APP_PORT_HTTP=40049
PANEL_APP_PORT_HTTPS=40050
TIME_ZONE="America/Sao_Paulo"
APP_SOURCE=http://localhost/

@lucasplcorrea
Copy link
Author

#1397 Had a similar issue. Do you have an adblocker?

Nop, I don't have any adblock, the container network is open

@lucasplcorrea
Copy link
Author

Apparently it seems to be a problem with the network itself. Looking at that other ID, I did some tests and saw that Curl can't reach Heimdall's IP.

See the logs:

curl -v https://appslist.heimdall.site/list.json
* Host appslist.heimdall.site:443 was resolved.
* IPv6: 2606:50c0:8000::153, 2606:50c0:8001::153, 2606:50c0:8002::153, 2606:50c0:8003::153
* IPv4: 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153
*   Trying 185.199.108.153:443...
*   Trying [2606:50c0:8000::153]:443...
* Immediate connect fail for 2606:50c0:8000::153: Network unreachable
*   Trying [2606:50c0:8001::153]:443...
* Immediate connect fail for 2606:50c0:8001::153: Network unreachable
*   Trying [2606:50c0:8002::153]:443...
* Immediate connect fail for 2606:50c0:8002::153: Network unreachable
*   Trying [2606:50c0:8003::153]:443...
* Immediate connect fail for 2606:50c0:8003::153: Network unreachable

I did a local test, outside the container, and got the same error, even using only IPv4:

C:\Users\ADMIN>curl -v https://appslist.heimdall.site/list.json
* Host appslist.heimdall.site:443 was resolved.
* IPv6: (none)
* IPv4: 185.199.110.153, 185.199.109.153, 185.199.108.153, 185.199.111.153
*   Trying 185.199.110.153:443...
* connect to 185.199.110.153 port 443 from 0.0.0.0 port 60296 failed: Timed out
*   Trying 185.199.109.153:443...
* connect to 185.199.109.153 port 443 from 0.0.0.0 port 60300 failed: Timed out
*   Trying 185.199.108.153:443...
* connect to 185.199.108.153 port 443 from 0.0.0.0 port 60303 failed: Timed out
*   Trying 185.199.111.153:443...
* connect to 185.199.111.153 port 443 from 0.0.0.0 port 60506 failed: Timed out
* Failed to connect to appslist.heimdall.site port 443 after 84205 ms: Could not connect to server
* closing connection #0
curl: (28) Failed to connect to appslist.heimdall.site port 443 after 84205 ms: Could not connect to server

However, on these websites that do ping tests, it apparently works:
https://check-host.net/check-ping?host=185.199.110.153

I'll try to debug a little more here, but I wanted to see how to make it work 100% offline, so that I wouldn't need to access the external network. I saw in the documentation that this is possible, but I didn't quite understand how to do it.

@raphpunk
Copy link

Have you added the applist locally then?
See here.

@lucasplcorrea
Copy link
Author

I believe I managed to stabilize it.

What I did:
I ran
curl -v https://appslist.heimdall.site/list.json

on one of those sites that perform online curl queries

when I got back I copied the .json and saved it inside my container in the www folder with the name list.json

I added the line:

APP_SOURCE=http://localhost/

to my .env file

and restarted it. It's been running for over 5 hours, has already included new applications and users, and no longer gets a 500 error. For some reason the thumbs aren't imported automatically. Maybe I need to download something else from the repository. I don't know yet.

The documentation isn't very clear to me, as I'm a layman, but this was one of the ways I managed to make it work. When adding a new app I need to define the color, image, and name, even when selecting the app from the list. But since I use few apps, and I only use heimdall to facilitate access to internal links, it works well for me this way.

In case my colleagues want to point out where I'm going wrong when getting the correct covers, I'll leave this issue open until Wednesday, then I'll close it with this solution I found.

I'll leave the curl link so that it's easier for other users:
https://reqbin.com/c-cx9k0qps

@raphpunk
Copy link

Can this issue be closed now?

@lucasplcorrea
Copy link
Author

Sorry for the time. Yep, closing this issue

@LinuxServer-CI LinuxServer-CI moved this from Non-Docker Issues to Done in Issue & PR Tracker Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants