Suddenly can only get relay connection (server problem?)

Edit: Found the problem. The drive isn’t sending the external ip address in it’s requests to wd2go.com as such the requests are invalid. No automated fix, but there is a manual workaround. Basically it’s a bug in an executable. See last post for details.

I set up my My Book Live about 5 weeks ago.  At the time I set up port forwarding on my router and set up manual ports on the drive and got a “connected” status telling me port forwarding was working.  That worked fine until last night when I ended up disconnectnig the network cable from the My Book Live.  Since then I can’t get the WD2Go service into direct connection (port forwarding) mode, it always goes to relay mode.  I didn’t change anything on my router.  The only thing I did on the drive itself is enable SSH and change the root password.

I set up logging on my router and when I enable (or disable) remote access, the drive makes 4 or 5 connections to https://wd2go.com (198.107.148.110) and then simply connects to the relay server.  There are no incoming connection attempts at all.  I tested logging by connecting to the remote port I set up on my router and that shows up in my log (and I get a 403 Forbidden page in my browser), so logging is working.

The problem appears to be that the WD2Go service never even bothers to test to see if the ports I added are being forwarded.  It just switched to relay mode.

A few other things I’ve seen:

  1. Sometimes the status temporarily changes to “failed”, even though the relay connection is still up.

  2. Sometimes the status temporarily changes to “connection” (not relay), even though I can see the relay connection being used.  Sometimes it looks like it really does switch to port forwarding, but then simply opens another relay connection.  Whatever it does, it switches back to relay pretty quickly (within a minute).

I don’t want to use relay mode since it’s slower and it’s “leaking bytes”.  I tracked the relay connection while it was not in use (idle) for 10 minutes and there was a total of 114.6 KB going back and forth since the drive periodically contacts wd2go.com and sometimes switches relay ip addresses for some reason.  That’s 687.6 KB per hour, 16.12 MB per day and about 483 MB per month when not even using the connection.   That’s rediculous that the My Book Live is now using nearly 500 MB of data a month when idle when it used to use nothing.  Especially since I have a capped service Internet service .

Direct mode worked fine for 50 days, how can I get the servers to switch back to direct mode?   I’ve sent an email to WD, but don’t expect a useful response).

Try disabling remote access and enabling it again.

Thanks for the response, but I’ve tried that.   I’ve also tried rebooting the drive and turning the drive off and leaving it off for about 10 minutes and plugging it in.

The problem appears to be on the server side.  The server does not appear to be checking the forwarded ports according to my router logs.  Actually it’s not checking any ports since my logs show no incoming hits (blocked or accepted) at the time when the drive is “connecting”.  I only see outgoing connections to port 443 on wd2go.com and a UDP connect to the relay server (ip varies).

The only thing I’ve changed on the drive since setting up remote access initialily is enabling SSH and changing the root password.  That wouldn’t cause this would it?

I just tried something to test things.  In the past when I went to wd2go.com it would take me to mybooklive.device#####.wd2go.com : Port where ###### was my device id and port was the port number I chose to forward to 443.   After this stopped working the wd2go site stopped working and I had to relink it with my drive. .

I just went to wd2go and clicked on my drive and simply replaced mybooklive.device#####.wd2go.com with my home ip address : Port.  I got a login page and was able to log into my drive.  

So my drive is accessible via the Internet on the port I set up, but for whatever reason WD2Go is refusing to set up the dynamic DNS for it since it thinks the ports aren’t accessible when they are.  Like I mentioned, there are no connection attempts on those ports so WD2Go isn’t even testing if they are active or if it is, it’s not testing my ip address.

Argh, I thought I had it working since I had turned off remote access while doing all the tests above and when I turned it back on, it showed a direct connection and there was no outbound connection to the relay, but about 2 minutes later the drive made a bunch of connections to wd2go.com and switched back to relay mode. 

I have no idea what’s going on here only that my drive is accessible from the Internet despite what the WD2Go service thinks.

