eizedev / AirConnect-Synology

Updated AirConnect packages for Synology NAS and Synology Router
https://github.com/philippe44/AirConnect
MIT License
315 stars 14 forks source link

The package service could not be executed (Der Paketdienst konnte nicht ausgeführt werden) #22

Closed guidau closed 3 years ago

guidau commented 3 years ago

Hi, I try to run the current version AirConnect-x86-64-0.2.43.1-20210119.spk on my NAS DS1819+ first with no success. After installation I get the message that the package service could not be executed. I checked it also on my second NAS DS1815+ with the same result.

image

root@GNAS02:/var/log/packages# cat AirConnect.log 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/rm -rf /volume1/@appstore/AirConnect 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/rm -rf /volume1/@appstore/AirConnect ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/AirConnect 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/AirConnect ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/rm -rf /var/packages/AirConnect 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/rm -rf /var/packages/AirConnect ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/mkdir -p /var/packages/AirConnect 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/mkdir -p /var/packages/AirConnect ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/AirConnect/INFO 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/AirConnect/INFO ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/rm -rf /var/packages/AirConnect/scripts 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/rm -rf /var/packages/AirConnect/scripts ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/AirConnect/scripts 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/AirConnect/scripts ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/rm -rf /var/packages/AirConnect/conf 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/rm -rf /var/packages/AirConnect/conf ret=[0] 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/AirConnect/conf 2021/03/06 20:53:16 install AirConnect 0.2.43.1-20210119 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/AirConnect/conf ret=[0] 2021/03/06 20:53:17 install AirConnect 0.2.43.1-20210119 Begin /bin/rm -rf /volume1/@tmp/pkginstall 2021/03/06 20:53:17 install AirConnect 0.2.43.1-20210119 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0] 2021/03/06 20:53:18 install AirConnect 0.2.43.1-20210119 Begin start-stop-status start 2021/03/06 20:53:18 install AirConnect 0.2.43.1-20210119 End start-stop-status start ret=[1] 2021/03/06 20:53:18 (system) trigger AirConnect 0.2.43.1-20210119 Begin start-stop-status stop 2021/03/06 20:53:18 (system) trigger AirConnect 0.2.43.1-20210119 End start-stop-status stop ret=[1] 2021/03/06 21:02:06 start AirConnect 0.2.43.1-20210119 Begin start-stop-status start 2021/03/06 21:02:06 start AirConnect 0.2.43.1-20210119 End start-stop-status start ret=[1] 2021/03/06 21:02:06 (system) trigger AirConnect 0.2.43.1-20210119 Begin start-stop-status stop 2021/03/06 21:02:06 (system) trigger AirConnect 0.2.43.1-20210119 End start-stop-status stop ret=[1]

2021/03/06 20:53:17 install AirConnect 0.2.43.1-20210119 successfully 2021/03/06 20:53:17 install AirConnect: begin to start version 0.2.43.1-20210119 2021/03/06 20:53:17 install AirConnect 0.2.43.1-20210119 Begin pre-load apparmor 2021/03/06 20:53:17 install AirConnect 0.2.43.1-20210119 End pre-load apparmor ret=[0] 2021/03/06 20:53:18 install AirConnect 0.2.43.1-20210119 Begin start-stop-status start 2021/03/06 20:53:18 install AirConnect 0.2.43.1-20210119 End start-stop-status start ret=[1] 2021/03/06 20:53:18 (system) trigger AirConnect 0.2.43.1-20210119 Begin start-stop-status stop 2021/03/06 20:53:18 (system) trigger AirConnect 0.2.43.1-20210119 End start-stop-status stop ret=[1] 2021/03/06 20:53:18 (system) trigger AirConnect 0.2.43.1-20210119 Begin unload apparmor 2021/03/06 20:53:18 (system) trigger AirConnect 0.2.43.1-20210119 End unload apparmor ret=[0] 2021/03/06 20:53:19 stop AirConnect: begin to stop version 0.2.43.1-20210119 2021/03/06 20:53:19 stop AirConnect: stop version 0.2.43.1-20210119 successfully, result 0 2021/03/06 20:53:19 install AirConnect: start version 0.2.43.1-20210119 failed, result 272

I run Virtual Machine Manager and Docker on both boxes may that helps ? Do you need any additional information ? Many thanks in advance. DS1819+ & DS1815+ DSM 6.2.3-25426 Update 3 with some Sonos & two Chromecasts devices on my network

eizedev commented 3 years ago

Hi @guidau

This looks like a problem where the installation process cannot identify your primary ip address. Airupnp needs your primary ip address since it will open a port on this ip address. Could you please post the content of the airconnect application logfile? /var/log/airconnect.log In this logfile we will (possibly) find more information about the error.

