An archive of community.esquilo.io as of Saturday January 26, 2019.

403 Forbidden error accessing via cloud

steveb48

It's sure quiet here. Where did everyone go?

I'm having a fairly random problem accessing my board via the cloud. It does work at times, both IDE and webpages, but other times I get an error. Resetting the board is the only way out that I've found. This has occurred both before and after I've updated to the new beta release.

This may be related to a run time error that I'm trying to track down in my code.

Any thoughts?

Thanks,
Steve

patrick

Thanks for mentioning this, Steve.

I was able to reproduce the problem with a board I had running for a long time, but I'm unsure of the cause. I'll try to get to the bottom of it. If it is fairly easy for you to reproduce, providing some more details would help (e.g. happens after x uptime, after y reloads, randomly, etc).

steveb48

I ran my board all day yesterday and could access it via the cloud and locally although I wasn't doing that at the same time. Today I get the 403 error from the cloud and had my wife verify that local access is still working. I've tried logging out and logging back in with no success. The board has been running for over 35 hours.

I should point out I'm not accessing the IDE but an HTML file on the SD card. I haven't tried getting to the IDE today.

steveb48

Although the board has been up for over 2 days with local access working fine, cloud access quit as I mentioned above. I just reset the board and I've got cloud access back.

Hope that's helpful.
thanks,
Steve

dan

Could this be an expiring session cookie?

steveb48

Hi Dan,

Web programming is new to me. Wouldn't the cookie be unique to one browser trying to access the board? When I'm in this state I can't access it from any non-local machine using the cloud URL.

thanks,
Steve

patrick

@dan It could be and I thought that at first, but when I reproduced it I wasn't asked to re-authenticate so the session is intact. From my limited insight on it, I suspect either the tunnel from the board to the cloud or the proxy routing to it is having trouble after a time.

@steveb48 Can you please verify that you are not getting asked to re-authenticate by the Nest when this happens?

steveb48

Correct. I do not get a re-auth before I get the 403 error. I type in the URL, I get a 30 second or so delay and then the 403. I've tried logging out and back in but no joy.

If I'm on a new machine, I do get the login request but once I'm in the can't connect state, I can't connect on any machine.

With a sample of 1, resetting the board fixed it.

thanks
Steve

steveb48

Dan may be on to something. I've been adding code to my pool controller each night requiring me to reset the board. I've had no trouble remote accessing the board during this time. Last night I didn't work on my code (no resets) and when I tried to access it about 21:45, I got the 403 error. That's about 24 hours from the last reset. Opening a new browser and logging in doesn't help. I'm using Safari on an iPhone if that's important.

I reset the board at 23:00 last night and I won't have time to work on the code this evening. I'll check access around 23:00 and see if I can reproduce it. It's up right now.

Thanks,
Steve

steveb48

Well maybe not. 24hrs+ and still going.

Steve

steveb48

Still loosing access occasionally. Once in this state a reset is required to get it back working. Local access isn't affected.

Steve

robertjensen

I was working fine with the nest until today. Now I cannot. Internet is working fine. Connection to the Esquilo via the LAN address works fine. The Esquilo responds to the system("time") command with the proper date and time, so it seems to be making an external NTP connection.

When I execute the system("log") command, I get the following. It looks like the log is truncated. The final line is incomplete and the last entry is 17 days old.

system("log")
2015-10-14T22:48:10Z INFO Esquilo Operating System (EOS)
2015-10-14T22:48:10Z INFO for Esquilo Air
2015-10-14T22:48:10Z INFO Version 0.3.1
2015-10-14T22:48:10Z INFO Copyright (c) 2014-2015 Esquilo Corp.
2015-10-14T22:48:10Z INFO Starting USB CDC
2015-10-14T22:48:10Z INFO Initializing WICED
2015-10-14T22:48:10Z INFO Starting Wiced
2015-10-14T22:48:11Z INFO WLAN MAC Address: 00:0B:6C:42:1C:48
2015-10-14T22:48:11Z INFO WLAN Firmware: wl0: Nov  7 2014 16:03:45 version 5.90.230.12 FWID 01-0
2015-10-14T22:48:1

What can I do to get back to cloud access?

I just reinstalled EOS 0.3.1, just in case. No improvement. I pulled the micro SD card. No improvement.

robertjensen

Also, I am now sometimes seeing the thermometer bar at the lower right of the IDE go yellow and red. I don't recall seeing this happen previously. Communication is periodically lost and a nut needs to be rerun to continue working.

patrick

@robertjensen I saw some errors in the server logs for the ESTP tunnel and restarted it. Please let me know if your issue has gone away.

robertjensen

Connection through the nest is working now. Thanks.

Should system("log") be producing a result that is different from what I posted?

robertjensen

And now it's not working again.

patrick

Sorry for your connectivity troubles. I have reset the daemon again. I'm looking through the server log and trying to debug it.

I've reproduced your system("log") issue. It looks like a problem with the pipe back to the IDE console. If I do a log over the serial console I see everything. If I do it in the IDE console it is truncated as yours. Thank you for posting about it. I will write a bug and look into it.

