thingsboard / thingsboard

Open-source IoT Platform - Device management, data collection, processing and visualization.
https://thingsboard.io
Apache License 2.0
17.24k stars 5.08k forks source link

Unable to connect TB-gateway to TB on AZURE VM #1060

Closed syuusikou closed 6 years ago

syuusikou commented 6 years ago

hi everyone, I am a total fresh and was stacked at this problem for 1week+. I installed TB and TBIoTGateway on one azure VM ( ubuntu16.04 ), and tried to connect gateway to TB following the instruction guide(ThingsBoard doc - IoT gateway get started). TB server is working fine but the connection just won't work. my /etc/tb-gateway/conf/tb-gateway.yml file is like this:

gateways: tenants:

  label: "Tenant"
  reporting:
    interval: 60000
  persistence:
    type: file
    path: storage
    bufferSize: 1000
  connection:
    host: "40.115.147.61" <-----my azure VM globle IP address (I edited the address)
    port: 1883
    retryInterval: 3000
    maxInFlight: 1000
    security:
      accessToken: "SQANC9EKN6nCCYIhJOA9" 
  remoteConfiguration: true
  extensions:
    -
      id: "sigfox"
      type: "SIGFOX"
      extensionConfiguration: sigfox-config.json

after start TB-gateway service, error log was like this:

$ cat /var/log/tb-gateway/tb-gateway.log | grep ERROR 2018-09-10 00:14:51,994 [pool-4-thread-1] ERROR o.t.g.service.MqttMessageSender - sleep interrupted

$ netstat -nap was like this:

tcp6 0 0 10.0.0.12:35234 40.115.147.61:1883 ESTABLISHED - tcp6 0 0 10.0.0.12:1883 40.115.147.61:35234 ESTABLISHED -

but $ ping 40.115.147.61 was time out.

any idea why is won't work? THANKS AHEAD!!

mp-loki commented 6 years ago

if ping 40.115.147.61 times out then it is not a ThingsBoard or gateway issue