I think the DynDNS server might be screwed up.  My Book Live is showing that it’s directly connected again and if I go to wd2go.com and log in and click my drive it tries to connect to https://mybooklive.device#####.wd2go.com:PORT/  where PORT is my 443 port forward port, but the it doesn’t connect.  The reason being that mybooklive.device#####.wd2go.com is still pointing to the relay ip address, not my home address.  

It then switched back to relay mode and then the mybooklive.device#####.wd2go.com changed to the new relay ip address.

I’ve also noticed that when I disable sharing the mybooklive.device#####.wd2go.com address takes a long time to switch to unresolved even though the TTL on the nameserver is 10 seconds.  For example, I disabled remote access over a minute ago, but mybooklive.device#####.wd2go.com is still resolving.

So when it’s set up to do a direct connection, it’s not updating the mybooklive.device#####.wd2go.com to my ip address.  That could be why it’s failing when trying to port check.  Though that doesn’t explain why it periodicaly switches to direct mode and then back to relay.

I’m convinced this is a server problem, which means I can’t fix it.

Just some more info, I noticed that status keeps changing from relay to portforwarding to relay periodically.  I was sshing into the drive at that time and dumped out the dynamincconfig.ini over the course of a few minutes.  It seems to switch to port forwarding mode for a few minutes and then switch back.  The entire time, my router reports the relay connection is still active (it’s UDP though so it’s hard to tell).  When it switches back to relay, it opens a new relay connection.

Basically it starts off with no external ip or external port, but it does have an external SSL port.   It gains the external port and switches to port forwarding (still no external ip address though).  It then somehow loses the exernal port and then switches back to relay mode.  It then stays like this a while and repeats the process.  It’s been doing this quite often today.

The entire time it shows “portforwarded” the ip address for mybooklive.device######.wd2go.com still shows the relay ip address.  There’s also a mybooklive-device######.wd2go.com which sometimes is the same ip address and sometimes not.  Some times it changes to “failed” instead of “relay” and the ip address associated with the dynamic dns goes away, but will change back to “relay” and get a relayed ip address.  It still won’t actually use my ip address.   I have no idea why since I can’t find anything in the log file about that.  I can’t even figure out how it’s possible to not know my external ip address since the drive is constantly contacting wd2go.com and that connection will have my ip address.

I have no idea what this means exactly but it doesn’t look right to me.   I think it’s caues the book to not go back to sleep as well.

Can anyone that has port forwarding working tell me if the “EXTERNAL_IP” field is supposed to be blank?

MyBookLive:/tmp# cat dynamicconfig.ini
SUBDOMAIN=“”
DEVICEID=“[censored]”
DEVICEAUTH=“[censored]”
EXTERNAL_IP=“”
EXTERNAL_PORT=“”
EXTERNAL_SSL_PORT=“443”
INTERNAL_IP=“192.168.1.9”
INTERNAL_PORT=“80”
DEVICE_SSL_PORT=“443”
REMOTEACCESS=“TRUE”
COMMUNICATION_STATUS=“relayed”
DEFAULT_PORTS_ONLY=“FALSE”
MANUAL_PORT_FORWARD=“TRUE”
MANUAL_EXTERNAL_ROUTER_IP=“”
MANUAL_EXTERNAL_HTTP_PORT=“80”
MANUAL_EXTERNAL_HTTPS_PORT=“443”
TOTAL_SETTINGS=“17”

