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

Container crashing upon creation #24

Open
poberth opened this issue Jan 16, 2025 · 5 comments
Open

Container crashing upon creation #24

poberth opened this issue Jan 16, 2025 · 5 comments

Comments

@poberth
Copy link

poberth commented Jan 16, 2025

Hi,
I am trying to run the docker image you created but it keeps crashing.

Here is how I created my container

docker run -d -e DEBUG=1 -v ./config.yaml:/onvif.yaml --cap-add NET_ADMIN --network host --restart=no --name rtsp-to-onvif kulasolutions/rtsp-to-onvif:latest

Here is my config.yaml file

onvif:
  - name: cam1
    dev: ens18
    target:
      hostname: 192.168.2.249
      ports:
        rtsp: 554
        snapshot: 80
    highQuality:
      rtsp: /h264Preview_01_main
      snapshot: /cgi-bin/api.cgi?cmd=Snap&channel=0
      width: 2560
      height: 1920
      framerate: 30
      bitrate: 3072
      quality: 4
    ports:
      server: 8081
      rtsp: 8554
      snapshot: 8080

The network adapter on the debian pc running docker is ens18

root@cantius:~/rtsp-to-onvif# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether bc:24:11:36:30:bc brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 192.168.2.134/24 brd 192.168.2.255 scope global dynamic ens18
       valid_lft 68649sec preferred_lft 68649sec
    inet6 fe80::be24:11ff:fe36:30bc/64 scope link
       valid_lft forever preferred_lft forever
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:e3:4f:54:27 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:e3ff:fe4f:5427/64 scope link
       valid_lft forever preferred_lft forever

Here are the debug logs

Cannot find device "ens18"
Cannot find device "rtsp2onvif_0"
19:59:55.021 ERROR NET_SCAN: No interface with MAC 1a:11:b0:fd:31:d5
19:59:55.021 INFO  NET_CONF: ADD - rtsp2onvif_0 MAC: 1A:11:B0:FD:31:D5
19:59:55.027 DEBUG Command failed: ip link add rtsp2onvif_0 link ens18 address 1A:11:B0:FD:31:D5 type macvlan mode bridge
Cannot find device "ens18"
19:59:55.027 INFO  NET_CONF: DHCP - rtsp2onvif_0
19:59:55.040 DEBUG Command failed: dhclient rtsp2onvif_0
Cannot find device "rtsp2onvif_0"
19:59:55.040 ERROR NET_SCAN: No interface with MAC 1a:11:b0:fd:31:d5
19:59:55.040 ERROR Failed to find IP address for MAC address 1A:11:B0:FD:31:D5
(node:1) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:1) [DEP0047] DeprecationWarning: The `util.isDate` API is deprecated.  Please use `arg instanceof Date` instead.

What am I missing?

Thanks for your help.

@dimitribo
Copy link

dimitribo commented Feb 9, 2025

Hello,
I'm also trying to run the docker build, but i also get a fault when it's want to start ...
Somebody that can help me further please ?
I'm running on a raspberry PI3 (b) on OS 64bit bookworm.

Image

My config files is:

Image

And my compose file is:

Image

@dimitribo
Copy link

dimitribo commented Feb 12, 2025

I did some further testing, and installed separate de docker compose plugin.
At this moment i have another fault:

"The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested"

What can I do to get it running ?

Image

@p10tyr , is there a possibility that you can tell me on what that you have running the docker please.
Is it on a raspberry? Wich OS ? 32 or 64bit? ...

Hopefully you can help me (us) to get it working....

@Jean-Sebastien-Raymond
Copy link

Jean-Sebastien-Raymond commented Feb 14, 2025

I have the exact same issue as poberth, I hope we can find a solution.

I can add information like the fact im running the docker on ubuntu 24 in a Hyper-V VM

Thanks for your support.

@dimitribo
Copy link

dimitribo commented Feb 15, 2025

Is there a possibility how you setup de code to see if we do the same things and that we can generate the same error ?
For me, i'm running the docker engine and compose plugin on a raspberry pi 3b with the latest OS 32 bit bookworm.

I follow the steps from the info i get here:

  1. mkdir rtsp-to-onvif and cd rtsp-to-onvif
  2. wget https://raw.githubusercontent.com/p10tyr/rtsp-to-onvif/refs/heads/release/compose.yaml
  3. wget https://raw.githubusercontent.com/p10tyr/rtsp-to-onvif/refs/heads/release/config.example.yaml
  4. cp config.example.yaml config.yaml
  5. nano config.yaml
  6. sudo docker compose up

At this moment, my config file is:

Image

My compose file is: (added "platform: linux/amd64" to get it pulling and running)
(Also modified the folder where my config and compose files are)

Image

In portainer, i can see the container is running, but i don't get any logs and also no connection in the network or on ubiquiti, so i'm thinking there is still something wrong ...

Image

Image

Have i to do something more to get the network connection or to hame more logs of ...
Hopefully somebody can help us out ...

Thanks !!!

@dimitribo
Copy link

Hello,

Today tried to set up the container with docker desktop on a PC here at home instead of on my raspberry Pi.
I'm getting the container running, with following logs. Unify protect doesn't detect anything at this moment ...
I think there are the same issues like the other persons here....

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants