chirpstack/chirpstack-ansible-playbook

Cannot connect to localhost

Opened this issue · 9 comments

The Vagrant installation went well and I see that everything is installed, provisioned and started.
However, I cannot connect to https://localhost:8080/.

The Virtualbox VM is in NAT mode and shows the port forwarding.
Port 8080 on the host is forwarded to port 443 on the guest. Is that correct?

Any ideas? Thanks in advance.

Are you really sure that LoRa App Server has been started? Could you post the output of:

vagrant ssh
sudo journalctl -f -n 100 -u lora-app-server

Hi,
Thanks for your help. My first mistake was that I had not started the packet forwarder. This is corrected and it seems that it must run to prevent a problem with the app server starting.
But now I get this output from your command:

Aug 02 17:55:25 ubuntu-xenial lora-app-server[1371]: time="2017-08-02T17:55:25Z" level=error msg="handler/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp 127.0.0.1:1883: getsockopt: connection refused"

So the app server has still not started.

It seems like Mosquitto was not started. Could you try a systemctl start mosquitto?

I get the following and don´t know where to get the password. I guess this is the problem.

Authentication is required to start 'mosquittosystemctl.service'.
Authenticating as: Ubuntu (ubuntu)
Password:

Could you try the same command, but then with sudo in front of it, thus sudo systemctl start mosquitto? This might actually be related to jpmens/mosquitto-auth-plug#269.

I will investigate if there is a way to work around this in the Ansible playbooks.

It runs without a feedback. Looking at it yields:
Aug 02 18:40:41 ubuntu-xenial systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Aug 02 18:40:43 ubuntu-xenial mosquitto[1173]: * Starting network daemon: mosquitto
Aug 02 18:40:43 ubuntu-xenial mosquitto[1173]: ...done.

But I still get:

Aug 02 18:44:13 ubuntu-xenial lora-app-server[1385]: time="2017-08-02T18:44:13Z" level=error msg="handler/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp 127.0.0.1:1883: getsockopt: connection refused"

Your help is really appreciated. As you probably have guessed I am still very new to this.

Hi Brocaar, I'v vagranted up the new version of loraserver-setup and the virtual machine was up but it cant connect to the lora-server-app even UI or aPI.

HELLO @syntrop !

Good News1 I was attempting to access https://localhost:8080 also but it was not working :(
But as @brocaar has said, we cannor forget to write the JW token at the file.
So when you run "vagrant up", the Vagrantfile brings the machines up, but not the localhost page yet.
Please, follow the commands bellow:

#acess the virtual machine using ssh, sou at the directory of vagrantfile, open a terminal and type:
vagrant ssh

#Genarate a token code:
openssl rand base64 32

#Copy the code to the loraserver file and edit the almost last one topic:
sudo nano /etc/default/loraserver
at:
-->JWT secret used by the gateway api server for gateway authentication / author$
-->You could generate this by executing 'openssl rand -base64 32' for example
GW_SERVER_JWT_SECRET=

#Then realize vagrant reload!

Be happy! 🥇

An other option is to perform a vagrant provision. That will update all the configuration to the latest state.