Chirpstack server config wrong on port 8001

Dear all,

I install the chirpstack network stack in different machine,

image

ns ip: 10.0.0.76
as ip: 10.0.0.80

Then in Client, I run the chirpstack simulator.

I do this is because I want to calculate the topline of the lora network support, I want to build a AWS-cloud lora network, but I see the AWS’s plan counts by CPU, RAM, bandwidth usage. So I want to do a simulation to see how to calculate the [ n sensors + 1 gateway + 1 NS + AS ] hardware requirement, for example n=500, the palyload data is 14Bytes (BME280), then NS need 1 cpu 1 GB RAM, and AS need 2 cpu 2 GB RAM, etc. So I can purchase that plan, and I will use the auto-scalling, so after the network is scalling, then it will generate more instance of NS and AS with same hardware setup.

However, when I run the simulator, I find this errors from my network server log:

Jul 20 03:34:30 iot chirpstack-network-server[13495]: time="2020-07-20T03:34:30Z" level=info msg="uplink: frame(s) collected" ctx_id=0b6dad19-7929-4bed-bb67-9008b486556b mtype=UnconfirmedDataUp uplink_ids="[6cb4a83c-f570-4904-b446-0624991f61f4 dbc6074f-650a-4df8-9576-6146a36a5b1c 968d90b6-01a9-4e1d-be38-90543db9b7fe 5baac7aa-153a-4fae-a529-fd0cd9b2aef5 946ccc13-0319-4213-9b91-e1c0c49951f1 afdbb362-97a2-4249-9719-48aa1450defa 772d7f19-4d56-4d22-becb-ccaea356dcc2 a7738da4-83f5-4365-a6b0-3cf772c9b7e0 a38e2897-e83d-4ad9-8b93-a74bde9ced1e 28db8d23-e504-4226-ab1f-943d1cfbaf18 2b67b2bf-d52a-469c-a9bf-634041f3e7c0 da6659a9-84a4-4257-8132-7cd76534074f 157f0901-9028-4d04-8f93-563f5616ebf8 4ec38966-99a4-402c-a86b-273aa597928f 813d3844-70a2-47d5-aafc-20034d14ba31 0db5dfaa-695e-4372-9b59-7cc4f1060d18 e689ac10-d967-4c50-bf78-7e32b7815805 f49573fb-7dfa-42e1-ba9e-6f54e885ce95 566c0318-9f01-461e-a14d-8fa440dc2a5b 19a22aa0-7ca3-4c8b-8d58-581a9a8c3f85]"
Jul 20 03:34:30 iot chirpstack-network-server[13495]: time="2020-07-20T03:34:30Z" level=warning msg="creating insecure application-server client" server="localhost:8001"
Jul 20 03:34:30 iot chirpstack-network-server[13495]: time="2020-07-20T03:34:30Z" level=warning msg="grpc: addrConn.createTransport failed to connect to {127.0.0.1:8001  <nil> 0 <nil>}. Err: connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:8001: connect: connection refused\". Reconnecting..."
Jul 20 03:34:31 iot chirpstack-network-server[13495]: time="2020-07-20T03:34:31Z" level=error msg="uplink: processing uplink frame error" ctx_id=0b6dad19-7929-4bed-bb67-9008b486556b error="get application-server client error: create application-server api client error: dial application-server api error: context deadline exceeded"

I don’t know where this localhost:8001 come from, becuase I already setup it in the application server config file, and make the 8001 port point to my network server, here is my application-server.toml of 8001 part:

  # Settings for the "internal api"
  #
  # This is the API used by ChirpStack Network Server to communicate with ChirpStack Application Server
  # and should not be exposed to the end-user.
  [application_server.api]
  # ip:port to bind the api server
  bind="0.0.0.0:8001"

  # ca certificate used by the api server (optional)
  ca_cert=""

  # tls certificate used by the api server (optional)
  tls_cert=""

  # tls key used by the api server (optional)
  tls_key=""

  # Public ip:port of the application-server API.
  #
  # This is used by ChirpStack Network Server to connect to ChirpStack Application Server. When running
  # ChirpStack Application Server on a different host than ChirpStack Network Server, make sure to set
  # this to the host:ip on which ChirpStack Network Server can reach ChirpStack Application Server.
  # The port must be equal to the port configured by the 'bind' flag
  # above.
  public_host="10.0.0.76:8001"

Does anyone have any idea why it still occurs the localhost:8001 connection refused?

Best regards,
John

This endpoint is stored in the database on network-server create and update. If you have changed your configuration, make sure you re-save the network-server in the web-interface to update the record in the database :slight_smile:

3 Likes