MyBookLive:/tmp# cat dynamicconfig.ini
SUBDOMAIN=“”
DEVICEID=“[censored]”
DEVICEAUTH=“[censored]”
EXTERNAL_IP=“”
EXTERNAL_PORT=“80”
EXTERNAL_SSL_PORT=“443”
INTERNAL_IP=“192.168.1.9”
INTERNAL_PORT=“80”
DEVICE_SSL_PORT=“443”
REMOTEACCESS=“TRUE”
COMMUNICATION_STATUS=“portforwarded”
DEFAULT_PORTS_ONLY=“FALSE”
MANUAL_PORT_FORWARD=“TRUE”
MANUAL_EXTERNAL_ROUTER_IP=“”
MANUAL_EXTERNAL_HTTP_PORT=“80”
MANUAL_EXTERNAL_HTTPS_PORT=“443”
TOTAL_SETTINGS=“17”

MyBookLive:/tmp# cat dynamicconfig.ini
SUBDOMAIN=“”
DEVICEID=“[censored]”
DEVICEAUTH=“[censored]”
EXTERNAL_IP=“”
EXTERNAL_PORT=“”
EXTERNAL_SSL_PORT=“443”
INTERNAL_IP=“192.168.1.9”
INTERNAL_PORT=“80”
DEVICE_SSL_PORT=“443”
REMOTEACCESS=“TRUE”
COMMUNICATION_STATUS=“portforwarded”
DEFAULT_PORTS_ONLY=“FALSE”
MANUAL_PORT_FORWARD=“TRUE”
MANUAL_EXTERNAL_ROUTER_IP=“”
MANUAL_EXTERNAL_HTTP_PORT=“80”
MANUAL_EXTERNAL_HTTPS_PORT=“443”
TOTAL_SETTINGS=“17”

MyBookLive:/tmp# cat dynamicconfig.ini
SUBDOMAIN=“”
DEVICEID=“[censored]”
DEVICEAUTH=“[censored]”
EXTERNAL_IP=“”
EXTERNAL_PORT=“”
EXTERNAL_SSL_PORT=“443”
INTERNAL_IP=“192.168.1.9”
INTERNAL_PORT=“80”
DEVICE_SSL_PORT=“443”
REMOTEACCESS=“TRUE”
COMMUNICATION_STATUS=“relayed”
DEFAULT_PORTS_ONLY=“FALSE”
MANUAL_PORT_FORWARD=“TRUE”
MANUAL_EXTERNAL_ROUTER_IP=“”
MANUAL_EXTERNAL_HTTP_PORT=“80”
MANUAL_EXTERNAL_HTTPS_PORT=“443”
TOTAL_SETTINGS=“17”

edit: now it changed to failed:

MyBookLive:/tmp# cat dynamicconfig.ini
SUBDOMAIN=“”
DEVICEID=“[censored]”
DEVICEAUTH=“[censored]”
EXTERNAL_IP=“”
EXTERNAL_PORT=“”
EXTERNAL_SSL_PORT=“443”
INTERNAL_IP=“192.168.1.9”
INTERNAL_PORT=“80”
DEVICE_SSL_PORT=“443”
REMOTEACCESS=“TRUE”
COMMUNICATION_STATUS=“failed”
DEFAULT_PORTS_ONLY=“FALSE”
MANUAL_PORT_FORWARD=“TRUE”
MANUAL_EXTERNAL_ROUTER_IP=“”
MANUAL_EXTERNAL_HTTP_PORT=“80”
MANUAL_EXTERNAL_HTTPS_PORT=“443”
TOTAL_SETTINGS=“17”

