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

[Support]: [Errno 98] Address already in use #5444

Closed
cvocvo opened this issue Feb 10, 2023 · 17 comments
Closed

[Support]: [Errno 98] Address already in use #5444

cvocvo opened this issue Feb 10, 2023 · 17 comments
Labels
beta Related to the current beta version of frigate support triage

Comments

@cvocvo
Copy link

cvocvo commented Feb 10, 2023

Describe the problem you are having

Moved from stable to beta on a raspberry pi 4 to try and get hardware acceleration going, however, I am running into an issue where it says NGINX isn't found? Not sure how to proceed here; any help would be much appreciated. Thank you!

Version

0.12.0-beta7

Frigate config file

#based on: https://docs.frigate.video/guides/getting_started/
# and this; https://docs.frigate.video/configuration/index/
mqtt:
  host: 192.168.{redacted}
  user: {redacted}
  password: {redacted}

cameras:
  babycam:
    ffmpeg:
      inputs:
        - path: rtsp://{redacted}/live
          roles:
            - detect
            - rtmp
    rtmp:
      enabled: True # <-- RTMP should be disabled if your stream is not H264

    detect:
      width: 1920
      height: 1080

ffmpeg:
#  hwaccel_args: -c:v h264_v4l2m2m
  output_args:
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    rtmp: -f flv -c:v copy -c:a aac

Relevant log output

s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service frigate: starting
[INFO] Preparing go2rtc config...
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[INFO] Starting Frigate...
[INFO] Starting NGINX...
2023-02-10 01:40:12.952203296  ./run.user: line 11: exec: nginx: not found
s6-rc: info: service legacy-services successfully started
Service NGINX exited with code 127 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service nginx-log successfully stopped
Service Frigate exited with code 256 (by signal 15)
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service frigate-log successfully stopped
Service go2rtc exited with code 256 (by signal 15)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service frigate: starting
[INFO] Preparing go2rtc config...
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
[INFO] Starting Frigate...
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[INFO] Starting NGINX...
2023-02-10 01:40:31.335983758  ./run.user: line 11: exec: nginx: not found
Service NGINX exited with code 127 (by signal 0)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service nginx-log successfully stopped
Service Frigate exited with code 256 (by signal 15)
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service frigate-log successfully stopped
Service go2rtc exited with code 256 (by signal 15)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

FFprobe output from your camera

N/A won't start

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Wyze Cam v3

Any other information that may be helpful

No response

@NickM-27 NickM-27 added the beta Related to the current beta version of frigate label Feb 10, 2023
@NickM-27
Copy link
Sponsor Collaborator

Please read the release notes, this is covered https://github.com/blakeblackshear/frigate/releases/tag/v0.12.0-beta7

@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

Thanks, I removed the PATH variable override in Portainer and it starts now but yields a different problem.

What I removed (PATH variable shown below):
image

What I see:
image

Logs:

