AirConnect icon indicating copy to clipboard operation
AirConnect copied to clipboard

raspberry pi 4 arm64 UPnP init failed: -203

Open bym0 opened this issue 2 years ago • 2 comments

Out of curiosity i tried your project and i can't seem to get it to work. Is it my network? I activated UPnP in my Router (FritzBox).

I have following details:

# system infos
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

# uname -a
Linux ahch-to 5.4.0-1065-raspi #75-Ubuntu SMP PREEMPT Fri Jun 3 14:24:57 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

# command line test
 ✘ ubuntu@ahch-to  ~/airconnect  sudo ./airupnp-aarch64 -b 192.168.1.73:49152
[15:16:30.976066] main:1420 Starting airupnp version: v0.2.51.2 (Nov  1 2021 @ 23:32:23)
[15:16:30.976243] main:1428 no config file, using defaults
[15:16:30.977769] Start:1120 UPnP init failed: -203
[15:16:30.977854] main:1461 Cannot start

In another issue i read that i should try to use the -b Flag for setting my listen-ip-address. Doesn't seem to work. I also tried a docker-container (https://github.com/pwt/docker-airconnect-arm).

bym0 avatar Jun 28 '22 13:06 bym0

Same issue for me, also on Ubuntu Focal aarch64 on rPi 4. Guessing there is an incompatibility between one of the dependencies (in particular, whatever exposes the UpnpInit function, possibly libupnp?) and Ubuntu Focal aarch64.

rp-preger avatar Jul 25 '22 22:07 rp-preger

Have you tried the static version ?

philippe44 avatar Sep 17 '22 07:09 philippe44

Same issue here. Tested both the non-static (default) and the static version. Details below:

Tested on the host:

  • Raspberry Pi 4 Model B Rev 1.4 (RAM 8Gb)
  • Debian GNU/Linux 11 (bullseye)
  • Linux 5.15.76-v8+ aarch64 GNU/Linux
  • Docker version 20.10.22, build 3a2c30b

Running philippe44/AirConnect embedded in the Docker image 1activegeek/airconnect. Here is my docker compose file. Full disclosure: it is launched as a standalone container from inside a swarm, using the ix-ai/swarm-launcher project (explaining the label "ai.ix.started-by=ix.ai/swarm-launcher" below).

This is the docker-compose.yml file corresponding to the standalone container:

version: '3.8'

services:
  airconnect:
    image: 1activegeek/airconnect:latest
    labels:
      - "ai.ix.started-by=ix.ai/swarm-launcher"
    container_name: "airconnect"
    restart: "unless-stopped"
    network_mode: "host"
    environment:
      - "AIRCAST_VAR=kill"
      - "AIRUPNP_VAR=kill" # -l 1000:2000 -z"
    volumes:
      - /mnt/gluster/airconnect/config:/config

Once deployed, I start an interactive bash as root inside the airconnect container:

docker exec -it airconnect bash

and download the /bin/aircast-linux-aarch64-static executable, and set the +x permission as follows:

apt install wget
export ARCH_VAR=linux-aarch64-static

# See https://raw.githubusercontent.com/1activegeek/docker-airconnect/master/Dockerfile.arm64
wget -O /bin/airupnp-$ARCH_VAR https://raw.githubusercontent.com/philippe44/AirConnect/master/bin/airupnp-$ARCH_VAR \
    && chmod +x /bin/airupnp-$ARCH_VAR

When executing the static version the same error occurs:

root@kube-node01:/# airupnp-linux-aarch64-static -l 1000:2000
[16:37:09.086388] main:1355 Starting airupnp version: v1.0.13 (Dec 10 2022 @ 11:10:24)
[16:37:09.086586] main:1362 no config file, using defaults
[16:37:09.089845] Start:1080 UPnP init in 192.168.1.49 () failed: -203
[16:37:09.089930] main:1394 Cannot start

kapgit avatar Dec 30 '22 17:12 kapgit

fixed

philippe44 avatar Jan 23 '23 22:01 philippe44

Hi,

I tested the new static version 1.0.14 following the steps in my previous post, but unfortunately could not make it work:

root@kube-node02:/# airupnp-linux-aarch64-static -l 1000:2000
[22:39:17.379829] main:1360 Starting airupnp version: v1.0.14 (Jan 25 2023 @ 12:47:27)
[22:39:17.380036] main:1367 no config file, using defaults
[22:39:17.383747] Start:1083 Binding to iface [email protected]:0
[22:39:17.383829] Start:1087 UPnP init in 192.168.1.39 () failed: -203
[22:39:17.383857] main:1399 Cannot start

kapgit avatar Jan 28 '23 23:01 kapgit

For a reason I don't know, the UPnP stack cannot open the network interface that is being chosen. Do you use WiFi or Ethernet? I would recommend you try outside of the container and if this works, then check the container.

philippe44 avatar Jan 28 '23 23:01 philippe44

Ahah, trying on a non-docker Rpi 4, this time, it works!

[01:33] root@ariadne:/tmp# airupnp-linux-aarch64-static -l 1000:2000
[01:33:48.458356] main:1360 Starting airupnp version: v1.0.14 (Jan 25 2023 @ 12:47:27)
[01:33:48.458715] main:1367 no config file, using defaults
[01:33:48.513264] Start:1083 Binding to iface [email protected]:0
[01:33:48.752261] AddMRDevice:1009 [0x7f892bxxx1]: adding renderer (Living Room) with mac BBBBxxxxxxxx
[01:33:48.765503] MasterHandler:640 [0x7f892bxxx1]: subscribe success
[01:33:48.778229] ProcessEvent:445 [0x7f892bxxx1]: UPnP Volume local change 24:24 (master)
[01:33:49.035981] AddMRDevice:1009 [0x7f892bxxx2]: adding renderer (L1-Turntable) with mac BBBBxxxxxxxx
[01:33:49.065243] MasterHandler:640 [0x7f892bxxx2]: subscribe success
[01:33:49.086315] ProcessEvent:445 [0x7f892bxxx2]: UPnP Volume local change 81:81 (master)

I guess airupnp wants to use port 1900?

netstat -tulpen | grep 1900 shows:

udp6  214656      0 :::1900                 :::*                                0          33798241   921569/dockerd

and

ps -elf | grep 921569 shows:

4 S root      921569       1  7  80   0 - 819241 futex_ Jan21 ?       12:12:41 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

So, it is dockerd using port 1900/udp6. Don't know exactly why and how to work around it. Will need to investigate some more...

In the meantime, will just run on this host.

Thanks a lot.

kapgit avatar Jan 29 '23 00:01 kapgit

Yes, 1900 is the standard SSDP

philippe44 avatar Jan 29 '23 01:01 philippe44

Just a follow-up. Since docker seems to use the port 1900/udp, I modified the above docker container to attach to a macvlan network a had configured. Seems to work fine!

version: '3.8'

services:
  airconnect:
    image: 1activegeek/airconnect:latest
    labels:
      - "ai.ix.started-by=ix.ai/swarm-launcher"
    container_name: "airconnect"
    restart: "unless-stopped"
    ports:
      - 1900:1900/udp
    environment:
      - "AIRCAST_VAR=kill"
      - "AIRUPNP_VAR=-l 1000:2000"
    volumes:
      - /mnt/gluster/airconnect/config:/config
    networks:
      - macvlan

networks:
  macvlan:
    external: true

Thanks a lot again for this great piece of software!

kapgit avatar Jan 29 '23 19:01 kapgit