I get to the last step and this is the error message I get. I am new to this but would like to this working. Help Please
Failed to complete tunnel connection
The connection to http://db47-209-58-130-50.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:8888.
Make sure that a web service is running on localhost:8888 and that it is a valid address.
The error encountered was: dial tcp [::1]:8888: connectex: No connection could be made because the target machine actively refused it.
I’m guessing you’re referring to this tutorial which is not part of the Random Nerd tutorials.
I’ll try my best to help. I’m guessing when you got to the line “ngrok tcp IP_ADDRESS:8888 –authtoken TUNNEL_AUTHTOKEN” you used “localhost” for “IP_ADDRESS”. This will not work. NGROK is trying to tunnel through your router to a local machine on your network but it can’t translate “localhost” as that would mean your router itself. Use the actual IP address and it should work.
No, the tutorial form is here https://rntlab.com/module-4/accessing-the-esp32-web-server-from-anywhere/
Look I am fairly new to this and use what actual IP address?
I’m afraid I don’t have access to that. Is the one I linked to close to being the same?
At any rate you need the IP Address of the device you are trying to connect to via ngrok.
Ie. It’s trying to connect to whatever the device is that has a service that responds to requests on port 8888. Is it the ESP32? Is it your local PC? Is it something else? Supply that IP Address.
Hi Tim.
When you type your ESP IP address on your browser followed by :8888, do you get access to the web server?
Did you insert your ESP32 IP address and tunnel auth token on the following command?
ngrok tcp YOUR_ESP_IP_ADDRESS:8888 --authtoken YOUR_TUNNEL_AUTHTOKEN
For example, if my ESP32 IP address is 192.168.1.70, and the authoken is 3V1MfHcNMD9rhBizf8TRs_2whamY91tqX4, I would run the command as follows:
ngrok tcp 192.168.1.70:8888 --authtoken 3V1MfHcNMD9rhBizf8TRs_2whamY91tqX4
Note: Steve, thanks for trying to help. Please, avoid sharing that website here in our forum. Almost every tutorial related to the ESP32 that they publish is stolen from our website. They copy the code, structure, change a few words on the sentences, and change the color of the images or examples (to make it look different, but you can clearly see that it is copied from our tutorials), and don’t provide any credit. If you check their latest tutorials, they are almost all copied from our website. Thanks.
Regards,
Sara
Sara
Sorry about that. Unfortunately there is no way for me to know that. It appears they have copied a tutorial from one of your books that I don’t have access to. All I can do is search the internet and their copy is one of the first that comes up.
Hi Steve.
Don’t worry. I know that.
And thanks for trying to help.
Regards,
Sara
Sara,
No to the first question and yes to the second question. I went through the tutorial step by step as said earlier when got to the last step I got the error shown above. I went back to one of my earlier programs and it still worked. The difference is this line ( WiFiServer server(80); ) was changed to this ( WiFiServer server(8888); ) in the code in your tutorial.
Tim
Sara,
I just entered this in my browser 192.168.0.28:8888 and it is asking for the user name and password but I don’t know what to type in?
Tim
I have gone through the tutorial again when I am ngrok and here what it is saying.
ngrok by @inconshreveable (Ctrl+C to quit) Session Status online Account Tim Lewis (Plan: Free) Version 2.3.40 Region United States (us) Web Interface http://127.0.0.1:4040 Forwarding tcp://2.tcp.ngrok.io:14697 -> 192.168.0.28:8888 Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00
Hi Tim.
If got to this step, it usually means everything is working as expected.
You need to go to that ngrok URL: tcp://2.tcp.ngrok.io:14697 to access the web server.
The username is user and the password is pass (the same we’ve set on a previous project in the course).
I’m sorry that these instructions are confusing. Maybe I need to update them.
Regards,
Sara