s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service go2rtc successfully started
s6-rc: info: service frigate: starting
[INFO] Preparing go2rtc config...
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[INFO] Starting Frigate...
[INFO] Starting NGINX...
s6-rc: info: service legacy-services successfully started
[INFO] Starting go2rtc...
2023-02-10 02:02:25.791685703  02:02:25.791 INF go2rtc version 1.1.1 linux/arm64
2023-02-10 02:02:25.792875779  02:02:25.792 INF [api] listen addr=:1984
2023-02-10 02:02:25.794082965  02:02:25.793 INF [rtsp] listen addr=:8554
2023-02-10 02:02:25.795445743  02:02:25.795 INF [srtp] listen addr=:8443
2023-02-10 02:02:25.796605023  02:02:25.796 INF [webrtc] listen addr=:8555
2023-02-10 02:02:27.229270880  2023/02/10 02:02:27 [error] 129#129: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.45.142, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001/stats", host: "192.168.23.215:5000"
2023-02-10 02:02:27.229829872  192.168.45.142 - - [10/Feb/2023:02:02:27 +0000] "GET /api/stats HTTP/1.1" 502 157 "-" "HomeAssistant/2023.2.3 aiohttp/3.8.1 Python/3.10" "-"
2023-02-10 02:02:28.875144036  [2023-02-10 02:02:28] frigate.app                    INFO    : Starting Frigate (0.12.0-66881eb)
[2023-02-10 02:02:28] frigate.app                    INFO    : Starting Frigate (0.12.0-66881eb)
2023-02-10 02:02:28.916372623  [2023-02-10 02:02:28] frigate.config                 WARNING : RTMP restream is deprecated in favor of the restream role, recommend disabling RTMP.
[2023-02-10 02:02:28] frigate.config                 WARNING : RTMP restream is deprecated in favor of the restream role, recommend disabling RTMP.
2023-02-10 02:02:28.942254722  [2023-02-10 02:02:28] peewee_migrate                 INFO    : Starting migrations
[2023-02-10 02:02:28] peewee_migrate                 INFO    : Starting migrations
2023-02-10 02:02:28.957347325  [2023-02-10 02:02:28] peewee_migrate                 INFO    : There is nothing to migrate
[2023-02-10 02:02:28] peewee_migrate                 INFO    : There is nothing to migrate
[Errno 98] Address already in use
2023-02-10 02:02:29.032682803  [2023-02-10 02:02:29] frigate.app                    INFO    : Output process started: 297
2023-02-10 02:02:29.059285762  [2023-02-10 02:02:29] detector.cpu                   INFO    : Starting detection process: 296
2023-02-10 02:02:29.061533712  [2023-02-10 02:02:29] frigate.app                    INFO    : Camera processor started for babycam: 300
2023-02-10 02:02:29.075707735  [2023-02-10 02:02:29] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2023-02-10 02:02:29.076698147  [2023-02-10 02:02:29] frigate.app                    INFO    : Capture process started for babycam: 301
2023-02-10 02:02:29.395085448  'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
2023-02-10 02:02:29.744262910  'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
2023-02-10 02:02:29.744360742  'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
2023-02-10 02:02:29.958677358  [2023-02-10 02:02:29] frigate.app                    INFO    : Stopping...
2023-02-10 02:02:29.961339284  [2023-02-10 02:02:29] frigate.events                 INFO    : Exiting event cleanup...
2023-02-10 02:02:29.962104495  [2023-02-10 02:02:29] frigate.record                 INFO    : Exiting recording maintenance...
s6-rc: info: service nginx-log successfully stopped
2023-02-10 02:02:29.963024204  [2023-02-10 02:02:29] frigate.record                 INFO    : Exiting recording cleanup...
2023-02-10 02:02:29.963487068  [2023-02-10 02:02:29] frigate.storage                INFO    : Exiting storage maintainer...
2023-02-10 02:02:32.901479002  [2023-02-10 02:02:32] frigate.video                  ERROR   : babycam: Unable to read frames from ffmpeg process.
2023-02-10 02:02:32.902803317  [2023-02-10 02:02:32] frigate.video                  ERROR   : babycam: ffmpeg process is not running. exiting capture thread...
2023-02-10 02:02:39.048829911  [2023-02-10 02:02:39] frigate.object_processing      INFO    : Exiting object processor...
2023-02-10 02:02:39.733191386  [2023-02-10 02:02:39] frigate.stats                  INFO    : Exiting watchdog...
2023-02-10 02:02:39.734150262  [2023-02-10 02:02:39] frigate.events                 INFO    : Exiting event processor...
2023-02-10 02:02:39.748420172  [2023-02-10 02:02:39] frigate.watchdog               INFO    : Exiting watchdog...
2023-02-10 02:02:39.750800268  [2023-02-10 02:02:39] peewee.sqliteq                 INFO    : writer received shutdown request, exiting.
2023-02-10 02:02:39.751573202  [2023-02-10 02:02:39] root                           INFO    : Waiting for detection process to exit gracefully...
Service Frigate exited with code 0 (by signal 0)
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
2023-02-10 02:02:50.304173869  exit OK
s6-rc: info: service frigate-log successfully stopped
Service go2rtc exited with code 0 (by signal 0)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@NickM-27
Copy link
Sponsor Collaborator

looks like the container uses a port that another one of your containers also is using

@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

Hmm odd, I've only dipped my toes into docker/portainer so I don't have much running:
image

