linuxserver / docker-filezilla

GNU General Public License v3.0
25 stars 1 forks source link

Blank screen on reverse proxy #7

Closed albertaparicio closed 1 year ago

albertaparicio commented 2 years ago

name: Bug report about: Blank screen on reverse proxy


linuxserver.io


Expected Behavior

When loading the app in the browser, the main Filezilla window should show, as it does when accessing the container directory on port 3000

Current Behavior

When using this container behind a reverse proxy I can only see a white screen. The browser tab name is "Guacamole Client" and I see the black dot for resizing the screen, but nothing else.

Looking at the developer console I see failed websocket requests (see screenshot below), so I suspect it has to do with the app not showing. However, I do not know what should I add to the nginx config.

image

Steps to Reproduce

  1. Setup a docker-compose config with an Nginx container and the Filezilla container linked to it
  2. Access the container through the proxy

This is the Nginx config I am using:

worker_processes  auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    # Filezilla - FTP Client
    server {
        listen 80;
        server_name ftp.mydomain.com;

        location / {
            proxy_pass http://ftp:3000;
        }
    }
}

The docker-compose config is as follows:

services:
  web:
    build: ./web
    restart: always
    ports:
      - "80:80"

    depends_on:
      - ftp

  ftp:
    image: lscr.io/linuxserver/filezilla
    restart: always
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
    volumes:
      - ftp_config:/config

The Dockerfile for the web container:

FROM nginx:stable-alpine

COPY nginx.conf /etc/nginx/nginx.conf

Environment

OS: Debian 11 CPU architecture: x86_64 How docker service was installed: Debian repos

Command used to create docker container (run/create/compose/screenshot)

$ docker-compose up

Docker logs

NOTE: In the log below, when accessing the app through the reverse proxy, no new log lines appear after the "listening on port 3000" one, which I find strange.

ftp_1        | -------------------------------------
ftp_1        |           _         ()
ftp_1        |          | |  ___   _    __
ftp_1        |          | | / __| | |  /  \
ftp_1        |          | | \__ \ | | | () |
ftp_1        |          |_| |___/ |_|  \__/
ftp_1        | 
ftp_1        | 
ftp_1        | Brought to you by linuxserver.io
ftp_1        | -------------------------------------
ftp_1        | 
ftp_1        | To support LSIO projects visit:
ftp_1        | https://www.linuxserver.io/donate/
ftp_1        | -------------------------------------
ftp_1        | GID/UID
ftp_1        | -------------------------------------
ftp_1        | 
ftp_1        | User uid:    1000
ftp_1        | User gid:    1000
ftp_1        | -------------------------------------
ftp_1        | 
ftp_1        | [cont-init.d] 10-adduser: exited 0.
ftp_1        | [cont-init.d] 13-keygen: executing... 
ftp_1        | [cont-init.d] 13-keygen: exited 0.
ftp_1        | [cont-init.d] 30-config: executing... 
ftp_1        | [cont-init.d] 30-config: exited 1.
ftp_1        | [cont-init.d] 50-gid-video: executing... 
ftp_1        | [cont-init.d] 50-gid-video: exited 0.
ftp_1        | [cont-init.d] 55-autostart-config: executing... 
ftp_1        | [cont-init.d] 55-autostart-config: exited 0.
ftp_1        | [cont-init.d] 56-openboxcopy: executing... 
ftp_1        | [cont-init.d] 56-openboxcopy: exited 1.
ftp_1        | [cont-init.d] 90-custom-folders: executing... 
ftp_1        | [cont-init.d] 90-custom-folders: exited 0.
ftp_1        | [cont-init.d] 99-custom-files: executing... 
ftp_1        | [custom-init] no custom files found exiting...
ftp_1        | [cont-init.d] 99-custom-files: exited 0.
ftp_1        | [cont-init.d] done.
ftp_1        | [services.d] starting services
ftp_1        | [guac-init] Auto start not set, application start on login
ftp_1        | [services.d] done.
ftp_1        | guacd[426]: INFO:    Guacamole proxy daemon (guacd) version 1.1.0 started
ftp_1        | guacd[426]: INFO:    Listening on host 0.0.0.0, port 4822
ftp_1        | Starting guacamole-lite websocket server
ftp_1        | listening on *:3000
github-actions[bot] commented 2 years ago

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

github-actions[bot] commented 2 years 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.

Pipazoul commented 2 years ago

You need to enable websocket support on your proxy

albertaparicio commented 1 year ago

I have tried adding a websocket location, but still get a blank screen

The nginx server config looks like this now

    # Filezilla - FTP Client
    server {
        listen 80;
        server_name ftp.mydomain.com;

    client_max_body_size 0;

        location / {
            proxy_pass http://ftp:3000;
        }

        location /guaclite/ {
        proxy_pass http://ftp:3000;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        access_log off;
    }
    }

I have tried both /guaclite and /guacamole/, with the same results

In the Developer Tools console I see these errors:

