linuxserver / docker-heimdall

GNU General Public License v3.0
330 stars 49 forks source link

[BUG] 504 Gateway Time-Out #122

Closed applisnet closed 1 year ago

applisnet commented 1 year ago

Is there an existing issue for this?

Current Behavior

When adding an item with the Application Type function, nginx throws error 504 Gateway Time-out.

Expected Behavior

No response

Steps To Reproduce

the proxy is well declared in the .env file HTTP_PROXY="http://proxy.domaine:3128" HTTPS_PROXY="http://proxy.domaine:3128"

ping in the docker container Ok root@0495dbe64ee4:/# ping appslist.heimdall.site PING appslist.heimdall.site (185.199.110.153): 56 data bytes

Environment

No response

CPU architecture

x86-64

Docker creation

version: "2.1"
services:
  heimdall:
    image: linuxserver/heimdall:latest
    container_name: heimdall
    environment:
      - PUID=1001
      - PGID=981
      - TZ=Europe/Paris
      - HTTP_PROXY='http://proxy.domaine:3128'
      - HTTPS_PROXY='http://proxy.domaine:3128'
    volumes:
      - /home/docker/dashboard-tec/configuration:/config
    ports:
      - 8181:80
      - 50001:443
    restart: unless-stopped

Container logs

Application log 
[2023-01-23 10:42:07] local.ERROR: file_get_contents(https://appslist.heimdall.site/icons/librenms.png): Failed to open stream: Operation timed out {"userId":4,"exception":"[object] (ErrorExcept
ion(code: 0): file_get_contents(https://appslist.heimdall.site/icons/librenms.png): Failed to open stream: Operation timed out at /app/www/app/Http/Controllers/ItemController.php:220)
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

applisnet commented 1 year ago

problem solved by adding the proxy in the configuration of the file_get_contents function in the file /app/www/app/Http/Controllers/ItemController.php

$options = array( "ssl" => array( "verify_peer" => false, "verify_peer_name" => false, ), 'http' => array( 'proxy' => 'tcp://Proxy_host:Proxy_port', // set your HTTP proxy server here 'request_fulluri' => true, ),

        );
 $contents = file_get_contents($request->input('icon'), false, stream_context_create($options));
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue is locked due to inactivity