搜尋此網誌

2009/07/13

QNAP TS-409 iTune Service troubleshooting.
Well, I got some problem with TS-409 iTunes service, so I decide to fix it.....for whole day.
You must have a little Unix skills if you want to try to fix it.


So, I enjoy my TS-409 with iTunes server, it makes me easy to listen to my favorite music.
Well, on February I bought a new mobile phone, it supports MP3 play. But it only support UNICODE ID3 tags. So I decide to convert all my MP3 existing tags from BIG5 to UNICODE. Then My TS-409 iTunes service stop working.
Yesterday, I upgraded firmware to 3.1, it still not working....So I decide to figure out why it stop working.

First I SSH to TS-409, and type following command:

ps -ef|grep daapd

mt-daapd is iTunes service process name, usually system will spam around 5 processes for iTunes. I found there is no daapd process running. So I restart iTunes service from admin interface. This time I found daapd consumes all CPU resources (via command top)

So, there should be a problem in daapd. Maybe it hang in one of these MP3 files? If I moved all MP3 files out, the service is back. But it's hard to figure out which MP3 cause this problem.

The next 2 hours I waste my time in move MP3 files out and in. Finally I give up.

so I decide to find which MP3 cause daemon hang? I SSH to TS-409 and type:

ps -ef|grep daapd

System reported there is 5 processes running now. Next, use top command to find which pid that consumes CPU. Write down the pid. In this example, if the pid is 9181, issue this command:

cd /proc/9181/fd

Change directory to /proc//fd
This directory displayed opening files for the pid. Enter this command:

ls -l

Very simple, list which MP3 cause daemon hang. Please note: set SSH client character encoding to UTF-8. Or the screen display may be incorrect. Next, find out the MP3 file, fix it's ID3 tag. Repeat these steps, finally my iTunes service is back.





沒有留言: