Vagrant installation, can't connect to LoRa App Server

HI All,
I’ve downloadede the Vagrant installation file to quikly setup a working environmental trough VirtualBox.
The host pc os is Win 10 and the guest pc os is the Ubunto.
The VM installation works fine.The net is configured as NAt with forwarded port. The host port 8080 should be connected to the 443 port of the guest.
Starting the VM I’m not still able to connect to the guest by typing https://localhost:8080 on the host browser.

Is the lora server app launched automatically by launcheing the VM (actualy there is a ps lora-app-server).
Using TCPView I can view the port Virtualbox 8080 as open as the other ports (1183,1184, 1700…)

What I’ve to do?

Could you login into the vagrant box and check if all services are running / what their log output are / if there are any errors? To login into a Vagrant machine you can use vagrant ssh.

Actually connecting to Vagrant I can only see there are ps running for lora-server, lora-server-app but here are no logs in /var/log/lora-app-server/.
It seems that is not working.
My command line is:
lora-app-server --postgres-dsn postgres://loraserver_as:loraserver_as@localhost/loraserver_as?sslmode=disable --mqtt-username loraserver_as --mqtt-password loraserver_as --mqtt-server tcp://localhost:1883

I noticed there is a connection refused on 1883. Is this the problem?

You probably need to use journalctl, e.g. journalctl -f -n 100 -u lora-app-server to retrieve the logs. Port 1883 is Mosquitto. Could you try (re)starting this service? It might be related to https://github.com/jpmens/mosquitto-auth-plug/issues/269.

I’ve just restarted the Mosquitto service and now the error is:
level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”

That seems like the loraserver service is not running. See also https://forum.loraserver.io/t/rpc-error-code-unavailable-desc-grpc-the-connection-is-unavailable/37.

Hi Orne,
I think no one service is correctly started.
Attached the screenshots of the logs of loraserver, loragateway and lora app.
I’ve several errors and loraserver exit…
Is there a sequence to start them?
Where are the configuration files in the vagrant VM?

One more question what is the ubuntu password for the vagrant installation? It starts with the user ubuntu but I don’t know the pwd.

Sorry, my mistake. The GW_JWT_SECRET was put under the wrong configuration key :wink: Because of that the loraserver server was not starting. I’ve fixed this in https://github.com/brocaar/loraserver-setup/commit/a130f9ebc86a2794aa84369d6377b4aa6dd30545.

You could do a

git pull
vagrant provision

To update your box.

Regarding your login question, I’m not sure if there is a password set for the ubuntu user. On vagrant up I think Vagrant generates a ssh keypair which is used on vagrant ssh. You could however set a password for the ubuntu user yourself :slight_smile:

Thank you Orne for your prompt help!
Now evething is working fine and I can connect lora-app-server GUI web interface!
Thanks a lot!
Off course this is my starting point…so I’ll bore you with other issues in the next weeks.

The git pull should have update your config file. See: https://github.com/brocaar/loraserver-setup/blob/master/host_vars/vagrant.yml#L77. Then the vagrant provision should have updated this config in your box. As a last resort you could do a vagrant destroy && vagrant up.

Thank you Orne for your prompt help!
Now evething is working fine and I can connect lora-app-server GUI web interface!
Thanks a lot!
Off course this is my starting point…so I’ll bore you with other issues in the next weeks.

1 Like