Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] Failed to connect #259

Open
tin607 opened this issue Sep 20, 2024 · 4 comments
Open

[Bug] Failed to connect #259

tin607 opened this issue Sep 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@tin607
Copy link

tin607 commented Sep 20, 2024

Current Behavior

I can open the login page and successfully log in, then enter the page shown in the picture。
Snipaste_2024-09-20_13-48-38

Expected Behavior

I don't know the cause of the problem.

Steps To Reproduce

No response

Environment

  • OS:Ubuntu
  • OS version:Linux win 6.8.0-45-generic # 45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • CPU:N100(intel x86-64)
  • Docker version:
    Client: Docker Engine - Community
    Version: 27.2.1
    API version: 1.47
    Go version: go1.22.7
    Git commit: 9e34c9b
    Built: Fri Sep 6 12:08:02 2024
    OS/Arch: linux/amd64
    Context: default

Server: Docker Engine - Community
Engine:
Version: 27.2.1
API version: 1.47 (minimum version 1.24)
Go version: go1.22.7
Git commit: 8b539b8
Built: Fri Sep 6 12:08:02 2024
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.7.22
GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc:
Version: 1.1.14
GitCommit: v1.1.14-0-g2c9f560
docker-init:
Version: 0.19.0
GitCommit: de40ad0

  • Device model:
    Web access data flow: Local browser(Firefox) --> VPS(Nginx) --> VPS(FRP Server) --> N100(FRP Client) --> Docker Firefox
    VPS: Alibaba Cloud Server, OS Ubuntu
    FRP: https://github.com/fatedier/frp
  • Browser/OS:Firefox

Container creation

services:
  firefox:
    image: jlesage/firefox
    container_name: firefox
    ports:
      - "5800:5800"
    volumes:
      - "./config:/config:rw"
    restart: unless-stopped
    environment:
      - USER_ID=0
      - GROUP_ID=0
      - LANG=zh_CN.UTF-8
      - TZ=Asia/Shanghai
      - KEEP_APP_RUNNING=1
      - WEB_AUDIO=1
      - WEB_AUTHENTICATION=1
      - SECURE_CONNECTION=1
      - WEB_AUTHENTICATION_USERNAME=admin
      - WEB_AUTHENTICATION_PASSWORD=admin
      - VNC_PASSWORD=admin
      - ENABLE_CJK_FONT=1
      - FF_PREF_HTTP_PROXY=network.proxy.http="192.168.1.4:3443"
      - HTTP_PROXY=http://192.168.1.4:3443
      - HTTPS_PROXY=http://192.168.1.4:3443
    networks:
      - n100-ubuntu-network
    dns:
      - 8.8.8.8
      - 8.8.4.4

networks:
  n100-ubuntu-network:
    name: n100-ubuntu-network
    external: true

Container log