Firefox can’t establish a connection to the server at ws://ftp.mydomain.com/guaclite?token=eyJpdiI6InVNM1NpWWErME1zY0RuVklGSlBLNlE9PSIsInZhbHVlIjoiRnZXUDFTV09CK29FcGc0NWg4aS9aVmdaRE1LSmRMcmFYZjdmOTNoUmZVRVlSTVo5ekxCTzNmWEc3cDZxdUlUR3kwTnJyd3VYaUt2bnVLd1YzQyszS2JNc2h3L29FMUFZcERZb3ovVHgxQk82MWhnYkFVRm5JOXI3ZVI0aVZtR1hQMk02WVdzemIyU05zV01Od2FsRVFoT3B2Ukt3dVBvVkpFc2I5Qk56c1FTR0luSkFadzJ0MHRraHJCcjZ4ekluUy9rRU1XdjAzTmZQUDY4TlFqTkZONGRDSGZSVHVEOWFLcFFtQ3RtRVN5M29EWjVMZ1d0cnJjblc2MTFxV01nTiJ9&width=1920&height=933?undefined.

GET ws://ftp.mydomain.com/files/socket.io/?EIO=4&transport=websocket&sid=BhE5cS1m68bfI9S8AAAY 400 Bad Request

Do you have any idea of what is missing? I have no experience dealing with WebSocket apps

Thank you

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.

wertecs commented 1 year ago

@albertaparicio I'm not using Nginx but apache, I've got the same problem as you.

I managed to resolve it with the following config, hope it somehow helps you or others...

<VirtualHost *:80>
        ServerAdmin filezilla.home
        ServerName filezilla.home

        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteCond %{QUERY_STRING} transport=websocket    [NC]
        RewriteRule /(.*)           ws://localhost:5900/$1 [P,L]

        <Location "/guaclite">
                ProxyPass "ws://localhost:5900/guaclite"
        </Location>

        ProxyPass / http://localhost:5900/
        ProxyPassReverse / http://localhost:5900/
</VirtualHost>
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.

kvn95ss commented 1 year ago

I am facing the same problem, but I have not set up ngix configuration, at least not one that I'm aware of.

I've simply pulled the latest image, and used this docker-compose.yml

---
version: "2.1"
services:
  filezilla:
    image: lscr.io/linuxserver/filezilla:latest
    container_name: filezilla
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=911
      - PGID=911
      - TZ=Europe/London
    volumes:
      - /mnt/exome/WES_data/filezilla_output/:/config
      - /mnt/exome/tmp/docker/:/tmp
    ports:
      - 3000:3000
    restart: unless-stopped

When running docker-compose up, I got the below error when I tried to access it with URL.

filezilla    | listening on *:3000
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Client connection open
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Opening guacd connection
filezilla    | [2023-01-03 10:42:34] [Connection 1]  guacd connection open
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Selecting connection type: rdp
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Sending opCode: 6.select,3.rdp;
filezilla    | guacd[431]: INFO:        Creating new client for protocol "rdp"
filezilla    | guacd[431]: INFO:        Connection ID is "$66fa15e2-d38c-432e-865f-935f5f7e6715"
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Sending opCode: 4.size,4.1920,13.955?undefined,2.96;
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Sending opCode: 5.audio,9.audio/L16;
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Sending opCode: 5.video;
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Sending opCode: 5.image;
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Server sent handshake: 4.args,13.VERSION_1_1_0,8.hostname,4.port,6.domain,8.username,8.password,5.width,6.height,3.dpi,15.initial-program,11.color-depth,13.disable-audio,15.enable-printing,12.printer-name,12.enable-drive,10.drive-name,10.drive-path,17.create-drive-path,7.console,13.console-audio,13.server-layout,8.security,11.ignore-cert,12.disable-auth,10.remote-app,14.remote-app-dir,15.remote-app-args,15.static-channels,11.client-name,16.enable-wallpaper,14.enable-theming,21.enable-font-smoothing,23.enable-full-window-drag,26.enable-desktop-composition,22.enable-menu-animations,22.disable-bitmap-caching,25.disable-offscreen-caching,21.disable-glyph-caching,16.preconnection-id,18.preconnection-blob,8.timezone,14.recording-path,14.recording-name,24.recording-exclude-output,23.recording-exclude-mouse,22.recording-include-keys,21.create-recording-path,13.resize-method,18.enable-audio-input,9.read-only,16.gateway-hostname,12.gateway-port,14.gateway-domain,16.gateway-username,16.gateway-password,17.load-balance-info
filezilla    | [2023-01-03 10:42:34] [Connection 1]  Sending opCode: 7.connect,0.,9.127.0.0.1,4.3389,0.,3.abc,3.abc,4.1920,13.955?undefined,2.96,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,12.en-us-qwerty,3.any,4.true,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.;
filezilla    | guacd[456]: INFO:        Security mode: Negotiate (ANY)
filezilla    | guacd[456]: INFO:        Resize method: none
filezilla    | guacd[456]: INFO:        User "@2d5baefa-ef10-42c1-9e09-66f9e4784824" joined connection "$66fa15e2-d38c-432e-865f-935f5f7e6715" (1 users now present)
filezilla    | guacd[456]: INFO:        Loading keymap "base"
filezilla    | guacd[456]: INFO:        Loading keymap "en-us-qwerty"
filezilla    | xauth:  unable to write authority file .Xauthority-n
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