INTERACT FORUM

Please login or register.

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

Author Topic: JRemote no longer working on iPhone from outside my network (Panel works fine!)  (Read 4405 times)

markl

  • Recent member
  • *
  • Posts: 36

I've been using JRemote on my iPhone for a number of years now - successfully streaming music while outside my network, accessing MC20 on my home-based Windows 10 PC.  Great on the drive to/from work.

But a couple of weeks ago JRemote stopped connecting when I'm outside my network - "could not connect (Network is unreachable)" message issued.  My assumption was that something had gone wrong with the port forwarding setup on my home router/PC but I checked and everything OK (static IP address OK etc.).  Tried deleting and re-adding server on JRemote (using access key) but no joy.

And here's the thing:  using JRiver Panel from my iPhone safari browser while outside my network works fine.  Connects OK with access key and allows me to stream using WebPlay, WebGizmo etc.

I don't understand why Panel can connect from outside network but JRemote cannot.  Anyone have any ideas?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?

Some silly security software on the phone?

Port already in use (on the phone) by something else?  The port is 52199.

It seems like the problem is on the phone side since Panel works.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?

Try connecting by IP address instead of the Access Key.
Logged

markl

  • Recent member
  • *
  • Posts: 36

Thanks for the feedback Jim.

Doesn’t seem to be a phone-specific problem because my wife also has JRemote installed on her iPhone and has the same problem - can no longer connect when outside the network, but using Panel on the iPhone safari browser works ok.

I tried your suggestion of connecting by IP address instead of access key. Deleted and re-added the server in JRemote using the IP address but same problem -!it can’t connect when outside the network. 

I also tried resetting the access key in MC20 and using the new key in JRemote - but doesn’t make any difference.

At one point I was thinking it might be a firewall issue on my home PC - but only have standard Microsoft Windows 10 security settings - and if it was a firewall problem I assume that would prevent Panel connecting to MC as well.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?

A router can also have a firewall.  You could try your ISP.
Logged

markl

  • Recent member
  • *
  • Posts: 36

Thanks Jim.  Will check with my ISP if some firewall issue with the router/modem could be causing the issue.

But something I don't understand:  if it's a firewall issue with the router/modem would that not be also be preventing Panel accessing MC from outside my network as well as JRemote - since they will both be using the same port-forwarding for 52199?  Or does JRemote require some extra level of security/authentication compared to Panel?   In both cases I enter the userid/password set up in MC Media Network authentication when connecting.  Panel works fine but JRemote always fails to connect with the following message:

Connecting to IP: nnn.nnn.nnn.nn
Port: 52199
Name of server is 'nnnnnnn'
Authenticating with credentials
Could not connect (Network is unreachable)

Logged

markl

  • Recent member
  • *
  • Posts: 36

Update:  checked with my ISP and they confirmed they are not blocking access to port 52199

Guy got me to access site https://canyouseeme.org/ and type in the port name.  Came back with message:

"Success: I can see your service on nnn.nnn.nnn.nn on port (52199)
Your ISP is not blocking port 52199"

So I can only assume this is some sort of JRemote issue and will have to use Panel from now on when outside my network.

Logged

markl

  • Recent member
  • *
  • Posts: 36

Update2:  I also have MC installed on a Microsoft Surface I use occasionally.  So to eliminate the possibility this was some specific issue with my main PC,  i checked if I can still connect to MC on the Surface via JRemote when outside my network.  Same problem.  Can't connect via JRemote - but Panel works fine (fyi the Surface version of MC has the port set to 52198 with corresponding port forwarding on the router).

So does seem like a JRemote issue.

 
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139

So many of us, myself included, run JRemote on iphone, connecting over mobile data that there has to be something on your network playing up. If it were all iPhones, there would be a lot of chatter on the forum.

As per Jim, I wondered if there was third party security apps running on your and your wife's phones, possibly getting in the way? Another thought, less likely as you say both phones exhibit the problem, was that you may have inadvertently turned off the setting that allows JRemote to use mobile data?

