AmahiTunes failed, log overload, other oddities

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

AmahiTunes failed, log overload, other oddities

Postby flickeringsight » Thu Sep 02, 2010 12:09 pm

Yesterday I noticed that AmahiTunes share was no longer showing up on my other machines (iMac and Macbook Pro). Also, my HDA's Remote Desktop server which lists automatically in the Finder's "Shared" menu was no longer appearing (the HDA is headless). So I remoted in manually and found a notification had popped up stating that the directory /var had 0 bytes left.

I traced the source of the bloat to '/var/logs' and found several 100+Mb 'monit' log files filled with, "Error reading pid from file '/var/run/mt-daapd.pid' ". The log was also peppered with errors stating "mt-daapd' failed to start", "mt-daapd process is not running", and "mt-daapd' trying to restart".

Looking into the mt-daapd.log I found it loaded with chucks of information, repeating every second, "Starting rendezvous deamon, Client Registering, Current database version: 8, Staring signal handler, Loading playlists, Initializing database, Starting mp3 scan". And it just repeats that endlessly but sometimes in a different order or repeating lines.

So I uninstalled AmahiTunes, restarted the machine and reinstalled AmahiTunes only to find it still spitting out error logs. Also, the Remote Desktop share is still not showing up on my Macs.

One thing that caught my attention was the mention of the rendezvous daemon starting, I wondered if that might be the problem since the Remote Desktop may use that as well to broadcast itself on my network, although I'm not sure.

I really miss my AmahiTunes, does anyone have advice?

Also, recently I tried to get the S/PDIF audio working by installing 'realtek-linux-audiopack-5.15' drivers. I was unsuccessful in that endeavor and this problem occurred soon afterward. Maybe a co-incidence but maybe not.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: AmahiTunes failed, log overload, other oddities

Postby flickeringsight » Mon Sep 06, 2010 1:35 pm

OK, I've made some progress while poking around with a sharp stick. I tried deleting all files and folders relating to AmahiTunes including the cache file located at /var/cache/mt-daapd which seemed to do the trick in regards to getting AmahiTunes to work again. I also deleted the config file located in /etc and interestingly it was replaced by a link to a new config file located in /var/had/apps/amahitunes. The old config, I only glanced at, was much more involved than the new one which is very spartan in it's contents.

However, the webapp page for AmahiTunes that usually shows the number of shared songs available still does not work.

Also, the remote desktop share is still not showing up on any of my machines.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: AmahiTunes failed, log overload, other oddities

Postby flickeringsight » Sun Sep 12, 2010 11:07 am

Another perplexing update. Now it seams the web interface has starting working all on it's own. So AmahiTunes seems to be functioning normally again... until I look at the logs which are still being inundated with problems.

Code: Select all

2010-09-12 10:40:24: Starting rendezvous daemon 2010-09-12 10:40:24: Client registering 2010-09-12 10:40:24: Current database version: 8 2010-09-12 10:40:24: Starting signal handler 2010-09-12 10:40:25: Loading playlists 2010-09-12 10:40:25: Initializing database 2010-09-12 10:40:25: Starting mp3 scan 2010-09-12 10:40:25: Starting web server from /usr/share/mt-daapd/admin-root on port 3689 2010-09-12 10:40:25: Could not open port: Address already in use 2010-09-12 10:40:25: Error staring web server: Address already in use 2010-09-12 10:40:25: Aborting
This pattern repeats continually without pause. It seems like two instances of mt-daapd are trying to run simultaneously. I have setup a script to erase the bloated log files every hour of so to keep the /var volume from filling up. It's a band-aid but I need a more permanent solution.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
cpg
Administrator
Posts: 2605
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: AmahiTunes failed, log overload, other oddities

Postby cpg » Sun Sep 12, 2010 7:12 pm

ouch.

mt-daapd has a race condition. it sometimes does not create a pid file, and some times it gets stuck with an old one!

this is not good, as amahi has a watchdog to take care of reliability issues and temporary hiccups.

the watchdog things that the process is not running and it tries to start another one.

WORKAROUND and partial SOLUTION:

Code: Select all

