rustdesk / rustdesk-server

RustDesk Server Program
https://rustdesk.com/server
GNU Affero General Public License v3.0
6.81k stars 1.47k forks source link

impossible to run hbbs from arch 64 freebox delta (french internet box) #33

Open BillyMyIT opened 2 years ago

BillyMyIT commented 2 years ago

Hi all,

I'm trying to run rustdesk-server from a docker. I did : docker image rm rustdesk/rustdesk-server mkdir /srv/rustdesk-server cd /srv/rustdesk-server sudo docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -vpwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. Port mappings have been discarded as one of the Host, Container, Pod, and None network modes are in use [2022-06-11 12:27:58.526310 +00:00] INFO [src/peer.rs:82] DB_URL=./db_v2.sqlite3 Error: An error occured while creating a new object: error returned from database: unable to open database file

sudo docker run --name hbbr -d -p 21117:21117 -p 21119:21119 -v pwd:/root -it --net=host --rm rustdesk/rustdesk-server hbbr Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. Port mappings have been discarded as one of the Host, Container, Pod, and None network modes are in use da0eb9db1c7487ca09cc4a51134bb3a6e5142925adf828964178133308db3af2 [billy@z-95 rust]$ sudo docker ps Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES da0eb9db1c74 docker.io/rustdesk/rustdesk-server:latest-arm64v8 hbbr 9 seconds ago Up 8 seconds ago hbbr [billy@z-95 rust]$`

rustdesk commented 2 years ago

I do not know either, help wanted.

BillyMyIT commented 2 years ago

hope that we will find why it's not working :)

paspo commented 2 years ago

Hi, @BillyMyIT

Most of the people doesn't have access to the specific VM you're using, but from your comment we can assume that:

I can run the container either on an arm64 server or on podman, but I can't have both... sorry. But I can point out at some issues in your setup. I thin the differences between podman and docker are playing a big role here.

1. you're using --net=host

This means you're exposing the entire container networking (the port you're specifying with -p are meaningless if used with --net=host).

2. user permissions

You're not using sudo for the first docker rm ... command, but you're using it for the docker run .... That means that the second command is run as root and the first is run as the current user (which we don't know who is). Also the mkdir is run as the current user; so the directory is created with the current user permissions.

3. container name

In podman, it's not assumed (like in docker) that you're referring to the docker registry. It's better to explicitly tell from which registry you want to pull an image: so you should use something like registry.hub.docker.com/rustdesk/rustdesk-server:latest.

My conclusion

I'm able to start these containers in podman, with the following commands:

sudo mkdir -p /srv/rustdesk-server/hbb{r,s}

sudo podman run --name hbbs \
  -p 21115:21115 -p 21118:21118 \
  -p 21116:21116 -p 21116:21116/udp \
  -v /srv/rustdesk-server/hbbs:/root -d \
  registry.hub.docker.com/rustdesk/rustdesk-server:latest hbbs

sudo podman run --name hbbr \
  -p 21117:21117 -p 21119:21119 \
  -v /srv/rustdesk-server/hbbr:/root -d \
  registry.hub.docker.com/rustdesk/rustdesk-server:latest hbbr

I think that if you replace the latest tag with latest-arm64v8, you should be ok.

Also, please fix your markdown formatting (you have a preview for that).

rustdesk commented 2 years ago

@paspo Thanks!

paspo commented 2 years ago

@BillyMyIT any updates?

BillyMyIT commented 2 years ago

Sorry, I'm at school. Exam time ;)I'll try all and come back to give results positive or negative

rustdesk commented 2 years ago

Take your time.

BillyMyIT commented 2 years ago

docker image rm rustdesk/rustdesk-server

Hi, sorry for the answer's delay I'm trying to do what you say. I have this now : [billy@z-95 srv]$ sudo podman ps --all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES da48bc3a6cac registry.hub.docker.com/rustdesk/rustdesk-server:latest hbbr 6 minutes ago Exited (1) 6 minutes ago 0.0.0.0:21117->21117/tcp, 0.0.0.0:21119->21119/tcp hbbr 235473239da2 registry.hub.docker.com/rustdesk/rustdesk-server:latest hbbs 5 minutes ago Exited (1) 5 minutes ago 0.0.0.0:21115-21116->21115-21116/tcp, 0.0.0.0:21116->21116/udp, 0.0.0.0:21118->21118/tcp hbbs

I can't find the id_ed25519.pub to know if it's working

Can you help me ? Thanks

BillyMyIT commented 2 years ago

`Jun 29 13:56:11 z-95 kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready Jun 29 13:56:11 z-95 NetworkManager[855]: [1656503771.8144] manager: (vethce920568): new Veth device (/org/freedesktop/NetworkManager/Devices/13) Jun 29 13:56:11 z-95 systemd-udevd[33516]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. Jun 29 13:56:11 z-95 systemd-udevd[33516]: Could not generate persistent MAC address for vethce920568: No such file or directory Jun 29 13:56:11 z-95 kernel: IPv6: ADDRCONF(NETDEV_UP): vethce920568: link is not ready Jun 29 13:56:11 z-95 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): vethce920568: link becomes ready Jun 29 13:56:11 z-95 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Jun 29 13:56:11 z-95 NetworkManager[855]: [1656503771.8280] device (vethce920568): carrier: link connected Jun 29 13:56:11 z-95 kernel: cni-podman0: port 2(vethce920568) entered blocking state Jun 29 13:56:11 z-95 kernel: cni-podman0: port 2(vethce920568) entered disabled state