From reading your posts, you seem to be on top of your router settings but maybe worth going over them again?

One last thought...
It would appear from the messages that it is connecting, but failing authentication... Have you double checked the user/password data being sent by the iPhone's?

markl

  • Recent member
  • *
  • Posts: 36

Thanks for the feedback Marko.

I don't have any third party security apps on my iPhone.  Also checked the iPhone setup for JRemote on the phone under Settings->JRemote.  Mobile Data and Local Network are both turned on.  I also noticed that JRemote seems to be connecting with the with the server but then failing authentication - so checked the user/password and they are set correctly.  The same user/password works fine when using Panel on the iPhone safari browser.

Checked and double-checked the router settings/port forwarding and everything seems fine.  If there was a problem I assume it would also prevent the connecting to MC via Panel on the iPhone safari browser when outside my network.
Logged

Bertje

  • Recent member
  • *
  • Posts: 22

Sounds like a weird issue. I would check the incoming request from the iPhone with Wireshark on the Windows computer. The communication is unencrypted so you should be able to see what username/password is being sent by the iPhone in the Wireshark trace.

I suppose you already tried but I would uninstall - reinstall the jremote app on the iPhone to start with a clean slate.
Logged

markl

  • Recent member
  • *
  • Posts: 36

Thanks for the feedback Bertje.  I did uninstall/reinstall the JRemote app on the iPhone but that did not resolve the issue.

Per your advice I downloaded Wireshark onto my windows computer hosting MC and ran a trace while trying to connect via JRemote from outside the network (wifi on the phone turned off).   The Wireshark trace does indeed show that the computer is receiving an incoming request from JRemote (accessing port 52198 that I have set up for this version of MC).  I can see the access key reference in the TCP packet stream below - but can't see the username/password anywhere.

I'm not familiar with Wireshark (or how to analyse network communication packets) - so perhaps I'm looking in the wrong place.  Does anything below give you a clue why JRemote might be failing to connect?