After a bit it does restart and it shows the port bindings for frigate:
image

@NickM-27
Copy link
Sponsor Collaborator

what network mode is frigate running in?

@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

Just the default I believe, I tried a macvlan when I first tested the stable build and couldn't get that to work so I just went back to the default.

image

image

This is the full info from Inspect:



{
    "AppArmorProfile": "",
    "Args": [
        "python3",
        "-u",
        "-m",
        "frigate"
    ],
    "Config": {
        "AttachStderr": true,
        "AttachStdin": false,
        "AttachStdout": true,
        "Cmd": [
            "python3",
            "-u",
            "-m",
            "frigate"
        ],
        "Domainname": "",
        "Entrypoint": [
            "/init"
        ],
        "Env": [
            "FRIGATE_RTSP_PASSWORD={REDACTED}",
            "NVIDIA_DRIVER_CAPABILITIES=compute,video,utility",
            "FLASK_ENV=development",
            "NVIDIA_VISIBLE_DEVICES=all",
            "S6_LOGGING_SCRIPT=T 1 n0 s10000000 T",
            "PATH=/usr/lib/btbn-ffmpeg/bin:/usr/local/go2rtc/bin:/usr/local/nginx/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        ],
        "ExposedPorts": {
            "1935/tcp": {},
            "5000/tcp": {},
            "8554/tcp": {},
            "8555/tcp": {},
            "8555/udp": {}
        },
        "Hostname": "frigate",
        "Image": "ghcr.io/blakeblackshear/frigate:0.12.0-beta7",
        "Labels": {
            "com.docker.compose.config-hash": "e3e53720affb10ab165ae55b51128a8ffae141d8a11590fd40e470a9d5755c56",
            "com.docker.compose.container-number": "1",
            "com.docker.compose.depends_on": "",
            "com.docker.compose.image": "sha256:0052cf172e7a3d507064eb5d73438ce8b43ed31751107cca09a36ab4a91256ed",
            "com.docker.compose.oneoff": "False",
            "com.docker.compose.project": "frigate",
            "com.docker.compose.project.config_files": "/data/compose/3/docker-compose.yml",
            "com.docker.compose.project.working_dir": "/data/compose/3",
            "com.docker.compose.service": "frigate",
            "com.docker.compose.version": "2.10.2"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/config/config.yml": {},
            "/etc/localtime": {},
            "/media/frigate": {}
        },
        "WorkingDir": "/opt/frigate"
    },
    "Created": "2023-02-10T01:56:15.185661229Z",
    "Driver": "overlay2",
    "ExecIDs": null,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/bf06374f422faec70689ad09bed88d7a2a98f836da984fa47b673c209bea581c-init/diff:/var/lib/docker/overlay2/fc3107323c91a938ce7043af133e6d18a533f078b6aa573730d2b804898c8190/diff:/var/lib/docker/overlay2/09d9b50c5268f49eb683e5144ac6a077628bbf922447d5acdbbafc7539cf47b9/diff:/var/lib/docker/overlay2/92130b8ac97c173f0d91a6fb5a66a785ae1e0fca478d9a6480235920b33220b5/diff:/var/lib/docker/overlay2/4dc3505df1ae3c9ca461d984b405ed80d56fd14f175c32191a6f9c960115ed47/diff:/var/lib/docker/overlay2/e0a5c7e586c628a3cf78323931c85501113555e7ebec1b903070f81e8e3a7ab1/diff:/var/lib/docker/overlay2/996bff59ee2a0ea345a4355250bbc26909510c0ade26ea0e91b1348ccb1f7167/diff:/var/lib/docker/overlay2/59d1de8c49ba752fdac7762136429f2e6926ac10c80b796462d57c3accd0352d/diff",
            "MergedDir": "/var/lib/docker/overlay2/bf06374f422faec70689ad09bed88d7a2a98f836da984fa47b673c209bea581c/merged",
            "UpperDir": "/var/lib/docker/overlay2/bf06374f422faec70689ad09bed88d7a2a98f836da984fa47b673c209bea581c/diff",
            "WorkDir": "/var/lib/docker/overlay2/bf06374f422faec70689ad09bed88d7a2a98f836da984fa47b673c209bea581c/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": false,
        "Binds": [
            "/etc/localtime:/etc/localtime:ro",
            "/data/compose/3/ssd:/media/frigate",
            "/data/compose/3/config/config.yml:/config/config.yml:ro"
        ],
        "BlkioDeviceReadBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceWriteIOps": null,
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "CapAdd": [
            "AUDIT_WRITE",
            "CHOWN",
            "DAC_OVERRIDE",
            "FOWNER",
            "FSETID",
            "KILL",
            "MKNOD",
            "NET_BIND_SERVICE",
            "NET_RAW",
            "SETFCAP",
            "SETGID",
            "SETPCAP",
            "SETUID",
            "SYS_CHROOT"
        ],
        "CapDrop": [
            "AUDIT_CONTROL",
            "BLOCK_SUSPEND",
            "DAC_READ_SEARCH",
            "IPC_LOCK",
            "IPC_OWNER",
            "LEASE",
            "LINUX_IMMUTABLE",
            "MAC_ADMIN",
            "MAC_OVERRIDE",
            "NET_ADMIN",
            "NET_BROADCAST",
            "SYSLOG",
            "SYS_ADMIN",
            "SYS_BOOT",
            "SYS_MODULE",
            "SYS_NICE",
            "SYS_PACCT",
            "SYS_PTRACE",
            "SYS_RAWIO",
            "SYS_RESOURCE",
            "SYS_TIME",
            "SYS_TTY_CONFIG",
            "WAKE_ALARM"
        ],
        "Cgroup": "",
        "CgroupParent": "",
        "CgroupnsMode": "private",
        "ConsoleSize": [
            0,
            0
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "DeviceRequests": null,
        "Devices": [],
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": [],
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "IpcMode": "private",
        "Isolation": "",
        "KernelMemory": 0,
        "KernelMemoryTCP": 0,
        "Links": null,
        "LogConfig": {
            "Config": {},
            "Type": "json-file"
        },
        "MaskedPaths": null,
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "MemorySwappiness": null,
        "Mounts": [
            {
                "Target": "/tmp/cache",
                "TmpfsOptions": {
                    "SizeBytes": 1000000000
                },
                "Type": "tmpfs"
            }
        ],
        "NanoCpus": 0,
        "NetworkMode": "frigate_default",
        "OomKillDisable": null,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": null,
        "PortBindings": {
            "1935/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "1935"
                }
            ],
            "5000/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "5000"
                }
            ]
        },
        "Privileged": true,
        "PublishAllPorts": false,
        "ReadonlyPaths": null,
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "unless-stopped"
        },
        "Runtime": "runc",
        "SecurityOpt": [
            "label=disable"
        ],
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": null,
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/var/lib/docker/containers/e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b/hostname",
    "HostsPath": "/var/lib/docker/containers/e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b/hosts",
    "Id": "e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b",
    "Image": "sha256:69a6d9c1633fdbebced0a925e9f486ecf104b3330c46c7df31b962c8da6c0cee",
    "LogPath": "/var/lib/docker/containers/e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b/e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b-json.log",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/etc/localtime",
            "Mode": "ro",
            "Propagation": "rprivate",
            "RW": false,
            "Source": "/etc/localtime",
            "Type": "bind"
        },
        {
            "Destination": "/media/frigate",
            "Mode": "",
            "Propagation": "rprivate",
            "RW": true,
            "Source": "/data/compose/3/ssd",
            "Type": "bind"
        },
        {
            "Destination": "/config/config.yml",
            "Mode": "ro",
            "Propagation": "rprivate",
            "RW": false,
            "Source": "/data/compose/3/config/config.yml",
            "Type": "bind"
        },
        {
            "Destination": "/tmp/cache",
            "Mode": "",
            "Propagation": "",
            "RW": true,
            "Source": "",
            "Type": "tmpfs"
        }
    ],
    "Name": "/frigate",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "Networks": {
            "frigate_default": {
                "Aliases": [
                    "frigate",
                    "e22a8aa65987"
                ],
                "DriverOpts": null,
                "EndpointID": "cb660cc88a5bfae7ecade145740603d568ec544756a82bfe95d7dc6d18f5d2f8",
                "Gateway": "172.18.0.1",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": {},
                "IPAddress": "172.18.0.2",
                "IPPrefixLen": 16,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "02:42:ac:12:00:02",
                "NetworkID": "883bfb42f4793c2513bb3e9acb3a1beb0eab30452c666c5033664cf361250b1c"
            }
        },
        "Ports": {
            "1935/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "1935"
                }
            ],
            "5000/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "5000"
                }
            ],
            "8554/tcp": null,
            "8555/tcp": null,
            "8555/udp": null
        },
        "SandboxID": "203f42001be5f44462fdab7fb380050d11504fd28ef73c2b3dde32bb549b6e6c",
        "SandboxKey": "/var/run/docker/netns/203f42001be5",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/init",
    "Platform": "linux",
    "Portainer": {
        "ResourceControl": {
            "Id": 23,
            "ResourceId": "e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b",
            "SubResourceIds": [],
            "Type": 1,
            "UserAccesses": [],
            "TeamAccesses": [],
            "Public": true,
            "AdministratorsOnly": false,
            "System": false
        }
    },
    "ProcessLabel": "",
    "ResolvConfPath": "/var/lib/docker/containers/e22a8aa65987172f8c54b8a4bd05421b8d92354b7086f6f6a43f31a57753cc2b/resolv.conf",
    "RestartCount": 55,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 0,
        "FinishedAt": "2023-02-10T02:16:15.119692786Z",
        "OOMKilled": false,
        "Paused": false,
        "Pid": 74950,
        "Restarting": false,
        "Running": true,
        "StartedAt": "2023-02-10T02:16:16.895528323Z",
        "Status": "running"
    }
}


