Ngrok can't read config for ports - ngrok

So, I'm currently setting up a Raspberry Pi to be my testing server and to host code backups over SFTP(I really don't like Git). After tussling with Hamachi for a bit, I was recommended Ngrok. Installing Ngrok, I was able to open a port just fine without a config file. It was at this point that I decided that I'd want multiple ports open. I read through the documentation, and wrote this config file.
authtoken:(REDACTED)
tunnels:
httpnorm:
proto: http
addr: 80
httptest:
proto: http
addr:69420
sftp1:
proto: tcp
addr:22
sftp2:
proto:tcp
addr: 21
Now, this is a completely fine YAML file, I've even checked it for error twice, so the formatting doesn't appear to be an issue. However, upon running the command "./ngrok start -config='ngroksetup.yml' sftp1", I get the following output.
ERROR: Tunnel 'sftp1' is not defined in the config files.
ERROR: Tunnels available:
ERROR: Config files read: [ngroksetup.yml]
That isn't correct, because ngroksetup.yml(which is on the root of the filesystem) clearly has listed tunnels. Why is it incorrectly interpreting the setup file?

User error. The issue would be obvious from the get go if I had included my auth token, but I didn't want my auth token being stolen for obvious reasons. Thankfully, the way I wrote it kind of gives it away. I needed a space between the : and the auth token itself, just like how I missed the space on the (REDACTED).

Related

ngrok having issues starting - X509 certificate signed by unknown authority

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.

nebulagraph-storaged: Exited– 9780 Address already in use

The nebula-storage service failed to start, the storage logs show that the port is occupied, but I checked that port 9780 is not occupied either. Also the configuration files are original and unmodified.
There could be several reasons why the nebula-storage service is failing to start:
Another process is already using port 9780. You can use the lsof -i tcp:9780 command to check which process is using the port.
There is a problem with the nebula-storage service itself. You can try restarting the service.

JupyterLab does not work when redirected using TLS

I have a local jupyter lab instance, running on mint-2 computer with command jupyter lab --ip "*", and it listens to port 8888. I can access it just fine via the URL mint-2:8888.
I also have a server instance ubuntu-2. I reverse ssh tunnel from mint-2:8888 to ubuntu-2:8888, meaning I can access it on my mint-1 laptop just fine via the URL ubuntu-2:8888 anywhere in the world.
However, it is not encrypted with TLS, so I wanted to improve this. On ubuntu-2 I have an nginx load balancer container that strips https traffic, and redirects http traffic to other locations. I have set up jupyter.ubuntu-2:443 so that it redirects to ubuntu-2:8888 so that it redirects to mint-2:8888. This version initially seems to open up just fine, and I can navigate directories. However, whenever I want to launch a new terminal or notebook instance, or even create new directories, it wouldn't work. Here's the network log when I save a modified notebook:
My question is, why won't the requests go through, considering I can still interact with the interface just fine everywhere else, but just not when creating folders/notebooks/terminals. I am thinking that JupyterLab might be using UDP and I'm considering passing UDP traffic through nginx, but this doesn't really make sense, as this is clearly a PUT request. Any other help regarding where to find more logs or speculation on what might have gone wrong is much appreciated.
I dig into it a little more, and managed to figured it out.
JupyterLab has CORS policy that doesn't allow requests to ubuntu-2. I then added c.NotebookApp.allow_origin = "*" to JupyterLab's config at ~/.jupyter/jupyter_lab_config.py, as mentioned here.
Then I found out that everything is still not functional, and this is because Jupyter requires both HTTP and WebSocket protocols, and my current server setup only allows http traffic. So I need to enable generic TCP traffic on ubuntu-2's HAProxy load balancer. Because I have multiple virtual hosts on the server, I need to distinguish between them, so I used Server Name Indication, server name included in TLS traffic.

Requested action aborted: Access violation at address 005F6DB2 in module '***.exe'. Read of address 00000000

I am using Apache Jmeter to send FTP load on a Server. After setting up the FTP request on specific IP and port, I get this error:
Requested action aborted: Access violation at address 005F6DB2 in module '***.exe'. Read of address 00000000
I know that I have all the access and I don't know why a module can block me, although I know that software (***.exe) is not blocking my ports. What is the problem?
Here is the attached Wireshark screenshot from the server when sending the clients request, the red line is the problem and it occurs in different places each time I run the test.
The problem doesn't seem to be related to JMeter
Try uploading file(s) using "normal" FTP client like FileZilla or WinSCP.
If the problem persists:
try identifying its cause using Windows Event Viewer
try to trace system calls using i.e. WinDbg
or just raise an issue on your application (FTP component)
If the problem does not occur on "real" FTP clients:
double check that your FTP Request sampler configuration is correct, see Load Testing FTP and SFTP Servers Using JMeter guide for details.
try uploading the file to the other, i.e. public FTP server to see if it works
try implementing file upload purely in Groovy using JSR223 Sampler. See FTPClientExample.java for the code you could re-use. Make sure you have the following line in your script:
ftpClient.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out), true))

Unable to login to Afresco share after changing the port no

I changed the port from 8086 (which was working fine) to 8085 in server.xml file. After restarting the tomcat-server, I was able to get the login page by hitting http://localhost:8085/share however, when I try to login I get an Authentication fail error.
If I change the port no back to 8086 it works fine and I am able to login.
I am not sure what is the problem here as I also tried by changing the port no in alfresco-global.properties file and share-config-custom.xml. However, the issue still exists.
There are some configuration in share-config-custom.xml file for host and port.Those are used for connecting alfresco repository.You need to change in that as well otherwise it wonnt be able to connect with alfresco.
You will need to change the Tomcat connector port, AJP and RMI ports too. Otherwise it may conflict during a shutdown.

Resources