Local Gateway is not loading after taking latest code (0.4.0)

Hi Team,

Today i have taken latest code from gateway master branch (0.4.0). I think compilation was successful but when i browse http://localhost:8080 from chrome/Firefox, It is automatically redirecting to https://localhost and i am not able to see gateway home page.

Can someone help me in resolving this issue.

Note : i was able to start locally with 0.3.0 version of gateway code.

Below are the build console logs:

Opening database: /home/nithyanantham/.mozilla-iot/config/db.sqlite3
2018-04-17 23:11:51.677 Listening on port 4443
2018-04-17 23:11:51.684 Redirector listening on port 8080
2018-04-17 23:11:52.578 Loading add-on: ESP-adapter
2018-04-17 23:11:52.768 Loading add-on: virtual-things-adapter
2018-04-17 23:11:52.775 ESP: Opening database: /home/nithyanantham/.mozilla-iot/config/db.sqlite3
2018-04-17 23:11:52.913 virtual-things: Opening database: /home/nithyanantham/.mozilla-iot/config/db.sqlite3
2018-04-17 23:11:53.744 ESP: Loading add-on for ESP-adapter from /home/nithyanantham/.mozilla-iot/addons/ESP-adapter
2018-04-17 23:11:53.939 virtual-things: Loading add-on for virtual-things-adapterfrom /home/nithyanantham/.mozilla-iot/addons/virtual-things-adapter
2018-04-17 23:12:01.682 Checking for add-on updates...

Try https://localhost:4443

The gateway normally listens on 4443 and the only time 8080 is normally used is while the tunnel is being setup. We setup a redirector from :8080 to :443 (https)

The image that we distribute has iptables redirectors that redirect :443 to :4443 and :80 to :8080

https://localhost would normally try to connect https://localhost:443 and get redirected to :4443
http://localhost would normally try to connect to http://localhost:80 and get redirected to :8080

If you’re not using the iptables redirection then connecting directly to https://localhost:4443 should work.

1 Like

Thanks Dave. I am able to access gateway over 4443

this post mention about iptables redirections

master seems to work on :80