@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

By the way, if I roll back to stable it seems to run fine (I tested before removing the PATH variable)

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Feb 10, 2023

you may want to try getting frigate to run in bridge network_mode, otherwise try running netstat -tupln while frigate is not running and paste the output here

By the way, if I roll back to stable it seems to run fine (I tested before removing the PATH variable)

there are like 4 ports that have been added in this release so that isn't unexpected

@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

Here's the output from that; I'll try and figure out how to swap to bridge mode a second to test that.

root@docker:~# netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      126/systemd-resolve 
tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN      689/docker-proxy    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      221/sshd: /usr/sbin 
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      709/docker-proxy    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      126/systemd-resolve 
tcp        0      0 127.0.0.1:34577         0.0.0.0:*               LISTEN      208/containerd      
tcp6       0      0 :::5355                 :::*                    LISTEN      126/systemd-resolve 
tcp6       0      0 :::22                   :::*                    LISTEN      221/sshd: /usr/sbin 
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           126/systemd-resolve 
udp        0      0 127.0.0.53:53           0.0.0.0:*                           126/systemd-resolve 
udp        0      0 192.168.23.215:68       0.0.0.0:*                           96/systemd-networkd 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           143/dhclient        
udp6       0      0 :::5355                 :::*                                126/systemd-resolve 