GET /MCWS/v1/Alive HTTP/1.1
Host: 1.157.190.60:52198
Accept: */*
Accept-Language: en-gb
Connection: keep-alive
Accept-Encoding: gzip, deflate
User-Agent: JRemote/402 CFNetwork/1240.0.4 Darwin/20.5.0

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: text/xml ; charset="utf-8"
X-JRiver-Library-Server: 1
Server: Windows, UPnP/1.1 DLNADOC/1.50, JRiver/20
Content-Length: 382
Date: Mon, 21 Jun 2021 12:27:34 GMT
X-JRiver-Access-Key: bhcYXv
Cache-Control: no-cache
Keep-Alive: timeout=10

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Response Status="OK">
<Item Name="RuntimeGUID">{F9539FAA-2C6B-4587-9413-7E6F2956106A}</Item>
<Item Name="LibraryVersion">24</Item>
<Item Name="ProgramName">JRiver Media Center</Item>
<Item Name="ProgramVersion">20.0.132</Item>
<Item Name="FriendlyName">Music</Item>
<Item Name="AccessKey">bhcYXv</Item>
</Response>

 
Logged

Bertje

  • Recent member
  • *
  • Posts: 22

Hi markl,

I tested this myself only to find out that I have the same issue.

When I look at the trace when coming in over mobile I see that the tcp connection is terminated by jremote after the HTTP/1.1 200 OK in response to the GET /MCWS/v1/Alive

When I look at the trace when using wifi I see the same request and response as above but after that jremote continues with GET /MCWS/v1/Authenticate and after a few packets I can see my username and password.

I attached screenshots of the wireshark captures.

Maybe one of the devs can help?

Logged

markl

  • Recent member
  • *
  • Posts: 36

Thanks a lot for the investigation Bertje.  Glad I'm not the only one having the problem!

So looks like we are dealing with a general issue with JRemote on iPhones failing to authenticate/connect when outside the network.

I'm using the latest version of JRemote (3.36) and the latest version of IOS (14.6).  Is it possible the problem was introduced with the latest version of JRemote - or started occurring with the latest IOS upgrade?   In my case the issue occurs when trying to connect to MC running on a Windows 10 based desktop PC or a Surface.  Within my network (using WiFi) everything works fine.
Logged

TheShoe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 826

 curious - are you using a VPN either on the Media Center server or iphone?

Logged

Bertje

  • Recent member
  • *
  • Posts: 22

I'm not using a vpn at either side.

But, I'm onto something...

I was using the Access key method to connect but this mechanism doesn't seem to cope well with systems that have both an ipv4 and an ipv6 address.

jremote is using a mix of ipv4 and ipv6 requests, I noticed that by monitoring my firewall.

MC doesn't seem to listen to ipv6. I tried a telnet to tcp port 52199 to the ipv6 ip address of the Media Center PC but no response. (I disabled the Windows firewall to be sure).

After I changed the settings in jremote to not use an access key and change the Global Access Address to my numeric public ipv4 address things started to work for me.
Logged

markl

  • Recent member
  • *
  • Posts: 36

Hi Bertj - thanks for your continued investigation. When you say you changed the Global Access Address are you just referring to entering the public ipv4 address in IP address field when setting up the server in JRemote (instead of using the access key method)?  Or is Global Access Address some other bit of config required on the MC side?
Logged

Bertje

  • Recent member
  • *
  • Posts: 22

In the jremote server setup screen I cleared the entry with the Access key (it's empty now). In the address field below Access key I filled in my local ip address (10.0.0.16 in my case).

A bit further down under GLOBAL ACCESS there's another Address field. I entered my public ipv4 address there.
Logged

markl

  • Recent member
  • *
  • Posts: 36

In the JRemote server setup screen on my iPhone when I choose the option 'Connect with IP Address' I only see the option for entering one IP address plus the port number and username/password - see screen shot in attachment.  I don't see any GLOBAL ACCESS field.   Under the 'Connect with Access Key' option the only fields that can be entered are the access key and username/password.

Are we on the same version of JRemote (mine is 3.36) which I believe is the latest.



Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 946

Have you tried with the default port 52199?
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

Bertje

  • Recent member
  • *
  • Posts: 22

Yeah we are on the same jremote version, what I did was change the server setup after connecting with an access key.

I tested the 'connect with ip address' option and that works too for me by providing the public ip address. In your case that would be 1.157.x.x

When I use that method I can't connect from wifi anymore because my router doesn't do hairpin nat but in your case it might just work.
Logged

Bertje

  • Recent member
  • *
  • Posts: 22

I also noticed that once you connected successfully with the 'Connect with ip address' option you get the additional fields available when you edit the server (see screenshot). You can than move the public ip to the GLOBAL ACCESS section and enter your local address just below the empty Access key field.
Logged

markl

  • Recent member
  • *
  • Posts: 36

Thanks for the clarification Bertje, 

I did what you suggested.  Set up the server on my iPhone initially with the access key then went into the server screen and blanked out the access key and entered the local ipv4 address in the first address field (10.0.0.116 in my case) and then my public ipv4 address in the Global Access address field.  But same problem.  It connected OK via WiFi but failed to connect with WiFi off.  Same message as before - 'Authenticating with credentials' then 'Could not connect (Network is unreachable)'
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870

What are your authentication settings in MC for read-only?
Logged

markl

  • Recent member
  • *
  • Posts: 36

Hi Bob - thanks for the feedback.

I'm using MC20 and only have options under Tools->Options->Media Network->Authentication for turning on authentication and entering a userid and password.  I don't see any authentication options related to "read-only" or "full".   Is this setting located somewhere else in MC20?   

Or could the issue be that MC20 is not compatible with the latest version JRemote (3.36) because JRemote now requires some extra level of authentication when connecting outside the network?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870

Hi Bob - thanks for the feedback.

I'm using MC20 and only have options under Tools->Options->Media Network->Authentication for turning on authentication and entering a userid and password.  I don't see any authentication options related to "read-only" or "full".   Is this setting located somewhere else in MC20?   

Or could the issue be that MC20 is not compatible with the latest version JRemote (3.36) because JRemote now requires some extra level of authentication when connecting outside the network?
That's quite possible.
At some point we added the ability to send a FQDN for IPV6 to the key server and that fixed some issues with wan and IPV6/IPV4 routing.
You might try a MC28 trial to see if that fixes the issue.
Logged

markl

  • Recent member
  • *
  • Posts: 36

Hi Bob - I downloaded MC28 and tried the various read-only authentication options to see if that fixed the issue - i.e. "disabled", "everyone" and "username and password".   

But same problem.  JRemote works fine from inside my network but cannot connect from outside the network.

Get the following messages in JRemote when trying to connect:

Connecting to IP: NN.NNN.NN.NN
Port: 52199
Name of server is 'Music'
Authenticating with credentials...
Could not connect (Network is unreachable)


Using Panel from the same IPhone's Safari browser works fine from outside the network, regardless of the read-only authentication settings.

So I'm at a loss.  Was wondering if it was some ISP issue (I'm on broadband with Telstra in Australia) but I have confirmed they are not blocking the port and if it was some other sort of ISP issue I assume it would impact Panel as well as JRemote.   Everything was working fine until a few weeks ago.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?

There is a test function from the Media Network settings.

Also a wiki topic called Network Access.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870

Your external network is on 1.x.x.x ??
Logged

markl

  • Recent member
  • *
  • Posts: 36

Re-upping this Topic because the root cause has been determined in the recent topic below (title 'JRemote2 from outside the LAN').

https://yabb.jriver.com/interact/index.php/topic,133813.0.html

As explained by Bob in the thread,  JRemote (and I assume JRemote2) does not work from outside the LAN on some cell networks that are using IPv6 (in my case Telstra Australia).  The work-around solution is to use a VPN on the phone (because most VPNs use an IPv4 public address).  I installed a VPN on my iPhone (Windscribe) and JRemote is able to connect when the VPN is on. When the VPN is switched off it fails to connect.

Hopefully JRemote can be modified to fix the problem because I don't wan't to have to use a VPN on my phone if I can avoid it.

Per Bob:  "It MIGHT be just in the network stack JRemote uses. There are 3 choices that you get when linking and we are using the middle choice, not the newest, for backwards compatibility that is possibly not necessary any more.
I might try making a beta to test this out."
Logged

Dmytro

  • Junior Woodchuck
  • **
  • Posts: 53

Re-upping this Topic because the root cause has been determined in the recent topic below (title 'JRemote2 from outside the LAN').

https://yabb.jriver.com/interact/index.php/topic,133813.0.html

As explained by Bob in the thread,  JRemote (and I assume JRemote2) does not work from outside the LAN on some cell networks that are using IPv6 (in my case Telstra Australia).  The work-around solution is to use a VPN on the phone (because most VPNs use an IPv4 public address).  I installed a VPN on my iPhone (Windscribe) and JRemote is able to connect when the VPN is on. When the VPN is switched off it fails to connect.

Hopefully JRemote can be modified to fix the problem because I don't wan't to have to use a VPN on my phone if I can avoid it.

Per Bob:  "It MIGHT be just in the network stack JRemote uses. There are 3 choices that you get when linking and we are using the middle choice, not the newest, for backwards compatibility that is possibly not necessary any more.
I might try making a beta to test this out."

I am with Telstra (in Sydney), and JRemote works just fine. I remember having such issues when I was in Jindabyne, so perhaps depends on how local towers are configured (just a guess..). I am using a free DDNS offered by my router (TP-link) in the global address field and leave "Access key" field blank. DDNS is linked to the public ipv4 address of my router. Authentication is enabled with a password.
Logged

markl

  • Recent member
  • *
  • Posts: 36

I am with Telstra (in Sydney), and JRemote works just fine. I remember having such issues when I was in Jindabyne, so perhaps depends on how local towers are configured (just a guess..). I am using a free DDNS offered by my router (TP-link) in the global address field and leave "Access key" field blank. DDNS is linked to the public ipv4 address of my router. Authentication is enabled with a password.

Hi Dmytro. Thanks a lot for this information. I followed your advice and it worked!  I'm on a Telstra NBN in Sydney using a Smart Modem GEN2. I don't get a free DynDNS service through Telstra so I signed up for a free DDNS service with NO-IP.COM.  I then did the following:

- Went into the Advanced Options in the Modem config and created a DynDNS IPV4 entry specifying the domain name allocated to me by NO-IP.COM (along with the username and password for the new domain).
- Removed the port-forwarding I had previously set up for jremote (since it wasn't working anyway)
- Created a new server entry in JRemote.  But instead of using the access key I entered the name of the DynDNS domain in the Address field.

Bingo!  I am now able to successfully use JRemote from outside my network.

This seems a much better work-around than using a VPN on the phone because I found the free VPNs I tried very slow.  The only draw back is that the free NO-IP DDNS service has to be renewed every 30 days.  I'm trying to find if there is another free DDNS service available that doesn't require monthly renewal.

So the conclusion is as follows: 

Standard port forwarding for JRemote does not work on some Cell networks that have been upgraded to IPV6.  The 2 possible work-arounds to resolve this issue and enable JRemote to work from outside the home network are:

- Sign up for a Dyn DNS service and configure your modem/router to use the Dyn DNS domain. Then create a server entry in JRemote that uses this domain name in the Address field instead of using an Access Key.
  OR
- Install a VPN on your phone and always have the VPN enabled when accessing JRemote from outside the network


Thanks again for your help Dmytro.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870

That's an interesting find markl.

The access key server will serve the IPv4 address and the DNS name of the WAN connection (gotten from a reverse lookup in MC).
If there is no reverse mapping that field will be empty and only the IPv4 address will be used.

When you register your router with a service like no-ip it will create a name that will resolve to what I assume is the IPv6 address of the home modem/router (it may do IPv4 too but that's probably not being used in this case).
That "fixes" the issue because then the resolver in JRemote/Mo4 Media, etc can use use the DNS name to connect.

I'm unclear as to what the browser on the device is doing differently to get able to get to Panel when JRemote doesn't get there.
Within a browser, how are you guys connecting? Via the IPv4 address??

Logged

markl

  • Recent member
  • *
  • Posts: 36

That's an interesting find markl.

The access key server will serve the IPv4 address and the DNS name of the WAN connection (gotten from a reverse lookup in MC).
If there is no reverse mapping that field will be empty and only the IPv4 address will be used.

When you register your router with a service like no-ip it will create a name that will resolve to what I assume is the IPv6 address of the home modem/router (it may do IPv4 too but that's probably not being used in this case).
That "fixes" the issue because then the resolver in JRemote/Mo4 Media, etc can use use the DNS name to connect.

I'm unclear as to what the browser on the device is doing differently to get able to get to Panel when JRemote doesn't get there.
Within a browser, how are you guys connecting? Via the IPv4 address??

When using Panel from my IPhone Safari browser I just enter the MC access key and it connects OK from outside my network.  This is even after removing the port-fowarding rule from my modem/router and just using the new no-ip DynDNS domain.  Panel connects OK and then prompts me for my authentication name and password credentials.   JRemote doesn't work when I set up a server connection with just the access key.  So I have to use a server connection with the DNS domain name in the address field.
Logged
Pages: [1]   Go Up