rm -f /var/run/mt-daapd.pid && killall mt-daapd
what you want is that the pid and the program should match:

Code: Select all

[19:09:49](1)milan:log# cat /var/run/mt-daapd.pid 23828 [19:09:52](1)milan:log# get mt-daapd mt-daapd 23828 5.1 0.0 121764 2860 pts/6 Sl 19:09 0:00 /usr/sbin/mt-daapd
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: AmahiTunes failed, log overload, other oddities

Postby flickeringsight » Mon Sep 13, 2010 7:58 pm

Thanks for the insightful reply, cpg. I checked the pid file over a period of a few minutes and it's contents are constantly changing. Then I checked the pid of the running instance of mt-daapd and it's value is steady at 2112. After that I thought to check the 'Servers' list in the 'Setting' tab on my HDA and is it lists the AmahiTunes Server as stopped so your diagnosis appears correct.

After following your guidelines the pid file number and actual mt-daapd numbers now coincide. The log file is no longer logging excess activity and the servers list is showing the AmahiTunes Server as running. This is good for me.

I must ask though - is this going to be a reoccurring problem or will I have to repeat this on occasion? Is there a permanent solution?

- Thanks
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
cpg
Administrator
Posts: 2605
Joined: Wed Dec 03, 2008 7:40 am
Contact:

[SOLVED] Re: AmahiTunes failed, log overload, other oddities

Postby cpg » Mon Sep 13, 2010 8:08 pm

glad it's solved. hope it's fixed in fedora 13 or 14.

we just don't have the staff to cover all these issues inside of apps themselves.

when you reboot, it may happen again. :(
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: AmahiTunes failed, log overload, other oddities

Postby flickeringsight » Wed Sep 22, 2010 5:39 pm

I found a solution to the third issue mentioned at the top of this thread - the HDA's vnc service not showing up on my Macs. It seems Avahi (the Bonjour a.k.a. Rendezvous a.k.a. ZeroConfig) service software was no longer broadcasting the vnc service.

I don't know how it became misconfigured, but a solution can be found here: http://www.sanityinc.com/articles/mac-s ... with-linux

In short, navigate to /etc/avahi/services and create a file called rfb.service containing the following:

Code: Select all

<?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group>   <name replace-wildcards="yes">%h</name>   <service>     <type>_rfb._tcp</type> <port>5900</port>   </service> </service-group>
That's it! My HDA's vnc service instantly showed up on all my other machines.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
cpg
Administrator
Posts: 2605
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: AmahiTunes failed, log overload, other oddities

Postby cpg » Wed Sep 22, 2010 5:53 pm

i can see the service, but not connect.

i have been using Chicken of the VNC, however, it loses some keystrokes (wtf??).

i would like to see if we can wrangle avahi, despite the name being so close to amahi :)

interoperability would be nice.

the remote desktop little window sits there saying "Connecting ..." .... and i can't even cancel it!?!

i think this is part of the finder. the finder is much improved in snow leopard. however, it's still a bit iffy when it comes to networking.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: AmahiTunes failed, log overload, other oddities

Postby flickeringsight » Wed Nov 24, 2010 12:13 pm

A followup on the remote desktop issue where Avahi isn't broadcasting availability of the vnc service over my local network.

It seems that after a restart the vnc service no longer is being broadcast - again. However, from the Terminal if I 'touch' the service file mentioned in my earlier post the service instantly become available.

Code: Select all

touch /etc/avahi/services/rfb.service
It's annoying that I have to do this after each restart. I wonder if I can run a script during startup that automatically touches the file. It seems that this shouldn't be necessary, clearly the root problem isn't fixed.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
bigfoot65
Project Manager
Posts: 11446
Joined: Mon May 25, 2009 4:31 pm

Re: AmahiTunes failed, log overload, other oddities

Postby bigfoot65 » Wed Nov 24, 2010 12:20 pm

Check out the wiki on setting up VNC. There is some new guidance that may correct your problem.

Its located at http://wiki.amahi.org/index.php/VNC.
ßîgƒσστ65
Applications Manager

Who is online

Users browsing this forum: No registered users and 1 guest