Which ip configuration (local subnet) your NAS devices are located in? The start script will check all your local network interfaces for private ip addresses (docker will be excluded) (Ranges: 192.168.* or 10.* or 172.16.* - 172.31.* or 17.0.64.* - 17.0.127.*). I have no VMM installation, so i cannot test it, but if you can tell me the name of the VMM network adapter, i can exclude this network adapter if necessary.

The following command will be used to gather the needed network interface:

/sbin/ifconfig -a | grep 'Ethernet' -A 1 | grep -E 'inet (addr:)?(192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|17\.0\.(6[4-9]|[7-9][0-9]|1([0-1][0-9]|2[0-7]))\.)' -B 1 | grep 'Ethernet' | grep -v "lbr0" | grep -v "docker" | cut -d ' ' -f 1

You could also login via ssh to your NAS and execute this command (This will only read the ifconfig -a command to get all your network adapter and filter via regex and grep to find the correct interface)

You can find more information in the https://github.com/eizedev/AirConnect-Synology#how-it-works section of the readme below the Supported Devices table.<

Thanks, René

eizedev commented 3 years ago

@guidau Any update on this?

ewolfe commented 3 years ago

Similar issue image

/var/log/airconnect.log doesn't exist and

/sbin/ifconfig -a | grep 'Ethernet' -A 1 | grep -E 'inet (addr:)?(192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|17\.0\.(6[4-9]|[7-9][0-9]|1([0-1][0-9]|2[0-7]))\.)' -B 1 | grep 'Ethernet' | grep -v "lbr0" | grep -v "docker" | cut -d ' ' -f 1

returns

eth0
eth1

Maybe my issue is that I have two ethernet cables plugged into the NAS?

eizedev commented 3 years ago

Thanks @ewolfe for the feedback. Interesting, so you have two different ip addresses configured on two network ports/adapters? Are you using both network ports for different purposes?

I will test the next days, if I can optimize the detection a little bit or omit it completely in the current version of airupnp. There were problems in the past that the default interface could not be used for some people and so airupnp could not be started at all.

If that is okay with you, I will then provide you with a test version here.

ewolfe commented 3 years ago

Thanks @eizedev that sounds good. I'll also try unplugging one of the ethernet cables. I don't know if I have a good reason for using both ports. I plugged them both in since why not?

eizedev commented 3 years ago

@ewolfe Sorry for the late reply.

I have also connected a cable to both ports (and configured LACP to use both ports as one device). If you do that, and you do not want to use these ports individually, you need to configure your NAS to use both ports as "one network adapter". This way you can use a kind of load balancing or failover if one port fails or instead of a bandwidth of 1000mbit you can reach 2000mbit because both ports can be used.

You can find more information from synology here: Link Aggregation

If you just plug in a cable in both ports, you will get two different ip addresses. In the current configuration, AirConnect needs to identify a unique network adapter for your network. If it gets two adapters (as in your environment) it will fail to start.

In principle, this is a problem in my network adapter detection that I would like to fix in a future release. I had not thought about that. But also your network setup, if you don't really want to use both adapters individually from each other (e.g. LAN 1 for package XYZ and LAN 2 for Docker containers etc.), is not optimal and you should consider connecting both interfaces as described above.

ewolfe commented 3 years ago

Thanks @eizedev, I tested both a single ethernet connection and bonding the two of them. Both approaches worked (I ended up bonding). Cheers!

x5nder commented 3 years ago

I'm also getting a 'failed to run package service' error.

/sbin/ifconfig -a | grep 'Ethernet' -A 1 | grep -E 'inet (addr:)?(192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|17\.0\.(6[4-9]|[7-9][0-9]|1([0-1][0-9]|2[0-7]))\.)' -B 1 | grep 'Ethernet' | grep -v "lbr0" | grep -v "docker" | cut -d ' ' -f 1 gives me eth0

Manually opening term and running airupnp works fine and my iPhone recognizes my Sonos speakers, so not sure what's going wrong with the script. I tried setting a fixed IP address in the start-stop script, but that didn't change anything. Any suggestions?

eizedev commented 3 years ago

@x5nder @ewolfe @guidau

Please check the latest release, the problem with the network interface detection should (hopefully) finally be fixed there.

If you still encounter these problems, please give feedback here.


Please checkout the newest release 0.2.50.5-20210706 - DSM7 compatible with Compatibility for DSM7, more security and the possibility to view the log file and changed the airupnp and aircast configuration without SSH access using f.e. the FileStation or SMB/AFS Share Access from your windows/macos/Linux.

It was also backported to DSM6 (tested) and DSM5 (untested), so these devices will also get the new features/fixes.

If this release is working, we can then close this issue.