Edit -- same result with bridge mode (seems to show a loading indicator on the web page and then frigate stops and restarts in an indefinite loop.)
Edit 2: I tested with "host" for the network as well and it did the same thing.
Logs (from bridge mode):

s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service nginx-log successfully stopped
2023-02-10 02:31:45.059841420  exit OK
s6-rc: info: service frigate-log successfully stopped
Service go2rtc exited with code 0 (by signal 0)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service go2rtc successfully started
s6-rc: info: service frigate: starting
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
[INFO] Preparing go2rtc config...
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[INFO] Starting Frigate...
[INFO] Starting NGINX...
s6-rc: info: service legacy-services successfully started
[INFO] Starting go2rtc...
2023-02-10 02:31:51.217357726  02:31:51.216 INF go2rtc version 1.1.1 linux/arm64
2023-02-10 02:31:51.219438438  02:31:51.219 INF [api] listen addr=:1984
2023-02-10 02:31:51.221348171  02:31:51.221 INF [rtsp] listen addr=:8554
2023-02-10 02:31:51.222904205  02:31:51.222 INF [srtp] listen addr=:8443
2023-02-10 02:31:51.224104003  02:31:51.223 INF [webrtc] listen addr=:8555
2023-02-10 02:31:51.263309346  2023/02/10 02:31:51 [error] 134#134: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.45.142, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001/stats", host: "192.168.23.215:5000"
2023-02-10 02:31:51.263479677  192.168.45.142 - - [10/Feb/2023:02:31:51 +0000] "GET /api/stats HTTP/1.1" 502 157 "-" "HomeAssistant/2023.2.3 aiohttp/3.8.1 Python/3.10" "-"
[2023-02-10 02:31:54] frigate.app                    INFO    : Starting Frigate (0.12.0-66881eb)
2023-02-10 02:31:54.325555951  [2023-02-10 02:31:54] frigate.app                    INFO    : Starting Frigate (0.12.0-66881eb)
[2023-02-10 02:31:54] frigate.config                 WARNING : RTMP restream is deprecated in favor of the restream role, recommend disabling RTMP.
[2023-02-10 02:31:54] peewee_migrate                 INFO    : Starting migrations
2023-02-10 02:31:54.367345000  [2023-02-10 02:31:54] frigate.config                 WARNING : RTMP restream is deprecated in favor of the restream role, recommend disabling RTMP.
[2023-02-10 02:31:54] peewee_migrate                 INFO    : There is nothing to migrate
2023-02-10 02:31:54.393984999  [2023-02-10 02:31:54] peewee_migrate                 INFO    : Starting migrations
2023-02-10 02:31:54.411694123  [2023-02-10 02:31:54] peewee_migrate                 INFO    : There is nothing to migrate
2023-02-10 02:31:54.420525890  [Errno 98] Address already in use
[2023-02-10 02:31:54] frigate.app                    INFO    : Output process started: 296
[2023-02-10 02:31:54] detector.cpu                   INFO    : Starting detection process: 294
[2023-02-10 02:31:54] frigate.app                    INFO    : Camera processor started for babycam: 298
[2023-02-10 02:31:54] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-02-10 02:31:54] frigate.app                    INFO    : Capture process started for babycam: 300
Service Frigate exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service nginx-log successfully stopped
2023-02-10 02:31:55.448358628  exit OK
s6-rc: info: service frigate-log successfully stopped
Service go2rtc exited with code 0 (by signal 0)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

