philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.43k stars 216 forks source link

starting aircast error #469

Closed rlefig closed 11 months ago

rlefig commented 1 year ago

Hi I am trying to start aircast on a alma linux box, I am a redhat guy and get the following on startup [root@d5070 AirConnect]# ./aircast-linux-x86_64 -d all=debug -i aircast.xml [19:05:23.076684] main:912 Starting aircast version: v1.1.5 (May 7 2023 @ 13:42:16) [19:05:23.076890] main:919 no config file, using defaults [19:05:23.077113] Start:679 Binding to 10.0.0.131 [19:05:23.080444] bind_socket:636 socket binding 3 on port 35893 [19:05:23.080581] Start:704 Starting pico HTTP server on port 35893 [19:05:44.081372] Stop:725 terminate search thread ... [19:05:44.081590] Stop:730 flush renderers ... [19:05:44.582571] Stop:738 terminate main thread ...

[root@d5070 AirConnect]# uname -a Linux d5070 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux

rlefig commented 1 year ago

static is the same [root@d5070 AirConnect]# ./aircast-linux-x86_64-static -d all=debug -i aircast.xml [19:19:40.103536] main:912 Starting aircast version: v1.1.5 (May 7 2023 @ 13:42:16) [19:19:40.103633] main:919 no config file, using defaults [19:19:40.103969] Start:679 Binding to 10.0.0.131 [19:19:40.104814] bind_socket:636 socket binding 3 on port 54251 [19:19:40.104895] Start:704 Starting pico HTTP server on port 54251 [19:20:01.105806] Stop:725 terminate search thread ... [19:20:01.105978] Stop:730 flush renderers ... [19:20:01.606847] Stop:738 terminate main thread ...

philippe44 commented 1 year ago

There is no error

rlefig commented 1 year ago

so is that what it supposed to do ? It returns back to command prompt and there is no airconnect process running when it does return?

rlefig commented 1 year ago

when I try to run as a service I get the following. I can never create a .xml file for config either [root@d5070 system]# systemctl status aircast.service ● aircast.service - AirCast Loaded: loaded (/etc/systemd/system/aircast.service; enabled; preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2023-05-25 07:17:09 > Process: 2539 ExecStart=/var/lib/airconnect/aircast-linux-x86_64 -l -z -x /var/lib/ai> Main PID: 2539 (code=exited, status=203/EXEC)

Thanks for your help trying to get my apple phone music list connected to my chromecast audio device

philippe44 commented 1 year ago

You have launched it in a mode (-i, see README) where it creates a config file - if it finds players - and return. So this is what it does and in your case no Chromecast device is found

rlefig commented 1 year ago

i do have a chromecast device on the network at 10.0.0.137 an I can see it active in the xfinity list of connected devices. should I launch it without -i, we did the service exit and no longer is running is that because there were no devices found? I will go over the readme again. I know we will get through this. I have tried to enable debug logging but get so little info.

Thanks so much Philippe44 you have been very helpful so far

rlefig commented 1 year ago

also should I have a config.xml as there is not one there or will that get generated after it successfully finds a device?

philippe44 commented 1 year ago

You only need a config file if you want to tweak parameters. The easiest way to create one is to use the -i option. In that mode, aircast runs for about 30s, detect devices, write a config file ONLY IF AT LEAST one device is found and exits.

When launched with no option or without the -i option, aircast runs and does it bridges job. It searches for devices every minutes or so. When a device is found, it looks for optional parameters in the optional config file but otherwise it just applies default parameter.

Please remember that creating an entry in the config file does not create a player, it is only used for getting config parameters after the player is discovered.

If none are found on your network, it's a network config issue. Wrong interface, filtering in subnet, WiFi router disabling multicast packets etc... There are unfortunately plenty of reasons why you could see the CC as long as you search them on the WiFi branch of your network

rlefig commented 1 year ago

Thanks, I do know that the devices are on the same subnet. I will check if I can ping the chromecast from the aircast system. I do have a couple of switches in play as the aircast is in the back yard the server in the basement. I will check if the xfinity router disables multicast packets. I will hopefully get this working soon.

rlefig commented 1 year ago

Thanks, I got it working from command line by moving the dell wyse box onto same wireless switch of chromecast audio. I was also able to create an xml file for settings. I would like to bump up the volume a little bit in the config file from 0.5 to something a bit higher. Still having trouble running as a service and will need to look into that.

Thanks

rlefig commented 1 year ago

getting this error in journal when starting as a service Jun 01 08:49:04 d5070 systemd[1]: Started AirCast. Jun 01 08:49:04 d5070 systemd[135441]: aircast.service: Failed to locate executable /var/lib/airconnect/aircast-linux-x86_64: Permission denied Jun 01 08:49:04 d5070 systemd[135441]: aircast.service: Failed at step EXEC spawning /var/lib/airconnect/aircast-linux-x86_64: Permission denied Jun 01 08:49:04 d5070 systemd[1]: aircast.service: Main process exited, code=exited, status=203/EXEC Jun 01 08:49:04 d5070 systemd[1]: aircast.service: Failed with result 'exit-code'.

philippe44 commented 1 year ago

Obviously this is either the wrong application name or it does not have execute attribute

rlefig commented 1 year ago

they did have the executable bit and copying the exec line to run on demand worked fine. I just changed paths to /usr/local/bin in service and all worked.

Thanks so much!