INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Connection issues after hibernation/sleep  (Read 15376 times)

daek

  • Recent member
  • *
  • Posts: 28
Connection issues after hibernation/sleep
« on: October 03, 2013, 05:18:19 am »

Hi folks,

I noticed the following problem with MC18 and also with MC19.
After waking up my HTPC running on windows 8 from hibernation or sleep mode I cannot connect neither with Gizmo nor with a MC19 instance from another PC.

I found out that I could work around this issue:
1) when I restart the MC19 on my HTPC
2) or if I just wait for some time (differing, approximately 10 to 20 minutes).

My use case:
Using MC19 on a HTPC in TheaterMode, tagging from another PC with MC19 and controlling with an android tablet with Gizmo.

Did somebody else noticed that issue?
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Connection issues after hibernation/sleep
« Reply #1 on: October 08, 2013, 07:34:03 am »

sorry I don't have this problem. But question ... can you wake up the PC and access explorer and see a mapped drive ? or better yet with Remote Desktop?

You might want to try mapping (unc) if you haven't done so -- but I'm just fishing  :D
Logged

Micromecca

  • Galactic Citizen
  • ****
  • Posts: 283
Re: Connection issues after hibernation/sleep
« Reply #2 on: October 08, 2013, 07:52:53 am »

Deffinately see if you can access any network paths in windows when waking after sleep as suggested by Arindelle, if you can't it could suggest a driver or configuration issue, what network card are you using (or motherboard if integrated) ?
Logged

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #3 on: October 08, 2013, 11:33:23 am »

I'm sorry, but I guess my post was a bit incomprehensible.

How I use MC:
Running MC19 on a HTPC connected to a TV and a DAC. I controll MC typically with a Harmony Remote Control within the theater view and sometimes with my tablet with Gizmo when my TV is off.
All my data is stored on local SSD on my HTPC! There are no external drives or any NAS.
When I want to maintain some metadata e.g. tagging some music files, I use a normal Desktop-PC that runs another local instance of MC. From here, I use the functionality "Load Library" to connect my desktop pc with the library from the HTPC.

So there are 2 situations where I do a remote connection:
1) With a tablet using Gizmo, to control my HTPC
2) With a desktop pc, running a local instance of MC, that connects to the library of my HTPC

The problematic case:
Typically my HTPC is in hibernation mode when not used. I wake it up, either with a WOL tool or with my harmony remote control.
After awaking the HTPC, MC is running without any problems. I can play music and control it with my harmony remote.
Now, if I want to do a remote connection as described in situation 1) and 2) I get a connection error.

As I described in my first post, the only workaround I found, is to restart MC on my HTPC or just wait for some time.

Hope the problem is now a bit more clear. Thanks!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42386
  • Shoes gone again!
Re: Connection issues after hibernation/sleep
« Reply #4 on: October 08, 2013, 04:48:10 pm »

Both MC and Gizmo wake up the server on connection from a client (assuming you use an Access Key).

I use this all the time at home, and it works for me.  My only issue is that sometimes it takes the server a few more seconds to respond after waking up than the timeout.  This means I might have to try to connect twice.

If this isn't working, I'm not sure what might be happening.  You could watch Media Network view to see the activity.  You could also visit the HTTP server running on port 52199 and see if it's reachable on the server, on the client, etc.  This takes a lot of the MC client stuff out of the loop for testing.
Logged
Matt Ashland, JRiver Media Center

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #5 on: October 09, 2013, 03:14:39 pm »

Yes, I am using an access key. But trying to connect several times does not help anyway. But I can visit the HTTP server without problems.

By the way I found out, that if I use <MY LOCAL IP : 52199>, instead of the access key, it works without any problems.

I am also wondering why it shows "Attempting connection to <MY INTERNET IP>" and not my local one, when using an access key?!

Might this be the problem?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42386
  • Shoes gone again!
Re: Connection issues after hibernation/sleep
« Reply #6 on: October 09, 2013, 03:17:56 pm »

Yes, I am using an access key. But trying to connect several times does not help anyway.

By the way I found out, that if I use <MY LOCAL IP : 52199>, instead of the access key, it works without any problems.

I am also wondering why it shows "Attempting connection to <MY INTERNET IP>" and not my local one, when using an access key?!

Might this be the problem?

An Access Key will try your local addresses first (LAN), but if they're unreachable it will also try to come in through the outside (WAN).  Imagine the case of Gizmo on a cell phone -- it should work when you're in the house on LAN, but also when you're on the road with WAN.

If you put your Access Key in here and pick 'Inside network':
http://jriver.com/webgizmo.html

Does it connect to <MY LOCAL IP : 52199> like you'd expect?
Logged
Matt Ashland, JRiver Media Center

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #7 on: October 09, 2013, 03:20:44 pm »

Unfortunately not. It tries connecting to my public IP address?
Logged

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #8 on: October 09, 2013, 03:39:36 pm »

I have just restarted MC on my HTPC. And now the URL http://jriver.com/webgizmo.html (with inside network) is connecting to my local ip adress.

Is feels like MC publishes my local ip adress together with the acess key when it is started and the key is lost after some time...
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42386
  • Shoes gone again!
Re: Connection issues after hibernation/sleep
« Reply #9 on: October 09, 2013, 03:42:09 pm »

Is feels like MC publishes my local ip adress together with the acess key when it is started and the key is lost after some time...