Nothing particularly telling/new from the inspector network tab but I figured I'd drop a screenshot here just in case you see anything I don't. This is when I'm trying to just load the page before it exits and restarts:
image

@NickM-27
Copy link
Sponsor Collaborator

can you try disabling RTMP and see what happens?

@blakeblackshear
Copy link
Owner

We have seen this reported a couple times, but can't track it down.

This could be another way portainer is ruining everything good in this world /s
#5156 (comment)

Rather than modifying an existing stack in portainer, can you just delete the whole thing and recreate it?

@cvocvo
Copy link
Author

cvocvo commented Feb 10, 2023

Yes I will try both of those things tomorrow; thank you for the help!!

@randominternetuser
Copy link

This can be resolved by setting the Command back to Default instead of Override in Portainer

image

@NickM-27 NickM-27 changed the title [Support]: nginx isn't found on beta 7? [Support]: [Errno 98] Address already in use Feb 17, 2023
@cvocvo
Copy link
Author

cvocvo commented Feb 18, 2023

This can be resolved by setting the Command back to Default instead of Override in Portainer

image

I can confirm this fixes the issue on beta 8 -- thank you!!
image

@cvocvo cvocvo closed this as completed Feb 18, 2023
@NickM-27
Copy link
Sponsor Collaborator

Oh wow, that is interesting, good to know. I will add this to the release notes

@mrking95
Copy link

mrking95 commented Jun 6, 2023

Was running in to the same issue but on Synology Docker.

The following worked for me:

  • Export container settings through Syno Docker UI
  • Remove the container
  • Open the exported json file and change:
    "cmd" : "python3 -u -m frigate", to "cmd" : "",
  • Import the container and start it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Related to the current beta version of frigate support triage
Projects
None yet
Development

No branches or pull requests

5 participants