I guess this will be my last post unless I can get some answers.  I found out that it’s possible to log the drive’s connection to wd2go.com (the /usr/orion/communicationmanager/communicationmanagerd has a logtofile parameter).  I noticed two things when I stopped the communication manager and re-ran it with logging enabled.

  1. When starting commnucationmanager reports two errors (don’t know if they are important or not, but they could explain issue #2):

getaddrinfo() error : Name or service not known
getaddrinfo() error : Name or service not known

  1. The command that communicationmanager is using to test to see if port forwarding works is missing the WAN ip address is the command:

https://www.wd2go.com/api/1.0/rest/device_communication/######?format=xml&external_ip=&external_port=PORT&protocol=HTTP&device_auth=#######   (first number is device id and second is the authorization, PORT is the 80 port).

If you notice the command doesn’t say what external_ip to actual talk to.  That’s very odd because the log file has the external ip address listed in it.  Anyway using the command above results in a 400 HTTP error with a description of " The request sent by the client was syntactically incorrect ()."

I wonder what happens if I actually put the correct external ip address in the command?  Let’s see:

<device_communication>Success<req_device_id>####</req_device_id><resp_device_id>#####</resp_device_id><external_ip>#######</external_ip><remote_external_ip>null</remote_external_ip></device_communication>

Well what do you know it worked!   So basically the problem is that the drive is not sending the external ip address along with the request to check if port forwarding is working.

That seems like a bug in the /usr/orion/communicationmanager/communicationmanager program or something that’s editing the configuration file (dynamicconfig.ini).

What I can’t figure out is how to get the drive to actually send my external ip address in the request.  Any idea on how to fix this?

Edit:

As a work around I pretty much stopped remote access, then started it and quickly stopped the communicationmanager program before it opened a relay connection.  I then manually ran through the steps that the program would do, putting in my external_ip address.  That worked and now I’ve got a “direct” connection and port forwarding works remotely.

The problem with this set up is that since the communicationmanager program isn’t running, any changes to my external ip won’t get picked up and obvioulsy if the drive reboots that won’t get picked up either.  Also there’s likely some kind of server time out which will kick in at some point and remove the dynamic address and  mapping.  So it’s really a poor substute at best.

I need to figure out what changed since when I originally set up port forwarding (in this version of the firmware) it worked.  Now it’s not sending the external_ip address which prevents direct connection from working if communicationmanager program is running.

Hi

I have the exact same issue, I think it started after upgrading the firmware April 26. 2012. The former version performed flawless, I have tried to see if I can revert to that version, but after what I’ve read it would be a bad thing to do, reverting that is.

Hope some one at WD will look in to it, as it is now the wd2go is kind of useless :confounded:

Regards M.Brondt

@Morac wrote:

“As a work around I pretty much stopped remote access, then started it and quickly stopped the communicationmanager program before it opened a relay connection.”

As a ssh novice, how do you perform this, I know how to start the ssh session, but don’t know how I put communicationmanager to a stop, can you help me?

Thanks

Brondt

“/usr/orion/communicationmanager/communicationmanagerd stop” will stop the service. Using a “start” parameter will start it. The timing here is tricky though since if communicationmanager switches to relay mode it starts another program which establishes an outbound connection. It’s probably easier to modify the communicationmanagerd script to simply not run communicationmanager.

That’s only half the battle since without communicationmanager running, the commands that it normally sends to set up the server to point to either your ip address or the relay server ip address won’t occur. This means that you’ll need to send those commands yourself, including when your ip address changes. Those can be done on a PC or (as I did it) on a router. In addition, communicationmanager sends the commands to update the status on the enable remote access page, so that will get stuck in whatever status it was when your stopped communicationmanager.

Basically communicationmanager does three things:

  1. Checks if your drive is reachable from the Internet. It does this every 2 minutes.
  2. If it is, it sets up the wd2go.com server to point to your external ip address. If not it starts the openvpn program to establish an outbound connecting and then sets up wd2go.com to point to the relay server.
  3. It updates the current status on the MY Book Live’s internal web site.

Currently I have not figured a way to automate these changes since that’s what communicationmanager is supposed to do (except it’s not working correctly). To really automate things, one would need to set up a script that does all of the things communicationmanager does, which I’m not sure is even possible really (detecting an external ip address change would be the hardest part).

I run the 3rd party firmware,TomatoUSB, on my router so I’ve set up things to currently set up port forwarding to point to my external IP address via scripting on the router. It isn’t currently detecting forwarding issues, so if forwarding stops working (which should never happen unless something on the router changes), I won’t get a relay connection. Also the drive’s status page won’t update.

Really I’ve spent too much time on this. It’s a bug in the drive’s firmware plain and simple since the drive should always be sending a valid command to the servers. If WD can’t get their drive talking correctly to their own servers they have major problems.

As expected, support hasn’t responded. I’d try calling since I get one free call, but my guess is the phone support people would have no idea what I was talking about and would simply have me go through the steps of setting up port forwarding again. In other words, I’m willing to bet that I now know more about how the wd2go remote access process works than the support people.

If I can figure out an automated method of getting things working (i.e a script), I’ll post more here. I’d recommend just buying a Pogoplug though. It works with any drive and “just works”, which is what I assumed the My Book Live would do, but I was wrong.

Edit: stupid web site strips out cariage returns when posting on an iPad.

Tomato, I use it as well, has some issues with open ports, etc., where it doesn’t open ports in the lower numbers.  Some security issue.  There is a way to tell it to open all ports.  If you go to linksysinfo.org and search the Tomato forum the information is there.

I am having a weird problem that involves my media server and WD Lives.  With your problem and mine I’m wondering if there is something amiss in Tomato.

Yes Tomato won’t allow ports 80 and 443 to be opened via UPnP, but you can still manually open the ports if you want. I’m using high number ports (manually) so that’s not the issue. Plus if you read all my posts, you’d know I’ve forced Wd2go to use port forwarding and I can access my drive from the Internet without any issues. It’s just the drive’s automated process for checking if port forwarding is set up correctly is broken so it always thinks port forwarding is not set up correctly.

For what it’s worth, when I originally got my drive (about 2 months ago) I was running TomatoUSB (toastman’s build) and the drive actually set up port forwarding correctly. I haven’t made any changes to either my router or drive since then, so I highly doubt Tomato is to blame. The drive simply isn’t sending my external ip address in the request, despite knowing what it is.

I believe we have traced down this issue causing some connections to change from port forward to relay. We will be issuing a small update soon to address this issue as well as a few other small issues that we have seen.

WDTony wrote:

I believe we have traced down this issue causing some connections to change from port forward to relay. We will be issuing a small update soon to address this issue as well as a few other small issues that we have seen.

Thank you for looking into this. 

I assume by your post, you’ve found the reason the drive is sending an invalid request (i.e. one without an external ip address)?

Also by “small update” do you mean a “firmware” (technically it’s software) update?

We found an issue - it sounds like the same one you reported.

Yes - small update means a firmware update. I wish it was easier to deploy… but yes it will be a firmware update.

WDTony wrote:

We found an issue - it sounds like the same one you reported.

 

Yes - small update means a firmware update. I wish it was easier to deploy… but yes it will be a firmware update.

Cool.   A firmware update is a bit of a pain, but my current work around method is also somewhat annoying.

I tried the UPNP option on my media server and while it can find other upnp devices attached to or through my Tomato/E3000 router my media server can not find either of my WD Live’s via UPNP.   The NAS’s are found via samba and NFS just fine. 

morac…

Did you change the port from 80 to something else in Tomato for the router?

jsmiddleton4 wrote:

morac…

 

Did you change the port from 80 to something else in Tomato for the router?

I don’t use port 80 and 443.  I use high range ports which I redirect to ports 80 and 443 on the drive.

UPnP will not work with this drive on Tomato unless you make some modifications because Tomato prevents devices from opening ports under 1024 via UPnP.  If you want to use UPnP on this drive with tomato, you’ll need to make the changes mentioned in the following links:

http://tomatousb.org/forum/t-286557/

http://www.linksysinfo.org/index.php?threads/upnp-on-but-whs-still-complains-about-port-forwarding.33553/#post-183736

Note: UPNP is used to open ports on the WAN side of your router.  If you are trying to access your My Drive from your LAN, then UPNP (and port forwarding in general) does not apply (unless you are using your router’s or WAN IP address instead of the mybooklive hostname or ip address).