It does, and it also updates our server occasionally so that we work with dynamic IP addresses.

Maybe it sends a bad update right after the machine wakes up?  You could run Fiddler (fiddlertool.com) to watch all the connections MC makes.  Access keys are registered with URLs starting with http://wr.jriver.com/libraryserver/.

Please let us know if you learn anything.
Logged
Matt Ashland, JRiver Media Center

Micromecca

  • Galactic Citizen
  • ****
  • Posts: 283
Re: Connection issues after hibernation/sleep
« Reply #10 on: October 09, 2013, 03:45:03 pm »

The question still remains as to whether the Machine has an active network connection after it has woken from sleep, this is what I (and I think Arindelle) were trying to establish, your media center will still work normally regardless of this via the remote as you said yourself your media is stored locally.
Logged

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #11 on: October 09, 2013, 03:52:15 pm »

I guess my HTPC has an active and correct network connection after waking up.
Because i tried connecting with my browser to <local ip>:52199 and i could do a successfull login.
Also I can view inside to my HTPCs network shares.
Logged

Micromecca

  • Galactic Citizen
  • ****
  • Posts: 283
Re: Connection issues after hibernation/sleep
« Reply #12 on: October 09, 2013, 03:59:53 pm »

That answers that then ;D Is the machines IP assigned by DHCP?
Logged

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #13 on: October 09, 2013, 04:02:58 pm »

Yes and no  :)
I use the dhcp server from my router. But I set up that machine with an fixed ip adress in my router.
Logged

Micromecca

  • Galactic Citizen
  • ****
  • Posts: 283
Re: Connection issues after hibernation/sleep
« Reply #14 on: October 09, 2013, 04:17:49 pm »

Try setting the IP manually in windows, also do you have any other network adapters in the machine? even Bluetooth or a tuner card?
I ask this as I have dealt with a very similar problem recently, albeit with DVBLink and not JRiver but it could be the same issue and Matt mentioning the bad IP being sent jogged my memory.
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Connection issues after hibernation/sleep
« Reply #15 on: October 09, 2013, 04:31:57 pm »

The question still remains as to whether the Machine has an active network connection after it has woken from sleep, this is what I (and I think Arindelle) were trying to establish,
exactly  ;)

Quote from: daek
I guess my HTPC has an active and correct network connection after waking up.
Because i tried connecting with my browser to <local ip>:52199 and i could do a successfull login.
Also I can view inside to my HTPCs network shares.

ok -- assuming you woke up your HTPC through windows explorer (not through jriver) and you can see mapped network drive(s) (UNC like z:/Music -- with a drive letter in front not "homegroup-type" network shares with "\\" in the file name path which you can check in MC ...

 ... and you say that your router settings through DHCP set up your fixed addresses for the PC and the HTPC . This is good although I don't believe you need to assign them again in windows (I don't, at least).

I had problems with this in the past where my son or his friends would "steal" the IP adresses through wifi connections when my client or the server PC was shut down or asleep. With unc mapped drives and fixed IPs issued from the router DHCP server I have never since had an intermittent WOL problem.

So check again  ... otherwise I'm running out of ideas. :-[  Maybe Micromecca is on to something with multiple network adapters, but thats getting too complicated for me  :)
Logged

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #16 on: October 09, 2013, 04:59:03 pm »

@Micromecca and @Arindelle
I am sure that my HTPC has got the correct ip adress assigned after waking up, because I can use its network shares that are mapped to the fixed ip address.
And there is only one lan adapter.

@Matt
After the restart of MC I cannot reproduce the problem immediatly. But the problem occurs every next day.
So tomorrow (when the connection problem exists) I will use a network sniffer to check the outgoing traffic of MC.

Does sb. knows how long is the (access key / local ip list) registration cached on the jriver.com server?
I am more or less sure it must be less than one day.
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Connection issues after hibernation/sleep
« Reply #17 on: October 09, 2013, 05:09:22 pm »

I will use a network sniffer to check the outgoing traffic of MC.

just in case you haven't stumbled across this go to Services & Plugins=> Media Network from the HTPC. Maybe that would give you some fast info.

Getting late in Paris time to hit the hay. Good luck on this
Logged

daek

  • Recent member
  • *
  • Posts: 28
Re: Connection issues after hibernation/sleep
« Reply #18 on: October 11, 2013, 09:11:14 am »

It does, and it also updates our server occasionally so that we work with dynamic IP addresses.

Maybe it sends a bad update right after the machine wakes up?  You could run Fiddler (fiddlertool.com) to watch all the connections MC makes.  Access keys are registered with URLs starting with http://wr.jriver.com/libraryserver/.

Please let us know if you learn anything.

I think I found the problem. It seems like MC sends a bad update after awaking.
I used wireshark to track the outgoing traffic of MC.

In principal I detected a good update, when I do a restart of MC. It looks like:
GET /libraryserver/update/<MY ACCESS KEY>?port=52199&localiplist=<MY LOCAL IP>&macaddresslist=<MY MAC>&ping=0 HTTP/1.1

Sometimes (not every time) after awaking windows, MC sends a bad update. It looks like:
GET /libraryserver/update/<MY ACCESS KEY>?port=52199&localiplist=&macaddresslist=<MY MAC>&ping=0 HTTP/1.1

As you can see the outgoing message body does not contains anything in localiplist. Any idea about this?
Logged
Pages: [1]   Go Up