Scott_Shumate

If you are using EOS 0.3.1, then the log truncation is by design. Before EOS 0.3.1, the Squirrel VM was using up memory and blocking the Squirrel thread when the pipe was full. We redesigned it to truncate when the pipe buffer is full. With this feature, we added the ability to configure the output and input buffers in the IDE so you can decide how much memory to dedicate to the stdin/stdout function.

steveb48

Hi Guys,

I'm stuck in that 401 Forbidden state again. I can access the board running my nut at home just fine but remotely I get 401. In the past, resetting the board solved the problem. Logging out / in of nest doesn't help. I'll hold off doing that in case there's other info you could get while it's in this state.

thanks,
Steve

patrick

Hi Steve,

I didn't see any problems at the server, but restarted the tunnel daemon just in case. Would you please check it now and let me know if 1) it works and 2) if it required an Esquilo reset?

Thanks.

steveb48

Hi Patrick,

No more 401 error. My page loads but I'm not getting any status updates. It's possible that the nut has stopped running but I'll have to check that at home. If I bring up the IDE remotely I believe that will kill the nut.

thanks
Steve

steveb48

The nut stopped. No messages that I can see. pool.nut is still open in the IDE but not running. I hit run and it's back running again.

Steve

steveb48

Patrick,
I'm back in Forbidden territory again. Do you want to try anything before I hit reset?

thanks,
Steve

patrick

Thanks Steve. I restarted the server to see if you were paying attention wink.

Actually, I did restart it. But the good news is, the reason was to online the code changes to persist sessions across restarts. So hopefully this won't be happening again.

Sorry for the trouble and thanks for pinging me.

steveb48

No difference. I'm trying to access an HTML page on the board, not the IDE. I tried flushing and disabling the cache but that didn't help. I'm going to nest (the device is online), copying the remote URL in the details section and then appending on the path to my index.html.

Anything else to try?

thanks
Steve

patrick

You could try signing off of the Nest and back on.

Is it failing on the initial page GET?

steveb48

The power company just buggered up our test. Power is now out at home and the device shows offline.
Our power never goes out so of course when it does, we're debugging something. Sigh.

Steve

steveb48

Power is back on and of course the problem is gone.

Steve

patrick

That's a good work-around...

steveb48

Hi Patrick,

I'm stuck in the Forbidden zone again. This occurred yesterday so I restarted my board. This morning all was well but I'm stuck again. Usually it runs for a few days before a problem.

Is the server behaving?

thanks
Steve

steveb48

Hi Patrick,

I'm still having this problem. The only thing I can seem to do to get out of this state is reset my board. Nest says it's online but I can't access the IDE or my HTML. Logging out and back in does nothing.

I have not updated to the latest release.

Any ideas?
thanks
Steve

steveb48

Anyone else having this problem?

thanks,
Steve

gary.vandergaast

Yes, I am having the same problem. I have only been using Esquilo for about a month, and am generally not able to access my device with the Nest (i.e., remotely through the cloud). Even when I reset (power off - power on) the Esquilo, and the Nest page shows my Esquilo to be online, most of the time I cannot actually access it -- eventually get the 403 Forbidden message. All this, while the Esquilo is operating and working fine over my local network.

I started a new topic on my issue because I did not see any actual solution to the problem identified for this one.

Using a MacBook Pro with OSX 10.12.4 (Sierra).

pjackson

I restarted the tunnel service and it should work again now.

gary.vandergaast

OK, thanks for the quick response.
It did work when I went to access my device through the Nest just now.
I will monitor whether it continues to do so on a consistent basis.

steveb48

I'm back at forbidden again.

Steve

pjackson

I restarted server, so it should be back now. Sorry - I need to fix this.

steveb48

Yep that fixed it. Let me know if I can provide any info to help.

Steve

steveb48

Back to forbidden again.
Steve

pjackson

Sorry Steve. I missed this post some how. It should be back now.

steveb48

I made some changes to my code last night causing me to reset the board. This morning I noticed I had remote access back. I was just about to send you a message saying that resetting my board fixed it!

Thanks,
Steve

Jembryo

Continuing the discussion from 403 Forbidden error accessing via cloud:

I'm having trouble accessing via cloud but local works fine. When I currently visit the Nest where I can choose either local or cloud access, I see the pink "Offline" box. When I reset or cycle power to the Esquilo the box is blue and says "Online". Then when I select the "Cloud", I have a 30 second delay before being directed to the https://"id".esquilo.io page which displays the 403 Forbidden nginx/1.8.0 message page.

If I attempt to access through a browser on any device using the https://"id".esquilo.io/"folder", I receive the Device "id" is offline message page.

Is there a way that I can get this to work from my end whenever it happens or will it always require a call for help through the community forum?

pjackson

Unfortunately, it's an issue in the cloud. I've reset things, so it should be working now.

Jembryo

Thank you. It is working now. Is this community forum the proper way to signal the 403 Forbidden cloud access event? Thanks again.

pjackson

Here is fine, or you can just email me directly if you like: patrick@esquilo.io