Application server:error parsing service config

hi everyone,

I’ve successfully installed the application server. the log is here below:
root@lora:~# journalctl -f -n 100 -u chirpstack-application-server
– Logs begin at Wed 2020-02-12 09:01:47 CET. –
Feb 12 09:57:20 mchplora systemd[1]: Started ChirpStack Application Server.
Feb 12 09:57:21 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:21+01:00” level=info msg=“starting ChirpStack Application Server” docs=“https://www.chirpstack.io/” version=3.8.0
Feb 12 09:57:21 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:21+01:00” level=info msg=“storage: setting up storage package”
Feb 12 09:57:21 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:21+01:00” level=info msg=“storage: setup metrics”
Feb 12 09:57:21 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:21+01:00” level=info msg=“storage: setting up Redis pool”
Feb 12 09:57:21 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:21+01:00” level=info msg=“storage: connecting to PostgreSQL database”
Feb 12 09:57:21 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:21+01:00” level=info msg=“storage: applying PostgreSQL data migrations”
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“storage: PostgreSQL data migrations applied” count=47
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“integration/mqtt: TLS config is empty”
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“api/as: starting application-server api” bind=“0.0.0.0:8001” ca_cert= tls_cert= tls_key=
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“api/external: starting api server” bind=“0.0.0.0:8080” tls-cert= tls-key=
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“integration/mqtt: connected to mqtt broker”
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“integration/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“api/external: registering rest api handler and documentation endpoint” path=/api
Feb 12 09:57:31 mchplora chirpstack-application-server[6283]: time=“2020-02-12T09:57:31+01:00” level=info msg=“api/js: starting join-server api” bind=“0.0.0.0:8003” ca_cert= tls_cert= tls_key=

however, when I try to connect with my browser, I get this:

error parsing service config: error from DNS TXT record lookup: lookup _grpc_config.localhost on 192.168.1.1:53: read udp 192.168.1.2:55382->192.168.1.1:53: read connection refused (code: 14)

the ip address of the application server is 192.168.1.1 and i’m accessing to it from a browser on my PC

any idea?

this is a picture that describes a little better my problem

Luca

2 Likes

Hi. Got the same problem, with TLS and without. Previously it worked well (before loraserver got chirpstack).

With having app-server and browser on the same machine, the web-interface works fine. Having app-server and browser on different machines in the same network, the error remains. x.x.x.x:8080/api seems fine, whereas x.x.x.x:8080/api/applications gives the error as described above.

Could you try 127.0.0.1 instead of localhost in your configuration?

Thanks for looking at it.
I replaced all ‘localhost’ to ‘127.0.0.1’ in all 3 .toml-files and restarted systemctl services. Still the same: trying to access the web-interface from another machine in the same network leads to ‘error parsing service config: error from DNS TXT record lookup: lookup _grpc_config.localhost on 192.168.2.1:53: read udp 192.168.2.108:59834->192.168.2.1:53: i/o timeout (code: 14)’ (see above). Tried with Firefox, and Safari on a third machine. Also another port instead of 8080.
Accessing ‘192.168.2.108:8080’ results in the error message above, in the browser address bar the ‘url’ changes to ‘192.168.2.108:8080/#/’

Hii @brocaar
i am also facing same issue

Hello, same for me, but yesterday eveythings goes right, i did modified nothing, just restarded my raspberry…

Hii,

we have resolved this issue with gRPC version update in source code

1 Like

Thanks @sagarpatel I have made the modifications in the ChirpStack Application Server and Network Server (master branch).

1 Like

@brocaar,

i am getting below warning from chirpstack-application-server logs

  • Network Server already connected (i think Round Robin CreateClient issue)

Hmm… I see them too when using localhost… I think this is (still) caused by the DNS round-robin balancer of gRPC. Let me check how we can work around these.

I believe this is because in /etc/hosts there is:

127.0.0.1 localhost
::1 localhost

So localhost resolves to both entries (of which one is failing).

1 Like

getting a same warning using localhost or 127.0.0.1

Does your NS configuration contain bind="127.0.0.1:8000"? In that case it could explain the issue because the bind is for IPv4 only and your /etc/hosts (I assume) contains two items for the hostname localhost (127.0.0.1 and ::1).

The gRPC round-robin balancer uses both items to load-balance the requests, but fails to connect to ::1, which is the error you are seeing.

1 Like

Thanks @brocaar

Resolved my issue

NS Configuration changed with default bind="0.0.0.0:8000"

Thank you

@luca78

ChirpStack Application Server v3.10.0-test was released