Automated Let's Encrypt Certificates not Working

I am trying to set up the Let’s Encrypt certificates for my local server, but am running into difficulty. I suspect it is something related to my ignorance of network management, but would appreciate any help you can provide.

I get the following error:

C:\Users\Public\BlynkServer>java -jar server-0.28.9.jar -dataFolder C:\Users\Public\BlynkServer\Data
Blynk Server 0.28.9 successfully started.
All server output is stored in folder 'C:\Users\Public\BlynkServer\.\logs' file.
Generating own initial certificates...
Error during certificate generation.
Challenge failed... Giving up.

Setup:
Server host OS:Windows 10
Desired Server Hostname (local):jrkblynk.com
Server Version:0.28.9
Java version:9.0.1+11
Server computer static IP 192.168.X.Y

  • I started with the example server.properties script from github and set the server.hostname parameter to jrkblynk.com
  • In my Windows hosts file on the server computer I created a line: 127.0.0.1 jrkblynk.com
  • I used netsh on the server computer to proxy port 80 to 8080 and 443 to 9443 like so:
    netsh interface portproxy add v4tov4 listenport=80 conectaddress=127.0.0.1 connectport=8080
  • I run the server using the startBlynkServer.cmd command file.
  • The server does start and I can connect to the admin dashboard (http://jrkblynk.com) and connect the blynk app (192.168.X.Y). I have not yet tried to connect a device.

I wonder if you need to redirect those ports on your router aswell… its your firewall to the internetZ.
I needed to do so anyhow.

1 Like

I did that first, then found netsh command. Will try both later today but my understanding is that they both do the same thing at a different level.

My understanding based on the tutorial is that hostname is more of a formality and if I’m not calling the host from outside of my LAN, the hostname does not need to be a “real” DNS hostname that say, you could look up. Is this a mistake? Do I need to register my hostname with a service like No-ip for Let’s Encrypt to work?

I’m no network guru either but im 99% sure you need a valid DNS name so yes.
Lets encrypt will talk to the dns adress which in turn redirects it to your pc.

1 Like
ping jrkblynk.com
ping: unknown host jrkblynk.com

How do you expect this to work if your domain has no IP assigned to it?

1 Like

Apologies, I misread your tutorial and mistakenly thought that the hostname only needed to be locally recognizable.

I had also forgotten to forward the proper ports on my DSL modem. Fixing that and setting up a hostname on no-ip fixed the certificate generation problem.

1 Like

I’m going to mark this solved, and add a little footnote to illustrate that there are 1e6+1 things that can go wrong when setting up your own server. It’s a learning process, can be frustrating for noobs like me, and chances are Blynk is not the problem. Thanks @Dmitriy and @FettKeewl for answering my admiteddly silly question.

  • My DSL modem and WiFi router are two different devices. Router supports NAT Loopback, modem does not. I ended up putting the modem in Transparent Bridging mode. This allows me to use my domain inside my LAN, including over WiFi (important for setting server name in Blynk app).
  • This morning nothing was working. It took me four hours to think of running ipconfig and realize that my server was not reserving the right IP address. Why? Because, even though I was connected via ethernet cable last night, the router was recognizing the WiFi adapter’s MAC address and not the wired adapter’s address. Disabling the WiFi was the last thing I did last night.
2 Likes

@Dmitriy I think this needs to be added into the Server documentation :stuck_out_tongue: Or perhaps clearer references that it is an Advanced Process like I belive it used to say.

People think routing, NAT, ARP, ports, firewall, DHCP, subnetting, VLAN, DMZ, proxy, DSL, WAN, DDNS etc is easy. That’s not always true. :no_mouth:

My general notion is that more users struggle with connections, not the installation. The documentation could be better/updated, like on how to use PSQL :wink: but in general, it’s not bad. The advanced process is not Blynk, it’s everything else. How many Windows users do you think had JRE installed before they started Blynking? :slightly_smiling_face:

Just my 50 c

3 Likes

That’s why I was pleased a few years ago when I stumbled across Blynk. As a WISP user, port forwarding is generally not available, but we are pushing our provider hard to open a couple of ports for our Blynk surveillance cameras.

I have local servers but I think more people should look at the awesome Blynk cloud server for their true iOT projects. Infinitely simpler as far as I’m concerned.

WISP? A bit odd perhaps, but I guess it depends on the circumstances and where you live :smile:

Ehh… the awesome cloud server is the “normal” awesome cloud.blynk.cc? Or have Blynk launched a new service that I’m totally unaware of?

I like to think of IoT as Intranet of Things. I already have a NAS at home running 24/7, I know how to configure both my router and DDNS and I was out of Blynk Juice. So it was a no-brainer to go local :grin: But the main reason is easier development and testing. I’ll probably move back to the cloud at some point. Like when you have cleared your desk :wink:

For the $10 to $20 per month that many users pay around the world for a decent internet service, we would pay around $150. We don’t because it’s not available. So for $40 to $60 per month you can have a regular fixed line broadband but at 2010 bandwidth levels. For $40 with a WISP you get similar bandwidth to the rest of the world.

Not that I’m aware of either. I was just trying to point out that some Blynkers get fixated with local servers when they should be using the cloud.

Never been a fan of the word intranet and it will always be internet for me.

Top up the juice :slight_smile:

I don’t think that’s technically true if you are running your own cloud server.

Very wise.

Can’t see that happening anytime soon but we can live in hope :slight_smile:

$10-20 a month? I guess Sweden isn’t part of the modern world :thinking: I’d say about $40 for a decent connection here.

You know, street cred in the hood and such :smile:

I’m a bit conservative when it comes to exposing appliances to the greater world. The answer to your next question: VPN if I have to, otherwise I rely on the awesome EziScheduler to do it’s work. :wink:

How do you mean?

Perhaps Santa can do some housekeeping for you? :grin:

Actually I think the mighty US still has high internet costs.

With your own cloud server you see all the same logs as a local server but with the huge benefits of this new internet thingy.

Am I stupid or just slow? Can I get my own cloud server or are you still referring to cloud.blynk.cc? :grimacing:

A clarification: It’s not my UNO:s I’m afraid of connecting to this something, something, something, dark side. It’s TV:s, cameras, set-top boxes, PVR:s and other not-so-smart devices. IMHO.

But for now, while I’m creating projects, tossing projects, testing widgets and what not, it’s more convenient with a local server, unlimited juice and close to zero latency for stress tests.

Both :slight_smile:

You can have your own cloud server from €1 per month.

Huh? How?

No, a simple server like you might have at home but on the internet.

This part is fully free and open-sourced. So you are welcome to contribute :wink:.

I will gladly help where I can, but I know diddly about the implementation of PSQL. I even created a brand new thread about that. Just waiting for your eternal wisdom in the form of a reply to enlighten us all. :wink: