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

Cannot set name attribute in shairport-sync.conf #874

Closed
Conner-Killian opened this issue Jul 5, 2019 · 8 comments
Closed

Cannot set name attribute in shairport-sync.conf #874

Conner-Killian opened this issue Jul 5, 2019 · 8 comments

Comments

@Conner-Killian
Copy link

Whenever I try enabling the name attribute in the shairport-sync.conf, it spits out a fatal error message.

Job for shairport-sync.service failed because a fatal signal was delivered to the control process. See "systemctl status shairport-sync.service" and "journalctl -xe" for details.

Heres the systemctl status report:

● shairport-sync.service - ShairportSync AirTunes receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Fri 2019-07-05 23:55:38 SAST; 1s ago
     Docs: man:shairport-sync(7)
           file:///usr/share/doc/shairport-sync/README.md.gz
           https://github.com/mikebrady/shairport-sync
  Process: 4810 ExecStart=/usr/bin/shairport-sync --daemon $DAEMON_ARGS (code=killed, signal=ABRT)

Jul 05 23:55:38 connerpi systemd[1]: shairport-sync.service: Service RestartSec=100ms expired, scheduling restart.
Jul 05 23:55:38 connerpi systemd[1]: shairport-sync.service: Scheduled restart job, restart counter is at 5.
Jul 05 23:55:38 connerpi systemd[1]: Stopped ShairportSync AirTunes receiver.
Jul 05 23:55:38 connerpi systemd[1]: shairport-sync.service: Start request repeated too quickly.
Jul 05 23:55:38 connerpi systemd[1]: shairport-sync.service: Failed with result 'signal'.
Jul 05 23:55:38 connerpi systemd[1]: Failed to start ShairportSync AirTunes receiver.

Is this an error on my end? All I did was remove the comment tag and replace %H with the name "Conner's Speaker"
I ensured that the attribute ended with a semicolon and that the quotations weren't lost. All in the config file should be all correct.

It would be very appreciated if someone can please help.

@mikebrady
Copy link
Owner

Thanks for the post. Hmmm, this is working perfectly for me.

// Sample Configuration File for Shairport Sync
// Commented out settings are generally the defaults, except where noted.
// Some sections are operative only if Shairport Sync has been built with the right configuration flags.
// See the individual sections for details.

// General Settings
general =
{
        name = "Conner's Speaker"; // This means "Hostname" -- see below. This is the name the service will advertise to iTunes.
//              The default is "Hostname" -- i.e. the machine's hostname with the first letter capitalised (ASCII only.)
//              You can use the following substitutions:
//                              %h for the hostname,
...

Is it possible that you are editing the configuration file using a Windows editor? (Windows line endings are different to Unix line endings.)

@Conner-Killian
Copy link
Author

That's exactly how my configuration looks at the moment.
I'm using one of the default Linux text editors on the Raspberry Pi: Geany.
It's weird though. It worked before.
I upgraded my Raspbian OS to Raspbian Buster. Could it maybe be an issue with the new operating system? The previously used OS was Raspbian Stretch.

@mikebrady
Copy link
Owner

It’s unlikely, TBH, but I am not able to actually test that for a few days.

@mikebrady
Copy link
Owner

Hello again. I just did this – installed and updated a fresh copy of Raspbian Buster Lite, updated everything, edited the configuration file with vi – my favourite unix command-line text editor – and installed Shairport Sync according to the INSTALL.md guide. I changed the name to "Conner's Speaker" and everything works...

pi@raspberryPi3BP:~ $ sudo systemctl status shairport-sync
● shairport-sync.service - Shairport Sync - AirPlay Audio Receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-07-09 09:20:03 IST; 6s ago
 Main PID: 625 (shairport-sync)
    Tasks: 5 (limit: 2200)
   Memory: 2.4M
   CGroup: /system.slice/shairport-sync.service
           └─625 /usr/local/bin/shairport-sync

Jul 09 09:20:03 raspberryPi3BP systemd[1]: Started Shairport Sync - AirPlay Audio Receiver.
pi@raspberryPi3BP:~ $ 
``

@mikebrady
Copy link
Owner

Just to follow up on the line-ending thing and not having used Geany, this might be useful.

@bootc
Copy link

bootc commented Jul 18, 2019

This is likely the same bug that's fixed in #879.

@Conner-Killian
Copy link
Author

Hi! Sorry for my absence. I solved the problem. Sort of 😂

So. I did a clean reinstall of Shairport-sync. Removed all of the folders that the which command found. Removed the shairport-sync.conf file and then reinstalled.

So my only issue now is that I've enabled it as a systemctl service, it always gets an error when starting up. BUT, if I execute the service via the cloned executable, it works perfectly. (/home/pi/shairport-sync/shairport-sync)

This is the error I receive when running sudo systemctl start shairport-sync

pi@connerpi:~ $ sudo systemctl start shairport-sync
Job for shairport-sync.service failed because the control process exited with error code.
See "systemctl status shairport-sync.service" and "journalctl -xe" for details.

Jul 21 15:11:40 connerpi systemd[1]: Stopped ShairportSync AirTunes receiver.
-- Subject: A stop job for unit shairport-sync.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A stop job for unit shairport-sync.service has finished.
-- 
-- The job identifier is 2591 and the job result is done.
Jul 21 15:11:40 connerpi systemd[1]: shairport-sync.service: Start request repeated too quickly.
Jul 21 15:11:40 connerpi systemd[1]: shairport-sync.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit shairport-sync.service has entered the 'failed' state with result 'exit-code'.
Jul 21 15:11:40 connerpi systemd[1]: Failed to start ShairportSync AirTunes receiver.
-- Subject: A start job for unit shairport-sync.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit shairport-sync.service has finished with a failure.
-- 
-- The job identifier is 2591 and the job result is failed.

I have run sudo systemctl disable shairport-sync and sudo systemctl enable shairport-sync

@mikebrady
Copy link
Owner

mikebrady commented Jul 21, 2019

Thanks Conner. A fix for #879 which is in the development branch now might be relevant.

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

3 participants