I have a remote site connected via a LTE modem and ngrok. It runs on Raspberry Pis.
My problem is that when I try and login I get a password failure (n.b the login prompt for account is correct).This could obviously be fixed if I travelled the 50 miles and reset the system but I was rather hoping that there was a way I could do it remotely!
Now the technical details;
a) ngrok did work with the remote connection before entering this failure mode
b) The site does do occasional file transfers and these appear to be working perfectly
c) One of the items in b) is the ngrok address which has not changed
d) The fault is repeated if I put in the wrong ngrok address
Is there any way to reset the link remotely?
(The logical explanation for all this is that ngrok has changed the connection parameters which I am not picking up correctly. I use 'curl -s localhost:4040/api/tunnels | jq -r .tunnels[0].public_url' at the remote end, which is then both e-mailed on change, and file transferred to another Pi. However today I could access the device without problems for several hours without any change to the login parameters and then it stopped working again.)
The remote unit has now been brought back to the house for testing so I am able to both use ngrok via the LTE modem and a direct ethernet connection.
I can confirm that the remote computer:
a) Can be logged into as normal via ethernet
b) ps ax | grep ngrok -> 613 ? Ssl 12:19 /snap/ngrok/38/ngrok start --all --config=/home/pi/ngrok/config.yml (the old PID indicating that it has been running for some time)
c) The result of the method given previously for getting the tunnel address is unchanged from when it was working perfectly yesterday
Any suggestions on other tests to run?
Related
I'm using ngrok 3.1.1 and trying to open up port 8000 so I can do some local testing. However, I keep running into some issues.
First off, I've downloaded and installed ngrok from the official site, and then added by authorisation token using:
ngrok config add-authtoken blahblahblahcrazywordsmoustache
So far so good. Then, trying to open ngrok using:
ngrok http 8000
Yields the following errors:
reconnecting (x509: certificate signed by unknown authority)
Followed by:
reconnecting (jsonHTTP.Lookup: No such host: tunnel.ngrok.com)
And...
reconnecting (resolved tunnel.ngrok.com has no records)
The ngrok.yml looks like this:
root_cas: trusted
version: "2"
authtoken: ohlooksomelettersarenttheynice
Any idea what I can do? This is on a corporate network, with various firewalls etc. I'm told that ngrok will create a url that I can use in my code tests, but we can't whitelist that url until we know what it is, and we don't know what it is until ngrok starts and generates it.
Okay, not quite a solution but more of a work-around.
Disconnected my computer from the corporate network, used a wifi dongle and hotspotted to my phone.
Got an error saying that my account wasn't authorised to use custom CAs. Wracked my head for a bit until I remembered that I had seen cas before, in the yml file. Removed the
root_cas: trusted
from the yml, and all working fine and dandy.
I have a pressure sensor plugged into my computer, and the only way to collect the data is through a localhost API endpoint, meaning right now only that machine can collect data. Is there any way to receive data from the localhost API on a different machine? I also need to ping the API 20-40 times a second if that matters.
There are couple of ways I can think of, I am assuming both the machines are on same network
Use localhost API to collect the data in database and create a GET endpoint inside same application for fetching the data according your parameters. You can access GET endpoint from different machine by hitting network ip address of your local machine. Which you can check using ifconfig command in your terminal, check en0 type where you will find something like 192.168.X.X. From other machine you can hit http://192.168.X.X:<port>/getData, where <port> is the localhost port.
If you don't want to use database, then you can use publish subscribe mechanism which is real time. see http://autobahn.ws/python/
How publish subscribe works ?
You will have to make your localhost machine a publisher (server) which will publish events or sensor data in your case (real time). The other machine will be subscriber (client ) which will listen to the events from your server and do necessary processing.
Its uses WAMP (Web application messaging protocol) for communication. The sample code for basic publisher and subsriber can be found here.
Follow steps:
1 : Download ngrok,
2 : Go to the path where ngrok.exe file present and open that path in cmd.
3 : Connect your account.
paste : ngrok authtoken1pA6advIt950uA4y2Rixgc8rdx9_23MSDokKjWhbPUW3NSrZK
4 : Replace your port no including bracket.
paste : ngrok http {9003} -host-header="localhost:{9003}".
5 : copy forward line and paste in other system to check.
Forwarding http://d1c0bc16ff7b.ngrok.io
I've assigned a static IP address to my computer. From my computer, when I browse to WhatIsMyIP, I can check my IP & verify that it hasn't changed.
Now, when I ping my computer from another network, most of the times, everything is fine & I get responses; but occasionally I get 'Request Timed Out' messages (4 out of 4 attempts on:
CMD> ping <IP>
will result in the request timing out).
So far, I have not been able to identify why sometimes it works, but times out at other times. At the times it has timed out, I've used TeamViewer to connect to my computer & check WhatIsMyIP to verify that it's the same. So I know it's connected & online & everything is accessible from the computer atleast.
Normally this would not be a problem, but I'm trying to host a small website form my computer & for the most part, its online, but now & then it goes offline - even though the host computer is up & running with no change in it's IP address.
I'm on Google Fiber, if that helps. Also, under the Advanced Settings', I have reserved an IP address (192.168.1.4) for my computer so I know that will not change. And as I've mentioned my outward facing IP has been made static so I know that is always the same.
Another thing to mention, I have never faced any problems when browsing, gaming online (No disconnects or time-outs or anything)
I would like some insight as to how this can be resolved or at the very least, if the root cause can be identified.
So the problem turned out to be multiple Port Forwarding rules. I had two rules set up, one was setup to use 'Any' service & the other was setup to use only the HTTP - Port 80. I removed the 'Any' service & it's been working fine just since - I assume there was a Port Forwarding Rule conflict.
When I try to start a site in IIS it says:
the process can't access the file because it used by another process
I searched in Google and found that another site may have been using Port 80 but in MyIIS I see that only this site is using Port 80. What else could be using Port 80 or is there another issue involved?
Check using netstat -aon or netstat -aon | findstr 0.0:80 in a command prompt to see which Process Id is LISTENING to port :80 and then watch for that Process Id (PID) in Task Manager with view->select columns-> process id checked. End that process, restart IIS and you are done. (Note: if you have Skype installed, try exiting that process first.)
In a modern Task Manager, you need to go on the Details tab to search for the PID. Or, as mentioned by #Nikita G in the comments, you can use this command to find the task from your command prompt:
tasklist /FI "PID eq 123"
Note: change 123 with the PID returned from the first command.
It is happening because a different process is using port 80, it may be a chat application on your PC like Skype.
First, change the default web site port which was 80 to some unused port (e.g. 8087). To achieve this right click the application and then click on 'Edit Binding'.
After this port change restart again.
Now you can identify which process is blocking the IIS Port 80. To check this use netstat command which displays the details of port along with the process ID.
Sign out of Skype and try again. I have experienced the same issue and I just logged out of Skype and then reset my IIS. It worked for me.
You can also run this command to find out which application or service is using the port and then trace it down in Task manager (Provided it's not the Web Deploy Agent Service).
netstat -o -n -a | findstr 0.0:80
Then open Task manager, go to Processes, click the "Show processes for all users" checkbox and then click the View menu and Go to the Columns, add the PID column.
Match the Process ID from the netstat command to the PID in task manager and you will find the service or application that's using the port.
As others have said, something else may be using port 80 or 443. It was VMWare Workstation Server for me, but check other answers for how to use netstat.
I think this link gives a pretty good explanation and fix of this problem http://support.microsoft.com/KB/890015
Most of the time; it's caused by one of the two reasons:
1) port 80 is being used by something else and as suggested by others you can use netstat -o -n -a |findstr 0.0:80 to see whether this is the case. If yes then kill the process from task manager (tick show processes from all users)
2) if port 80 is not used, the second cause is potentially an invalid ip address in the ListenOnlyList filed in the registry key of HTTP->Parameters. If you follow the link to set the key manually or in fact you can use (xp and server 2003) httpcfg delete iplisten -i ipaddress to delete the invalid ip address.
You must restart the http once you edit the ipaddress!
In my case, it was the "Sync Share Service" (SyncShareSvc) that was running and using port 80.
netstat showed 80 as free, though. I could get the site to run on another port, but not 80. if I added a Host name, IIS would allow me to start the site, but I'd get prompted for Digest authentication when browsing to localhost (or any host name I added). Only Anonymous and Forms Auth were enabled in IIS...
I also found that, after stopping IIS, http://localhost still prompted me for Digest authentication.
The solution - in my case - was to remove File and Storage Services > Files and iSCSI Services >
"Work Folders" from the services installed (restart required).
After removing the "Work Folders" service and restarted, IIS worked as expected.
My case was after installing RD Web Access, the original default websites couldn't be started. Removed the RD Web Access role still same. Removed port 443 binding solved the issue.
Most times when this happens by web developers is the reason apache, so if you go to the config file from apache! open it up and search with ctrl + f to 80 and change the ip you will see to 8080 and the sentence beneath there with 80 to 8080 and you need to confige that in you xampp, or the program u are using currently
Hope I'll help u guys out
In order to get more meaningful information, one way is to also get ownership information when issuing netstat so that you know the process which is using either 80 (default http binding) or 443 (if https binding is defined):
netstat -ab
In my case the culprit was vmware:
TCP 0.0.0.0:443 ComputerName:0 LISTENING
[vmware-hostd.exe]
netstat can be piped into find to search for ports 80 or 443 (e.g. find ":443"), but these particular active connection will show at the beginning of the list at they are easy to see.
For some reason when I try to use get or put from a Solaris box to an IBM mainframe, the ftp client appears to hang.
I've tried all sorts of different variations (for example, including using quotes and not), and all I ever get is a "200 Port Request OK". But I never get the prompt back, and eventually the connection breaks.
ftp> open ibm.some_server
Connected to ibm.some_server
230 USER1 is logged on. Working directory is "USER1.".
Remote system type is MVS.
ftp> cd 'Z.TABS.'
250 "Z.TABS." is the working directory name prefix.
ftp> get 'SAMASCPY' samas.txt
200 Port request OK.
Anyone know what could be going on?
You need to enable passive mode. With Solaris 10's ftp:
ftp> passive
Passive mode on.
The FTP protocol as originally defined makes the server open a connection back to the client when a file transfer is initiated. That's what the PORT command in your question shows -- the client requested that the server connect back to its address on a specific port number. These days, with ubiquitous firewalls & NAT traversals, that rarely works.
Enabling passive mode tells the client to connect directly to the server, and fixes this issue. Most ftp clients now use passive mode by default; Solaris' does not.