#73
Verified
Connection Probs
Reported by devanimal on TuneConnect for Mac/PC · 17/06/2008 18:03:36
- Assigned to:
- Matt Patenaude
- Priority:
- Normal
- Status:
- Verified
- Category:
- General Malfunction
- Version:
- 2.1
- Platform:
- OS X 10.4 (Server)
Hi Matt,
First, I've got to say that I really love the functionality the TuneConnect offers. I've been a 1.0 user for a long while, but when I upgraded my ibook to Leopard I had to ditch 1.0. So I've been trying to use 2.0, and now 2.1, and am experiencing general bugginess with my connection. I can't get 2.1 to connect in a useful way at all actually.
Here's what just happened (after I rebooted itunes on the server): I opened TC2.1, it saw the server, I hit connect, it said 'connected', then 'please wait...', then back to the choose connection dialog. I hit connect again, this time, it didn't connect, just went straight back to the choose connection dialog. So then, on my third try, I hit connect, I connected and my current playing track showed up in the dialog box. I clicked 'choose music' and TC2.1 unexpectedly quit. I've attached the error log here for you.
Here's what I'm hoping isn't the issue: I'm running jaguar on my server (I don't think I can upgrade the system to leopard, it's an old G4). I really want TC2.1 to work with older servers, cause that's where old computers should go when they are retired: music server heaven.
Please tell me this is going to work. Our house is awfully quiet without TC.
Thanks.
Devan
Portland, OR

devanimal
2 months ago
Okay, here is more info.
I tried starting up TC2.1, and this is what was displayed in Console:
6/17/08 6:27:41 PM TuneConnect2800 Connection went active! Key=8f2ce4cf767e5c6f108835a90a7963168d271135 ist=1&authKey=8f2ce4cf767e5c6f108835a90a796... &authKey=8f2ce4cf767e5c6f108835a90a7963168d... 8f2ce4cf767e5c6f108835a90a7963168d271135
6/17/08 6:28:42 PM TuneConnect2800 Uh oh, an error: timed out 192.168.1.4:3032/visualSettings?asPlist=1&auth
6/17/08 6:28:42 PM TuneConnect2800 Uh oh, an error: timed out 192.168.1.4:3032/getPlaylists?ofSource=40&asPl
6/17/08 6:28:42 PM TuneConnect2800 Uh oh, an error: timed out 192.168.1.4:3032/fullStatus?rating=1&asPlist=1
6/17/08 6:28:42 PM TuneConnect2800 Uh oh, an error: timed out 192.168.1.4:3032/EQSettings?asPlist=1&authKey=
Matt Patenaude
2 months ago
Devan,
You're unfortunately absolutely right-- Jaguar is the problem. TuneConnect Server requires Tiger. I've been able to get it working on Panther with a bit of hard work/recompilation, but I can't distribute a stable binary for it, only source and instructions.
As for Jaguar, here we have a horse of a different color. ;) Is it doable? Most likely. Am I eager to attempt it? I can't say that I am. :P Basically, I would need a system running Jaguar to do my development on in order to reliably setup a build chain to produce the files you need.
My advice to you: see if you can upgrade your server to Tiger (Leopard isn't necessary for the server, and only "enhances the experience" for the client). If it can handle Tiger (and my G4 has no problem with it), you'll be good to go. If you can't do that, let me know. I hate to see a disappointed user, and maybe we can work together to get your music server up and running again. :)
devanimal
2 months ago
Oh darn. My bad. My server IS running 10.4. Tiger.
I get all those cats mixed up.
So the good news is that the problem is not my server's OS.
And the bad news is that it's something unknown.
Sorry for mentioning Jaguar.
Any ideas?
Matt Patenaude
2 months ago
Did you change the port that TuneConnect uses? The errors are all pointing to 3032, which doesn't make any sense to me unless you purposely set it that way.
If you didn't manually set that port, then when you start TuneConnect (client), try clicking "Other...", then enter 192.168.1.4, with port 4242 (the default), and see if it can connect then. If that fixes things, first take a moment to rejoice. Next, we'll figure out why the server is telling the client (or why the client thinks the server is telling it) that the port is 3032.
devanimal
2 months ago
I did change the port when I was troubleshooting TC 2.0.
I've changed it back to 4242 (is it normal to have to logout on the server to get the port settings to change?).
I tried connecting, after quitting the client side TC 2.1 and starting it back up.
It connected, then I clicked "choose music" and it lost the connection.
Here's the console log:
6/18/08 8:09:59 AM TuneConnect4408 Opening connection to 192.168.1.4:4242 f2ce4cf767e5c6f108835a90a7963168d271135 ist=1&authKey=8f2ce4cf767e5c6f108835a90a796... &authKey=8f2ce4cf767e5c6f108835a90a7963168d...
6/18/08 8:09:59 AM TuneConnect4408 Connection went active!
6/18/08 8:11:07 AM TuneConnect4408 Uh oh, an error: timed out 192.168.1.4:4242/EQPresets?asPlist=1&authKey=8
6/18/08 8:11:08 AM TuneConnect4408 Uh oh, an error: timed out 192.168.1.4:4242/getPlaylists?ofSource=40&asPl
6/18/08 8:11:08 AM TuneConnect4408 Uh oh, an error: timed out 192.168.1.4:4242/fullStatus?rating=1&asPlist=1
Matt Patenaude
2 months ago
Hmmm... try running the server without a password and tell me what happens then. Could make no difference, but let's see first.
devanimal
2 months ago
I changed the server to run without a password, then logged out and back in and fired up itunes.
When I tried to connect with the client I got this:
6/18/08 10:10:37 AM TuneConnect4642 Connection went active! ist=1
6/18/08 10:11:37 AM TuneConnect4642 Uh oh, an error: timed out 192.168.1.4:4242/fullStatus?asPlist=1&rating=1
6/18/08 10:11:38 AM TuneConnect4642 Uh oh, an error: timed out 192.168.1.4:4242/EQSettings?asPlist=1
6/18/08 10:11:38 AM TuneConnect4642 Uh oh, an error: timed out 192.168.1.4:4242/visualSettings?asPlist=1
6/18/08 10:11:38 AM TuneConnect4642 Uh oh, an error: timed out 192.168.1.4:4242/getPlaylists?ofSource=40&asPl
What other details would help... my itunes library is stored on drives internal to the server, but on two drives that are a mirrored raid. I have no trouble at all playing music with itunes directly on the server. I have about 630 playlists, is there a limit within TC?
Thanks for helping me troubleshoot this, Matt!
Matt Patenaude
2 months ago
There should be no limits, and your iTunes library should be accessible on a strange drive-- though it doesn't always work. First of all, go to the server, and visit this URL:
localhost:4242/serverInfo.txt
And paste the response to me. Then, as a test, visit:
192.168.1.4:4242/serverInfo.txt
From the client, and make sure it says the same thing. If it does, that means the server is operational, but it's a problem with the iTunes communication.
Beyond that, I'd love if you'd be willing to find this file on the server:
~/Library/Preferences/com.apple.iApps.plist
Open it up (hope you have Plist Editor installed, you do if you have the dev tools), and then make sure the first item in the array "iTunesRecentDatabasePaths" is accurate for your iTunes Library.
Let's start there and see what surfaces. :)
devanimal
2 months ago
This is the response from localhost:4242/serverInfo.txt:
>{supportsArtwork}
And it's the same response when visited from the client.
I opened up com.apple.iApps.plist and this is the path shown in the array iTunesRecentDatabasePaths>
~/Music/iTunes/iTunes Music Library.xml
seems right to me?!
devanimal
2 months ago
whoa. the posting software scrambled the serverinfo.txt
trying again without the end brackets:
supportsArtwork
Matt Patenaude
2 months ago
Hm hmm hmmmmmm. Well as long as that is what shows up in iTunes (on the server) as the location of your music library, then that's a touch unusual.
OK, next thing to try: disable library file caching (and restart the server). What happens when you do that?
devanimal
2 months ago
argh. attaching the txt file...
Attachments:
Matt Patenaude
2 months ago
It was actually fine, it came through correctly in the email. :P Try the caching tip a few posts up, and let me know what happens.
devanimal
2 months ago
Well, library file caching has been disabled for all of the previous tests. I just turned it on to see if it makes any difference and the client timed out.
Matt Patenaude
2 months ago
Well this is royally screwed up. :P I can say with 98% certainty that the problem is communication between the server and iTunes, which is not a problem I've ever run into before. Congrats on being the first to report (if not first to experience). :)
Restart the server, then restart iTunes. Then, from the server, run the following commands in succession:
localhost:4242/serverInfo.txt (just to make sure it's running) -of-the-library-source-from-previous-command-here
localhost:4242/getSources
localhost:4242/getPlaylists?ofSource=insert-the-id
(pick a playlist) urce-id
localhost:4242/getTracks?ofPlaylist=playlist-id:so
(ex. localhost:4242/getTracks?ofPlaylist=5424:40)
Let me know what happens with these.
devanimal
2 months ago
Sent via email
Okay, when I ran the commands on the server the getPlaylists hung for
a long while. More than a minute. I thought it had crashed and was
about to give up on it, but then it spit out my playlists. The
getTracks command worked fine after that.
Is there a chance that the TC server is not waiting long enough to
pull up all of my playlists before it times out?
Matt Patenaude
2 months ago
It's not waiting long enough, that's definitely the problem. Unfortunately, it shouldn't have to wait that long. Approximately how many tracks are in your library?
Incidentally, quick! :P Without shutting down the server, go try the client. I predict that it should work pretty well right about now.
devanimal
2 months ago
Sent via email
25,238 tracks. Approximately. Heh.
I must not have been quick enough. The client timed out when I tried it.
Matt Patenaude
2 months ago
Ahh, well let's do this then. Just to confirm my theory.
Turn caching on, if you turned it back off (assuming you did? If you didn't, and it was already on, ignore the rest of this :P). Repeat the commands above up through the getPlaylists one. Then go back to the client, and try that.
Theoretically, as long as you left the default cache time of 1 day, your library should stay cached in the server, and it should be a touch quicker.
devanimal
2 months ago
Sent via email
HEY IT WORKED!
I turned caching back on, it took 2.5 minutes for the getPlaylists
command to load on the server, and then I ran up to the client and
connected, clicked 'choose music' and I'm in.
So do I have to do that every time I fire up TC? Is there a way to not
release the connection? If I don't allow my ibook to sleep?
2.5 minutes. Is it taking so long cause of my large library? Do I need
more RAM? What gives?
devanimal
2 months ago
Oh wait. The playlists load, but I can't get the tracks within them to load.
It says "Loading playlist...", stops, then alternates between "updating (playlist name)" and "Nothing Playing". It's cycling between those two as I type.
So close.
Matt Patenaude
2 months ago
I can only assume these problems are because your library is so large -- this is never something I've had to deal with.
Basically, if your library doesn't change that often, you can set your cache to not expire, restart the server, recache one more time, and then you'll be good to go, hopefully forever. As long as iTunes doesn't restart, nothing in your library file will change until you add music.
Of course, this is not a satisfactory solution for me either. :P So I'm going to start doing a bit of research. I can't promise we'll fix this anytime soon, but there must be a solution, somehow.
devanimal
2 months ago
I hope there is a solution someday. The server in the basement is a long walk just to change tracks.
Thanks for your time. Check your tip jar for some appreciation.
Matt Patenaude
2 months ago
Thank you very much, I appreciate the donation. :)
Incidentally, if you're just changing tracks and now browsing the library, you may have some success by pointing your web browser to the server: 192.168.1.4:4242
There's a lightweight web-client that doesn't touch the track browsing: turn off library caching, and use that to change tracks. If it's enough for now, that might help a bit. :)
Matt Patenaude
2 months ago
Incidentally, in case the web client isn't sexy enough for you. :P How much would you miss the ability to browse tracks?
As an intermediate fix for TuneConnect 2.2 (just released 2.1 a few days ago, so this won't be out for a good month or two), I could give TuneConnect a "hidden override" to turn off all track-browsing features. That would at least allow TuneConnect to work for you as a basic controller. What do you think?
devanimal
2 months ago
Hey Matt,
I can't get the web-client to work at all! So I'm not sure that the hidden override option within TC client will work. Browsing tracks is very useful but not nearly as essential as the ability to choose playlists.
Yeah, so the web-client. I turned off caching on the server. The web-client says "Loading... please wait while...." and the buttons don't seem to have any effect on itunes on the server. My music server system is doomed!
Would you mind explaining to this layman how TC changed from 1.x to 2.x? I'm curious to understand conceptually why 1.x worked for a large library, but 2.x doesn't.
Matt Patenaude
2 months ago
Quite frankly, I'm curious to understand why 1.x worked and 2.x doesn't as well. :P
Here's what changed: TuneConnect 1.x communicated directly with the remote copy of iTunes via Remote Apple Events. It worked, but it was slow and very unstable, and also required that the user enable a setting in System Preferences, which could be a bit of a pain. Most disappointingly, Remote Apple Events only work on OS X.
TuneConnect 2.x now has both a client and server-- the client and server communicate in their own HTTP-based language called Tunage (tunage.tuneconnect.net) that I wrote specially for this purpose. TuneConnect (the client) sends commands to TuneConnect Server, which then relays the commands to iTunes in a platform-specific way. Since the language that the client and the server speak is neutral, that means that TuneConnect can very easily become (and indeed, will become) cross-platform.
One of the things that makes TuneConnect faster (beyond the elimination of AppleScript, which is a very slow language) is that it has the capability to load your iTunes Library XML file, and cache that. Theoretically, the server can then return the results based on what's loaded into memory. Each time the library is loaded from disk, it should probably take awhile if you have a large library, but for each command sent between loads, everything should behave much faster. Why it's not, I don't quite understand.
Disabling library caching gets you as close to the way the old TuneConnect worked as possible, because it draws all of its track and playlist information directly from iTunes (just by way of TuneConnect Server). Perhaps if I add an option to increase the timeout, you might be able to make it work.
If you'd like to give it a try, I could add an option to increase the timeout, call it 2.2 alpha, and send you a private build. :P I might be able to get it going later today if you're interested.
Good luck!
devanimal
2 months ago
Heck yeah I'll give 2.2alpha a try!
and I'm going to add "beta tester" to my resume.
can you extract my email addy from 16bugs.com?
Matt Patenaude
2 months ago
Sent via email
I can just post it to my next comment. Expect it probably within the
next two hours or so. :)
Matt Patenaude
2 months ago
OK, changed my mind a little to make my life easier. ;) Rather than start implementing a complex preference system for this in 2.2 alpha, I just compiled you our own very special version of Tunage.framework. This version times out after 5 minutes rather than 1 minute.
All you need to do is unzip this file (you'll have a folder called Tunage.framework), and drag that into the TuneConnect application bundle: right-click on TuneConnect, choose Show Package Contents.... Go into the "Contents" folder, then the "Frameworks" folder. Drag the new Tunage.framework there.
Should help. Good luck, let me know if it doesn't work. :)
Attachments:
devanimal
2 months ago
Hot Damn!
It works perfectly! Playlists loading, tracks loading, playing, skipping tracks!
Woo Hooooooo!
Thanks so much!
Let me know if you need a beta tester with a large library for future releases.
Matt Patenaude
2 months ago
Indeed I will, a user with a large library will be great to have around. :) Glad it works for you, albeit a bit slowly.