WebThingsIO / registration_server

The registration server for WebThings Gateway.
Mozilla Public License 2.0
79 stars 33 forks source link

"Error issuing certificate" #20

Closed benfrancis closed 6 years ago

benfrancis commented 6 years ago

STR:

Expected:

Actual:

benfrancis commented 6 years ago

@andrenatal Any idea what is broken?

andrenatal commented 6 years ago

@benfrancis reason is that now the api endpoint responds on ‘api.mozilla-iot.org’ while the old/only image we have is pointing to: ‘mozilla-iot.org’

So instead messing with the DNS in production now, I would:

  1. Checkout commit f3f3673a2445c66b218a992671ca51510257fec6 (which was the one we used to build the image)
  2. Modify here: https://github.com/mozilla-iot/gateway/blob/f3f3673a2445c66b218a992671ca51510257fec6/config/default.js#L54 to api.mozilla-iot.org
  3. Remove .box from here too: https://github.com/mozilla-iot/gateway/blob/f3f3673a2445c66b218a992671ca51510257fec6/config/default.js#L55 (and also from the subdomain setup page)
  4. Upload the image again.

Or, just publish a new image from master.

andrenatal commented 6 years ago

This is not valid anymore.

edvinand commented 5 years ago

I still receive the same issue as @benfrancis describes above, using the gateway-0.6.1.img. It says "Welcome Choose a secure web address for your gateway:" I enter a subdomain and an email address. The first time I try it says "Processing" for a while, but then it says "Error issuing certificate. Please try again". When I try again, it gives this error message immediately. Any idea what the fix may be in this version?

mrstegeman commented 5 years ago

Are there any errors in the log? You can get the log via Settings -> Developer -> View Logs in the UI, or in ~/.mozilla-iot/log.

BryanConradHart commented 3 years ago

I'm running into the same issue, but I'm not sure what I could be doing wrong with my network setup (my networking skills are not strong).

I can ping google.com I can't ping api.mozilla-iot.org

I can dig google.com and get an answer but when I dig api.mozilla-iot.org I get back

; <<>> DiG 9.11.5-P4-5.1+deb10u2-Raspbian <<>> api.mozilla-iot.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 36641
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;api.mozilla-iot.org.           IN      A

;; Query time: 4 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Feb 06 04:40:47 GMT 2021
;; MSG SIZE  rcvd: 48

In the logs I see

ERROR  : Failed to subscribe: { FetchError: request to https://api.mozilla-iot.org:8443/subscribe?name=*****&email=***** failed, reason: getaddrinfo EAI_AGAIN api.mozilla-iot.org api.mozilla-iot.org:8443
    at ClientRequest.<anonymous> (/home/pi/mozilla-iot/gateway/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:198:13)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  message:
   'request to https://api.mozilla-iot.org:8443/subscribe?name=*****&email=***** failed, reason: getaddrinfo EAI_AGAIN api.mozilla-iot.org api.mozilla-iot.org:8443',
  type: 'system',
  errno: 'EAI_AGAIN',
  code: 'EAI_AGAIN' }

and a similar error for fetching the add-ons.

My raspberry pi is attached to an ethernet switch (actually a Amplifi Alien in AP mode) and from there to my ISP-provided modem/router combo. This is the same as my NAS, which can connect just fine to WD MyCloud.

Primary DNS: 47.55.55.55 Secondary DNS: 142.166.166.166 auto-configured by my ISP

any recommendation on how to fix this DNS issue?

mrstegeman commented 3 years ago

@BryanConradHart the Mozilla infrastructure is shut down now. You’ll need to use the 1.0.0 version of the gateway, which uses api.webthings.io instead.

BryanConradHart commented 3 years ago

Ah - I see now. I had googled for "Mozilla Webthings Gateway" which took me to https://iot.mozilla.org/gateway/ I didn't notice the banner telling me that the project has moved, because it is so small on desktop. When I viewed it on mobile I noticed the banner. Thats not really an issue with the gateway so IDK where to raise it, but someone may want to make it more obvious on desktop (or simply redirect).

Thanks!

mrstegeman commented 3 years ago

@benfrancis ^^^

benfrancis commented 3 years ago

Gateway downloads have now been disabled on iot.mozilla.org, with the download buttons linking to a re-worded banner directing people to webthings.io. Hopefully this helps prevent confusion.