Jun 29 13:56:11 z-95 kernel: device vethce920568 entered promiscuous mode

Jun 29 13:56:11 z-95 kernel: cni-podman0: port 2(vethce920568) entered blocking state

Jun 29 13:56:11 z-95 kernel: cni-podman0: port 2(vethce920568) entered forwarding state

Jun 29 13:56:12 z-95 systemd[1]: Started libpod-conmon-4188a09a4d07e5937feff2527cb79da00a896b86add4f1342716ba0636f3c8f0.scope.

Jun 29 13:56:12 z-95 systemd[1]: Started libcontainer container 4188a09a4d07e5937feff2527cb79da00a896b86add4f1342716ba0636f3c8f0.

Jun 29 13:56:12 z-95 systemd[1]: Couldn't stat device /dev/char/10:200: No such file or directory

Jun 29 13:56:12 z-95 systemd[1]: libpod-4188a09a4d07e5937feff2527cb79da00a896b86add4f1342716ba0636f3c8f0.scope: Succeeded.

Jun 29 13:56:12 z-95 systemd[1]: libpod-4188a09a4d07e5937feff2527cb79da00a896b86add4f1342716ba0636f3c8f0.scope: Consumed 53ms CPU time

Jun 29 13:56:13 z-95 kernel: cni-podman0: port 2(vethce920568) entered disabled state

Jun 29 13:56:13 z-95 kernel: device vethce920568 left promiscuous mode

Jun 29 13:56:13 z-95 kernel: cni-podman0: port 2(vethce920568) entered disabled state

Jun 29 13:56:13 z-95 NetworkManager[855]: [1656503773.2689] device (vethce920568): released from master device cni-podman0

Jun 29 13:56:13 z-95 systemd[1]: run-netns-cni\x2defde8636\x2d915c\x2dcd8f\x2d8eba\x2ddc63c21eb77b.mount: Succeeded.

Jun 29 13:56:13 z-95 systemd[1]: var-lib-containers-storage-overlay-aae435cff5dc1b838b4775d687b1678af1e13052dfb834c3439e97f23506dbff-merged.mount: Succeeded.

Jun 29 13:56:13 z-95 systemd[1]: var-lib-containers-storage-overlay\x2dcontainers-4188a09a4d07e5937feff2527cb79da00a896b86add4f1342716ba0636f3c8f0-userdata-shm.mount: Succeeded.

Jun 29 13:56:13 z-95 systemd[1]: libpod-conmon-4188a09a4d07e5937feff2527cb79da00a896b86add4f1342716ba0636f3c8f0.scope: Succeeded.`

paspo commented 2 years ago

docker image rm rustdesk/rustdesk-server

Hi, sorry for the answer's delay I'm trying to do what you say. I have this now : [billy@z-95 srv]$ sudo podman ps --all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES da48bc3a6cac registry.hub.docker.com/rustdesk/rustdesk-server:latest hbbr 6 minutes ago Exited (1) 6 minutes ago 0.0.0.0:21117->21117/tcp, 0.0.0.0:21119->21119/tcp hbbr 235473239da2 registry.hub.docker.com/rustdesk/rustdesk-server:latest hbbs 5 minutes ago Exited (1) 5 minutes ago 0.0.0.0:21115-21116->21115-21116/tcp, 0.0.0.0:21116->21116/udp, 0.0.0.0:21118->21118/tcp hbbs

I can't find the id_ed25519.pub to know if it's working

Can you help me ? Thanks

You provided only a list of two stopped containers; how am I supposed to guess what happened?

Please, can you provide the command history or at least some information to contextualize?

Also, the public key is something you want to check after solving a problem with your containers not running.

Also, please fix your markdown formatting (you have a preview for that). There's also a little icon with a capital M and a downward facing arrow that links here, just below the comment editor.

BillyMyIT commented 2 years ago

sorry, i'm learning linux and docker so i don't know what you need to help troubleshoots. The two dockers seems to stop as soon as i try to start them. What logs do you need ?

BillyMyIT commented 2 years ago

Jul 10 20:48:26 z-95 NetworkManager[855]: <info> [1657478906.4735] dhcp4 (eth0): state changed extended -> extended, address=192.168.10.32 Jul 10 20:48:26 z-95 dbus-daemon[800]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.7' (uid=0 pid=855 comm="/usr/sbin/NetworkManager --no-daemon " label="system_u:system_r:NetworkManager_t:s0") Jul 10 20:48:26 z-95 systemd[1]: Starting Network Manager Script Dispatcher Service... Jul 10 20:48:26 z-95 dbus-daemon[800]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher' Jul 10 20:48:26 z-95 systemd[1]: Started Network Manager Script Dispatcher Service. Jul 10 20:48:36 z-95 systemd[1]: NetworkManager-dispatcher.service: Succeeded. Jul 10 21:52:31 z-95 systemd-logind[836]: New session 82 of user billy. Jul 10 21:52:31 z-95 systemd[1]: Started Session 82 of user billy. Jul 10 21:53:39 z-95 kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready Jul 10 21:53:39 z-95 kernel: IPv6: ADDRCONF(NETDEV_UP): veth95329250: link is not ready Jul 10 21:53:39 z-95 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): veth95329250: link becomes ready Jul 10 21:53:39 z-95 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Jul 10 21:53:39 z-95 kernel: cni-podman0: port 2(veth95329250) entered blocking state Jul 10 21:53:39 z-95 kernel: cni-podman0: port 2(veth95329250) entered disabled state Jul 10 21:53:39 z-95 kernel: device veth95329250 entered promiscuous mode Jul 10 21:53:39 z-95 kernel: cni-podman0: port 2(veth95329250) entered blocking state Jul 10 21:53:39 z-95 kernel: cni-podman0: port 2(veth95329250) entered forwarding state Jul 10 21:53:40 z-95 systemd-udevd[60439]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. Jul 10 21:53:40 z-95 systemd-udevd[60439]: Could not generate persistent MAC address for veth95329250: No such file or directory Jul 10 21:53:40 z-95 NetworkManager[855]: <info> [1657482820.0407] manager: (veth95329250): new Veth device (/org/freedesktop/NetworkManager/Devices/14) Jul 10 21:53:40 z-95 NetworkManager[855]: <info> [1657482820.0451] device (veth95329250): carrier: link connected Jul 10 21:53:41 z-95 systemd[1]: Started libpod-conmon-99d8c79ac058e4160d849fa5be5058d19045f9f821709379ccc0228f86a7d18e.scope. Jul 10 21:53:41 z-95 systemd[1]: Started libcontainer container 99d8c79ac058e4160d849fa5be5058d19045f9f821709379ccc0228f86a7d18e. Jul 10 21:53:41 z-95 systemd[1]: Couldn't stat device /dev/char/10:200: No such file or directory Jul 10 21:53:41 z-95 systemd[1]: libpod-99d8c79ac058e4160d849fa5be5058d19045f9f821709379ccc0228f86a7d18e.scope: Succeeded. Jul 10 21:53:41 z-95 systemd[1]: libpod-99d8c79ac058e4160d849fa5be5058d19045f9f821709379ccc0228f86a7d18e.scope: Consumed 62ms CPU time Jul 10 21:53:42 z-95 kernel: cni-podman0: port 2(veth95329250) entered disabled state Jul 10 21:53:42 z-95 kernel: device veth95329250 left promiscuous mode Jul 10 21:53:42 z-95 kernel: cni-podman0: port 2(veth95329250) entered disabled state Jul 10 21:53:42 z-95 NetworkManager[855]: <info> [1657482822.5054] device (veth95329250): released from master device cni-podman0 Jul 10 21:53:42 z-95 systemd[1]: run-netns-cni\x2d7a041874\x2d76df\x2d2936\x2d4569\x2d679ebbf75dac.mount: Succeeded. Jul 10 21:53:42 z-95 systemd[1]: var-lib-containers-storage-overlay-41c92a1a63f0de612c8ba6fbb28a0a4bbf3e749e7ecc568764ab1ed0aa3ded15-merged.mount: Succeeded. Jul 10 21:53:42 z-95 systemd[1]: var-lib-containers-storage-overlay\x2dcontainers-99d8c79ac058e4160d849fa5be5058d19045f9f821709379ccc0228f86a7d18e-userdata-shm.mount: Succeeded. Jul 10 21:53:43 z-95 systemd[1]: libpod-conmon-99d8c79ac058e4160d849fa5be5058d19045f9f821709379ccc0228f86a7d18e.scope: Succeeded.

E-vd-S commented 7 months ago

I have the same issue. Using podman with a service-account.

[ikke@echo ~]$ podman run --name hbbs -v /home/ikke/podman/rustdesk/data:/root -it rustdesk/rustdesk-server hbbs -r rust.server.nl -k _
[2024-04-17 09:48:17.888949 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
Error: An error occured while creating a new object: error returned from database: unable to open database file
[ikke@echo ~]$ ls -l /home/ikke/podman/rustdesk/
total 0
drwxr-x---. 2 ikke ikke 6 Apr 17 11:16 data

Just to be sure, I had it at 0777 before. What do you want me to check? (thanks btw.)

E-vd-S commented 7 months ago

Sorry, I was coming from https://githubhelp.com/rustdesk/rustdesk-server/issues/33, there the date was April 17th 2024, so today. Here I see dates from July 2022. Maybe I should be ignored... :/

E-vd-S commented 7 months ago

For me it is working, I needed to change my volume mount, notice the :Z.

podman run --name hbbs -v /home/ikke/podman/rustdesk/data:/root:Z -td --net=host rustdesk/rustdesk-server hbbs -r rust.server.nl -k _

[ikke@echo rustdesk]$ podman ps | grep hbbs
bb2c0f470c22  docker.io/rustdesk/rustdesk-server:latest  hbbs -r rust.serv...  3 minutes ago  Up 3 minutes                                                        hbbs

Hope it helps somebody.