root@win:~/firefox# docker logs firefox 
[init        ] container is starting...
[cont-env    ] loading container environment variables...
[cont-env    ] APP_NAME: loading...
[cont-env    ] APP_VERSION: loading...
[cont-env    ] DISPLAY: executing...
[cont-env    ] DISPLAY: terminated successfully.
[cont-env    ] DISPLAY: loading...
[cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env    ] DOCKER_IMAGE_VERSION: loading...
[cont-env    ] EGL_LOG_LEVEL: executing...
[cont-env    ] EGL_LOG_LEVEL: terminated successfully.
[cont-env    ] EGL_LOG_LEVEL: loading...
[cont-env    ] GSK_RENDERER: executing...
[cont-env    ] GSK_RENDERER: terminated successfully.
[cont-env    ] GSK_RENDERER: loading...
[cont-env    ] GTK2_RC_FILES: executing...
[cont-env    ] GTK2_RC_FILES: terminated successfully.
[cont-env    ] GTK2_RC_FILES: not setting variable.
[cont-env    ] GTK_THEME: executing...
[cont-env    ] GTK_THEME: terminated successfully.
[cont-env    ] GTK_THEME: not setting variable.
[cont-env    ] HOME: loading...
[cont-env    ] LIBGL_DRIVERS_PATH: executing...
[cont-env    ] LIBGL_DRIVERS_PATH: terminated successfully.
[cont-env    ] LIBGL_DRIVERS_PATH: not setting variable.
[cont-env    ] PULSE_CONFIG_PATH: executing...
[cont-env    ] PULSE_CONFIG_PATH: terminated successfully.
[cont-env    ] PULSE_CONFIG_PATH: loading...
[cont-env    ] PULSE_COOKIE: executing...
[cont-env    ] PULSE_COOKIE: terminated successfully.
[cont-env    ] PULSE_COOKIE: loading...
[cont-env    ] PULSE_SERVER: executing...
[cont-env    ] PULSE_SERVER: terminated successfully.
[cont-env    ] PULSE_SERVER: loading...
[cont-env    ] QT_STYLE_OVERRIDE: executing...
[cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env    ] QT_STYLE_OVERRIDE: not setting variable.
[cont-env    ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env    ] XDG_CACHE_HOME: loading...
[cont-env    ] XDG_CONFIG_HOME: loading...
[cont-env    ] XDG_DATA_HOME: loading...
[cont-env    ] XDG_RUNTIME_DIR: loading...
[cont-env    ] XDG_STATE_HOME: loading...
[cont-env    ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init   ] executing container initialization scripts...
[cont-init   ] 10-certs.sh: executing...
[cont-init   ] 10-certs.sh: terminated successfully.
[cont-init   ] 10-check-app-niceness.sh: executing...
[cont-init   ] 10-check-app-niceness.sh: terminated successfully.
[cont-init   ] 10-clean-logmonitor-states.sh: executing...
[cont-init   ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init   ] 10-clean-tmp-dir.sh: executing...
[cont-init   ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init   ] 10-fontconfig-cache-dir.sh: executing...
[cont-init   ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init   ] 10-init-users.sh: executing...
[cont-init   ] 10-init-users.sh: terminated successfully.
[cont-init   ] 10-nginx.sh: executing...
[cont-init   ] 10-nginx.sh: terminated successfully.
[cont-init   ] 10-openbox.sh: executing...
[cont-init   ] 10-openbox.sh: terminated successfully.
[cont-init   ] 10-pkgs-mirror.sh: executing...
[cont-init   ] 10-pkgs-mirror.sh: terminated successfully.
[cont-init   ] 10-pulse.sh: executing...
[cont-init   ] 10-pulse.sh: terminated successfully.
[cont-init   ] 10-set-tmp-dir-perms.sh: executing...
[cont-init   ] 10-set-tmp-dir-perms.sh: terminated successfully.
[cont-init   ] 10-vnc-password.sh: executing...
[cont-init   ] 10-vnc-password.sh: creating VNC password file from environment variable...
[cont-init   ] 10-vnc-password.sh: terminated successfully.
[cont-init   ] 10-web-data.sh: executing...
[cont-init   ] 10-web-data.sh: terminated successfully.
[cont-init   ] 10-webauth.sh: executing...
[cont-init   ] 10-webauth.sh: Updating password for user underarm8942
[cont-init   ] 10-webauth.sh: terminated successfully.
[cont-init   ] 10-x11-unix.sh: executing...
[cont-init   ] 10-x11-unix.sh: terminated successfully.
[cont-init   ] 10-xdg-runtime-dir.sh: executing...
[cont-init   ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init   ] 15-cjk-font.sh: executing...
[cont-init   ] 15-cjk-font.sh: installing CJK font...
[cont-init   ] 15-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
[cont-init   ] 15-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
[cont-init   ] 15-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
[cont-init   ] 15-cjk-font.sh: (1/1) Installing font-wqy-zenhei (0.9.45-r3)
[cont-init   ] 15-cjk-font.sh: Executing fontconfig-2.15.0-r1.trigger
[cont-init   ] 15-cjk-font.sh: Executing mkfontscale-1.2.2-r6.trigger
[cont-init   ] 15-cjk-font.sh: OK: 588 MiB in 164 packages
[cont-init   ] 15-cjk-font.sh: terminated successfully.
[cont-init   ] 15-install-pkgs.sh: executing...
[cont-init   ] 15-install-pkgs.sh: terminated successfully.
[cont-init   ] 55-check-snd.sh: executing...
[cont-init   ] 55-check-snd.sh: sound not supported: device /dev/snd not exposed to the container.
[cont-init   ] 55-check-snd.sh: terminated successfully.
[cont-init   ] 55-firefox.sh: executing...
[cont-init   ] 55-firefox.sh: terminated successfully.
[cont-init   ] 56-firefox-set-prefs-from-env.sh: executing...
[cont-init   ] 56-firefox-set-prefs-from-env.sh: Setting preference 'network.proxy.http'...
[cont-init   ] 56-firefox-set-prefs-from-env.sh: terminated successfully.
[cont-init   ] 85-take-config-ownership.sh: executing...
[cont-init   ] 85-take-config-ownership.sh: terminated successfully.
[cont-init   ] 89-info.sh: executing...
    ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           Firefox                                       │
    │ Application Version:   128.0.3-r0                                    │
    │ Docker Image Version:  24.08.1                                       │
    │ Docker Image Platform: linux/amd64                                   │
    │                                                                      │
    ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init   ] 89-info.sh: terminated successfully.
[cont-init   ] all container initialization scripts executed.
[init        ] giving control to process supervisor.
[supervisor  ] loading services...
[supervisor  ] loading service 'default'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] loading service 'app'...
[supervisor  ] loading service 'gui'...
[supervisor  ] loading service 'xcompmgr'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'webauth'...
[supervisor  ] loading service 'audiorecorder'...
[supervisor  ] loading service 'pulseaudio'...
[supervisor  ] all services loaded.
[supervisor   ] starting services...
[supervisor   ] starting service 'xvnc'...
[logrotate    ] warning: Potentially dangerous mode on /opt/base/etc/logrotate.conf: 0666
[logrotate    ] error: Ignoring /opt/base/etc/logrotate.conf because it is writable by group or others.
[xvnc         ] Xvnc TigerVNC 1.13.1 - built Jun 29 2024 04:32:59
[xvnc         ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
[xvnc         ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc         ] Underlying X server release 12014000
[xvnc         ] Fri Sep 20 13:38:09 2024
[xvnc         ]  vncext:      VNC extension running!
[xvnc         ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc         ]  vncext:      created VNC server for screen 0
[supervisor   ] starting service 'openbox'...
[supervisor   ] starting service 'xcompmgr'...
[supervisor   ] starting service 'webauth'...
[supervisor   ] starting service 'nginx'...
[nginx        ] Listening for HTTPs connections on port 5800.
[supervisor   ] starting service 'pulseaudio'...
[pulseaudio   ] W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
[supervisor   ] starting service 'audiorecorder'...
[audiorecorder] server ready, waiting connections
[audiorecorder] PulseAudio server connection established
[supervisor   ] starting service 'app'...
[app          ] Mozilla Firefox 128.0.3
[supervisor   ] all services started.


### Container inspect

```text
root@win:~/firefox# docker inspect firefox 
[
    {
        "Id": "b0be0ff419291f7ed48987606f36b46ac61cfea71ef9b09d48f3b0a21c3965f8",
        "Created": "2024-09-20T05:38:05.600319237Z",
        "Path": "/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 95667,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-09-20T05:38:05.703897823Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:7d9895d870c2160e7a73453f37433efcacc69ca903f8fced8b6c1b0a6729b74b",
        "ResolvConfPath": "/var/lib/docker/containers/b0be0ff419291f7ed48987606f36b46ac61cfea71ef9b09d48f3b0a21c3965f8/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/b0be0ff419291f7ed48987606f36b46ac61cfea71ef9b09d48f3b0a21c3965f8/hostname",
        "HostsPath": "/var/lib/docker/containers/b0be0ff419291f7ed48987606f36b46ac61cfea71ef9b09d48f3b0a21c3965f8/hosts",
        "LogPath": "/var/lib/docker/containers/b0be0ff419291f7ed48987606f36b46ac61cfea71ef9b09d48f3b0a21c3965f8/b0be0ff419291f7ed48987606f36b46ac61cfea71ef9b09d48f3b0a21c3965f8-json.log",
        "Name": "/firefox",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/root/firefox/config:/config:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "5152a6d25ffb5b5cc2821fa78c7dafc8782d67158c732f34f3dd3604ac704dd1",
            "PortBindings": {
                "5800/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5800"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [
                "8.8.8.8",
                "8.8.4.4"
            ],
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": [],
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/0eff5744490e4ed445930da31bc4ec2b0ae40f1ca93861a9ccc689ad27bbef84-init/diff:/var/lib/docker/overlay2/5003daf3feb8f3bc70a42f48f7279eed9a135e1694121efb6f7fb0c9e0a5e68a/diff:/var/lib/docker/overlay2/933a380332793ff42ee4f08602aaa72ce788f8a0885115dfe765d880aba063f0/diff:/var/lib/docker/overlay2/2250e357b013496f9c7b9559d763383f48330c1b75fce93a54da2fe2acc85a9e/diff:/var/lib/docker/overlay2/0a52b19a09f163467624f7011fd4b2ff272e0d8f761761b4e53c804f7c9d938b/diff:/var/lib/docker/overlay2/9c8d1ccda18bf7b426407ea9f957392cf985bdd04c2110b3364b80a843d157e3/diff:/var/lib/docker/overlay2/14d0ac45c2ce1157051a6023cfb08b7bdf7fe43dfff9c954898302e56e215332/diff:/var/lib/docker/overlay2/1ec75b91056b3a111652a630bbc688cfab8745c63b051a881d8e801cc7af941d/diff:/var/lib/docker/overlay2/2c7352ed4d96883361e95ecd4fffa94875b73dd3f7685ec4372b116de061f13b/diff:/var/lib/docker/overlay2/b29e655a3a8e04449fd864d374636c75a25de3e144b69043e7e8b4cf8a4d32fd/diff:/var/lib/docker/overlay2/cea2d8469106fd02575a11f61197e6dd1a9312d6808ced481006935f7d44aa51/diff:/var/lib/docker/overlay2/45a5501452c7ceabc0c3fd392b39d5b7b36f073baafc1549df63b065985a2ade/diff:/var/lib/docker/overlay2/e45154bf7711f33bb521260c0935d18a83a5af2a16a3f53b2cc248bf04dac4f4/diff:/var/lib/docker/overlay2/df8a25fcdcd4ae06a635b62d8e1beda287187814d41b7a360997f008e9c5ccb9/diff:/var/lib/docker/overlay2/8abf79e5b9255bfa13de7bcab9734810fd59b877d8819862b762d067f765e50c/diff:/var/lib/docker/overlay2/56d31f897c391cbfb21e2051b9d71d4b7361bc44e6b09ffef4f7e3c8a0825daa/diff:/var/lib/docker/overlay2/9a809eff77d97e64162ed99ba03bb6c2cb7e75c73ff4714f4ee99935c8722a06/diff:/var/lib/docker/overlay2/16a53392a972a19780ac218fededf45cca759601533d639cdbe2dabca9d317be/diff:/var/lib/docker/overlay2/d049ab926c85d8dc9ccdfb5c26f8db1401006a868a1324d35f4644bbfe85a984/diff:/var/lib/docker/overlay2/b262f661107997f4f2002e73e8fd8351f564c77976b6a73427b5e08aeea12e24/diff:/var/lib/docker/overlay2/41cf3922917c9d7b42237e451bc1a87a4a387a3eeac9b5a905167b27d48c7780/diff:/var/lib/docker/overlay2/ff1fefb0875182c1ae452b13c4a2e8d00b962f139fc57fa6b79c7ccd33e64e9f/diff:/var/lib/docker/overlay2/b342ecc9263360fbb6ea9c0e8a34b8e342b8640ec8786857c6fce4c0a3aa7eee/diff:/var/lib/docker/overlay2/3d34bc27db603860d20dd4a2ad82d537e820d096e1d22b4e5ad1a7ae1a894708/diff:/var/lib/docker/overlay2/3c255aeaac0f87dfe9b9542c40f2fec1581326676b17f043089826e0b055f332/diff:/var/lib/docker/overlay2/a25d860506f2a1f4bb3dbcc65571f2ddbbc57bf056436c1c90b9f5b17dea0844/diff:/var/lib/docker/overlay2/ccd882d1dc14babe3eeff8e95b587c0d7cde10e6dbcfab370eec2231073316d3/diff:/var/lib/docker/overlay2/783c7d35ede72151f11a7f37a1dc847c03036a4ceb2c1c791e470789d262426b/diff:/var/lib/docker/overlay2/f107eaee92c299983a2391cbe26930ab81e46712817014f7f57d6e42f423bb51/diff:/var/lib/docker/overlay2/0407d19e979b16a1503df959e8cf24c53233356825df6ec31e91d98cac1110df/diff:/var/lib/docker/overlay2/fdedbe4e029d1931983ca34951e2b74515455c97e0a141d9f44d749c4f373e3d/diff:/var/lib/docker/overlay2/7f5045f5ede562ead6e07130a23ea2416c7356685edf4feb0915d2c6f41fbc9a/diff:/var/lib/docker/overlay2/2b01a269b9eaefc51e8dae089aff358cf1f2c3d64d04767305047297a27ffad1/diff:/var/lib/docker/overlay2/32cc5db5b97a689858d89638b7cb96ee0bb3a0b897193951d7136b7818b18b13/diff:/var/lib/docker/overlay2/90311b3e953e1afe183b6476691e45cc858f3e5388bb02b3a31f771ec05b07f7/diff:/var/lib/docker/overlay2/21876041a7e25171da09718e51302f71d1d011a25a523a4b4208044d8ac68097/diff:/var/lib/docker/overlay2/9feefc64dcce35132e37b031ea3df0c5a7b9d26d3e6a0d2d19335a69772cc1ce/diff:/var/lib/docker/overlay2/43142aa7c2937f748f50e257da01405bd05012a15bdff593248ee2336857f4b9/diff:/var/lib/docker/overlay2/e270ad63409d24cdd3a0696676490528050fbad4deda9b1815e560960f762ffa/diff:/var/lib/docker/overlay2/7a185835e8b16bfdf79f346e60b6dfda1de8719e8431aed06168116b69babb23/diff:/var/lib/docker/overlay2/f785285e7d1914442d0a5ece6557f4cb58d7667220ab285b6fd76bde41dc4594/diff:/var/lib/docker/overlay2/928c3926e00ba15d31b76da1b0068b17e8a6d9c8536f932c2f1828b0133e83ce/diff:/var/lib/docker/overlay2/18c6dff78449fa5b05d9c4a2a088a2cbf280becbbf23480f8fe45c7e7ea357ab/diff",
                "MergedDir": "/var/lib/docker/overlay2/0eff5744490e4ed445930da31bc4ec2b0ae40f1ca93861a9ccc689ad27bbef84/merged",
                "UpperDir": "/var/lib/docker/overlay2/0eff5744490e4ed445930da31bc4ec2b0ae40f1ca93861a9ccc689ad27bbef84/diff",
                "WorkDir": "/var/lib/docker/overlay2/0eff5744490e4ed445930da31bc4ec2b0ae40f1ca93861a9ccc689ad27bbef84/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/root/firefox/config",
                "Destination": "/config",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "b0be0ff41929",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "5800/tcp": {},
                "5900/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "WEB_AUTHENTICATION=1",
                "HTTPS_PROXY=http://192.168.1.4:3443",
                "KEEP_APP_RUNNING=1",
                "FF_PREF_HTTP_PROXY=network.proxy.http=\"192.168.1.4:3443\"",
                "WEB_AUTHENTICATION_PASSWORD=uUN4Tt*5kmo6Qc",
                "ENABLE_CJK_FONT=1",
                "HTTP_PROXY=http://192.168.1.4:3443",
                "WEB_AUTHENTICATION_USERNAME=underarm8942",
                "SECURE_CONNECTION=1",
                "USER_ID=0",
                "TZ=Asia/Shanghai",
                "GROUP_ID=0",
                "LANG=zh_CN.UTF-8",
                "WEB_AUDIO=1",
                "VNC_PASSWORD=uUN4Tt*5kmo6Qc",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/base/sbin:/opt/base/bin",
                "ENV=/root/.docker_rc",
                "SUP_GROUP_IDS=",
                "UMASK=0022",
                "APP_NICENESS=0",
                "INSTALL_PACKAGES=",
                "PACKAGES_MIRROR=",
                "CONTAINER_DEBUG=0",
                "DISPLAY_WIDTH=1920",
                "DISPLAY_HEIGHT=1080",
                "DARK_MODE=0",
                "SECURE_CONNECTION_VNC_METHOD=SSL",
                "SECURE_CONNECTION_CERTS_CHECK_INTERVAL=60",
                "WEB_LISTENING_PORT=5800",
                "VNC_LISTENING_PORT=5900",
                "WEB_AUTHENTICATION_DEFAULT_USERNAME=",
                "WEB_AUTHENTICATION_DEFAULT_PASSWORD=",
                "FF_OPEN_URL=",
                "FF_KIOSK=0",
                "FF_CUSTOM_ARGS="
            ],
            "Cmd": [
                "/init"
            ],
            "Image": "jlesage/firefox",
            "Volumes": {
                "/config": {}
            },
            "WorkingDir": "/tmp",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "80c5cd0efd6a5f57dfda8bc6679efa5641a46b589a17724ec1bee2025375dd46",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.depends_on": "",
                "com.docker.compose.image": "sha256:7d9895d870c2160e7a73453f37433efcacc69ca903f8fced8b6c1b0a6729b74b",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "firefox",
                "com.docker.compose.project.config_files": "/root/firefox/docker-compose.yml",
                "com.docker.compose.project.working_dir": "/root/firefox",
                "com.docker.compose.service": "firefox",
                "com.docker.compose.version": "2.29.2",
                "org.label-schema.description": "Docker container for Firefox",
                "org.label-schema.name": "firefox",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.vcs-url": "https://github.com/jlesage/docker-firefox",
                "org.label-schema.version": "24.08.1"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "ec7c030c4b110b9efb36ec17ddfdc9e8c098fc247568b4adc2e79904339688a7",
            "SandboxKey": "/var/run/docker/netns/ec7c030c4b11",
            "Ports": {
                "5800/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5800"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "5800"
                    }
                ],
                "5900/tcp": null
            },
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "n100-ubuntu-network": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "firefox",
                        "firefox"
                    ],
                    "MacAddress": "02:42:c0:a8:06:06",
                    "DriverOpts": null,
                    "NetworkID": "5152a6d25ffb5b5cc2821fa78c7dafc8782d67158c732f34f3dd3604ac704dd1",
                    "EndpointID": "bb6325d0aef06f73b254fcefa88966863b33e412b9cae61afe6db77c3f6783fa",
                    "Gateway": "192.168.6.1",
                    "IPAddress": "192.168.6.6",
                    "IPPrefixLen": 24,
                    "IPv6Gateway": "fd9c:b257:14f2::1",
                    "GlobalIPv6Address": "fd9c:b257:14f2::6",
                    "GlobalIPv6PrefixLen": 64,
                    "DNSNames": [
                        "firefox",
                        "b0be0ff41929"
                    ]
                }
            }
        }
    }
]

Anything else?

Nginx Reverse Proxy

upstream upstream_firefox {
    server frps:6000 max_fails=3 fail_timeout=3s weight=10;
}

server {
    listen 80;
    listen [::]:80;
    server_name firefox.example.com;

    return 301 https://firefox.example.com$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name firefox.example.com;

    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
    add_header X-Frame-Options "SAMEORIGIN";

    charset utf8;

    access_log  /var/log/nginx/frps/firefox.example.com/access.log  main;
    error_log   /var/log/nginx/frps/firefox.example.com/error.log   warn;

    location / {
        #proxy_next_upstream error timeout invalid_header http_500 http_503;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Upgrade $http_upgrade;
        proxy_pass http://upstream_firefox;
        proxy_redirect off;
        #proxy_connect_timeout 86400s;
        #proxy_send_timeout 86400s;
        #proxy_read_timeout 86400s;
        proxy_http_version 1.1;

        #proxy_buffering on;
        #proxy_buffer_size 1024k;
        #proxy_buffers 32 64k;
        #proxy_busy_buffers_size 1024k;
        #proxy_temp_file_write_size 1024k;
    }
   
    location /websockify {
        proxy_pass http://upstream_firefox;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_read_timeout 86400;
    }

    # ssl on;
    ssl_certificate /etc/nginx/ssl/frps/firefox.example.com/cert.pem;
    ssl_certificate_key /etc/nginx/ssl/frps/firefox.example.com/key.pem;
    ssl_session_timeout  5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers  on;
}

frpc

[[proxies]]
name = "firefox"
type = "http"
subdomain = "firefox"
customDomains = ["firefox.example.com"]
transport.useEncryption = true
transport.useCompression = false
[proxies.plugin]
type = "http2https"
localAddr = "192.168.1.6:5800"
hostHeaderRewrite = "firefox.example.com"
requestHeaders.set.x-from-where = "frp"
@tin607 tin607 added the bug Something isn't working label Sep 20, 2024
@tin607
Copy link
Author

tin607 commented Oct 10, 2024

config/log/firefox/error.log

[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.310: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.311: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.311: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.311: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.311: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.311: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.311: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.311: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.313: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.313: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.313: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.313: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.314: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.314: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.314: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.314: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.427: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.427: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.427: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.427: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.428: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.428: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.428: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.428: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.428: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.428: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.428: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.428: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.429: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.429: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[Parent 950, Main Thread] WARNING: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): Gdk-CRITICAL **: 10:30:18.429: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[Parent 950, Main Thread] WARNING: g_object_unref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /home/buildozer/aports/community/firefox/src/firefox-130.0.1/toolkit/xre/nsSigHandlers.cpp:187

(firefox:950): GLib-GObject-CRITICAL **: 10:30:18.429: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

@jlesage
Copy link
Owner

jlesage commented Oct 10, 2024

The problem is most likely with the reverse proxy. Can you try to connect using the IP of the host running the container ?

@ashuai27
Copy link

i have the same question,if i only use ip to run the container,it will work well. however i use nginx ,it will break down after i don't have any action.if i keep using it,it will keep going on normally

@jlesage
Copy link
Owner

jlesage commented Dec 19, 2024

See https://github.com/jlesage/docker-firefox?tab=readme-ov-file#reverse-proxy for Nginx config examples.
The proxy_read_timeout 86400; setting if probably what you need if you are getting disconnected after some inactivity time.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants