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

fatal error: unable to listen on IPv6 port 9000. #2

Open
modafroman opened this issue Mar 5, 2023 · 2 comments
Open

fatal error: unable to listen on IPv6 port 9000. #2

modafroman opened this issue Mar 5, 2023 · 2 comments

Comments

@modafroman
Copy link

Hi Noel,

Thanks for your work on this. I'm in the process of moving a server over to new hardware that has been running 2x7.1 surround sound cards to get 8 airplay channels using SPS succesfully for years, and am having some issues getting it all setup and working with your configuration.

I'm using TrueNAS and due to the way that it handles docker containers. have decided to use an Ubuntu Server in VM with fresh installs of docker and portainer with PCI pass through of the sound cards.

Using your docker-compose method, when I spin up the containers, I get the following error and it seems to sit there crashing and restarting the containers. When I spin up a stock sps image from mike's dockerhub repo it works fine and I get the airplay2 target show up and audio playing out of the passed through soundcard just fine.

I have a feeling that it may be to do with either your docker image or in the way the network is setup? If I try to spin up a version of your docker image on its own with the same network config that the stock container works I get the same error.

Instance1 | STARTING - Sun Mar 5 04:39:19 UTC 2023
Instance1 | s6-rc: info: service startup successfully started
Instance1 | s6-rc: info: service fix-attrs successfully started
Instance1 | s6-rc: info: service legacy-cont-init: starting
Instance1 | s6-rc: info: service legacy-cont-init successfully started
Instance1 | s6-rc: info: service syslogd-prepare: starting
Instance1 | s6-rc: info: service syslogd-prepare successfully started
Instance1 | s6-rc: info: service syslogd-log: starting
Instance1 | s6-rc: info: service syslogd-log successfully started
Instance1 | s6-rc: info: service syslogd: starting
Instance1 | s6-rc: info: service syslogd successfully started
Instance1 | s6-rc: info: service legacy-services: starting
Instance1 | s6-rc: info: service legacy-services successfully started
Instance1 | s6-rc: info: service legacy-services: stopping
Instance1 | s6-rc: info: service legacy-services successfully stopped
Instance1 | s6-rc: info: service startup: stopping
Instance1 | s6-rc: info: service syslogd: stopping
Instance1 | s6-rc: info: service 03-nqptp: stopping
Instance1 | s6-rc: info: service 02-avahi: stopping
Instance1 | s6-rc: info: service 01-dbus: stopping
Instance1 | s6-rc: info: service startup successfully stopped
Instance1 | s6-rc: info: service syslogd successfully stopped
Instance1 | s6-rc: info: service syslogd-log: stopping
Instance1 | s6-rc: info: service 03-nqptp successfully stopped
Instance1 | s6-rc: info: service 02-avahi successfully stopped
Instance1 | warning: could not acquire a Shairport Sync native D-Bus interface "org.gnome.ShairportSync.i140" on the system bus.
Instance1 | warning: could not acquire an MPRIS interface named "org.mpris.MediaPlayer2.ShairportSync.i140" on the system bus.
Instance1 | s6-rc: info: service 01-dbus successfully stopped
Instance1 | s6-rc: info: service syslogd-log successfully stopped
Instance1 | s6-rc: info: service syslogd-prepare: stopping
Instance1 | s6-rc: info: service s6rc-fdholder: stopping
Instance1 | s6-rc: info: service syslogd-prepare successfully stopped
Instance1 | s6-rc: info: service legacy-cont-init: stopping
Instance1 | s6-rc: info: service s6rc-fdholder successfully stopped
Instance1 | s6-rc: info: service legacy-cont-init successfully stopped
Instance1 | s6-rc: info: service fix-attrs: stopping
Instance1 | s6-rc: info: service fix-attrs successfully stopped
Instance1 | s6-rc: info: service s6rc-oneshot-runner: stopping
Instance1 | s6-rc: info: service s6rc-oneshot-runner successfully stopped
Instance1 | s6-rc: info: service 03-nqptp: starting
Instance1 | s6-rc: info: service 02-avahi: starting
Instance1 | s6-rc: info: service 01-dbus: starting
Instance1 | s6-rc: info: service s6rc-fdholder: starting
Instance1 | s6-rc: info: service s6rc-oneshot-runner: starting
Instance1 | s6-rc: info: service 03-nqptp successfully started
Instance1 | Starting nqptp
Instance1 | fatal error: unable to listen on IPv6 port 9000. The error is: "Address not available". Daemon must run as root. Or is a separate PTP daemon running?s6-rc: info: service 02-avahi successfully started
Instance1 |
Instance1 | s6-rc: info: service 01-dbus successfully started
Instance1 | Starting dbus
Instance1 | s6-rc: info: service s6rc-oneshot-runner successfully started
Instance1 | s6-rc: info: service fix-attrs: starting
Instance1 | s6-rc: info: service startup: starting
Instance1 | s6-rc: info: service s6rc-fdholder successfully started

My docker compose yaml config is below:

services:
Instance1:
container_name: Instance1
image: shairport-sync:pulse
restart: unless-stopped
volumes:
- ./shairport-sync-instance1.conf:/etc/shairport-sync.conf
- /var/run/pulse:/var/run/pulse
environment:
- PULSE_SERVER=unix:/var/run/pulse/native
- PULSE_COOKIE=/tmp/pulseaudio.cookie
networks:
spsnet_shared:
spsnet:
ipv4_address: 192.168.1.250

networks:
spsnet:
name: spsnet
driver: macvlan
driver_opts:
parent: ens3
ipam:
config:
- subnet: 192.168.1.0/24
gateway: 192.168.1.1
spsnet_shared:
name: spsnet_shared
driver: bridge

Any ideas? Thanks!

@modafroman
Copy link
Author

Ok, managed to sort this out.

For anyone else having the same issue, it was caused by 2 individual issues:

  1. For whatever reason shairport/nqptp expects IPv6 (???), but the way the network is configured with this setup is only with IPv4. The fix is to enable IPv6 with the following network setup in docker-compose:

networks:
spsnet:
enable_ipv6: true
name: spsnet
driver: macvlan
driver_opts:
parent: ens3
ipam:
config:
- subnet: 192.168.1.0/24
gateway: 192.168.1.1
- subnet: 2403:580c:b80::/64
gateway: 2403:580c:b80::1
spsnet_shared:
name: spsnet_shared
driver: bridge

  1. Truenas is annoying with the way it handles networks and VMs. Fixing issue 1 allowed shairport to advertise on the network but wasn't able to connect to the airplay target because it couldn't pass traffic through to the VM and associated Docker. It's the same issue Wendell has complained about here: https://www.youtube.com/watch?v=R7BXEuKjJ0k. Configuring TrueNAS in the same way Wendell did sorted this out.

@noelhibbard
Copy link
Owner

Sorry I missed this issue. I have ipv6 disabled on my Debian host so maybe that is why I've never run into this issue. Thanks for coming back with your resolution, it will be helpful for others who may run into this.

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

2 participants