NPM local server port increments by 1 - npm

new to VueJS here. Normally, vue runs the project at localhost:8080
I noticed lately that the moment I'm restarting my local server running at localhost:8080 through npm run dev command, the default port just increased it's value by 1. (btw, i just had that screenshot few moments ago)
Is this some sort of an issue?

Maybe the port 8080 and 8081 are already in use. You should make sure that you shutdown the running instances of the server before starting a new one.

Related

How to close npm local tunnel port?

I had opened my localhost to the internet for a webhook using npm local tunnel and done my job. Now I'm exposing my port unnecessarily, I could still access my port using the URL. Now I need to close the tunnel. What should I do?
Long time ago, I shut down node service and the port closed. But now I can't find npm or node in my service.
I need a simple command to close the port i.e. unexpose my port.
Commands I used:
npm install localtunnel
lt --port=8080

Can't access Vue3 app on server using domain name, but works with IP

I have a Digital Ocean droplet running two Docker containers, one that is a Vue3 app which I'm having issues with, and a Django server that I'm not having issues with.
vue-cli-service serve --mode production --host 0.0.0.0 --public http://XXX.YYY.ZZZ.XXX:8080
If I go in Chrome and type www.websitename.com
This site can’t be reached websitename.com refused to connect.
If I go in Chrome and directly type the IP and the port I can see the website load. Is this a DNS resolution issue? I really don't think so, here's why:
If I go in Chrome and type http://websitename.com:8000/admin
I see a Django administration site. This means that I have no problem with Django, only with Vue3.
I tried setting --host 0.0.0.0, I tried adding --public with the website name and with the IP directly.
Also nmap seems to show everything working fine
nmap -F websitename.com <---- No issue with DNS resolution
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-26 20:14 PDT
Nmap scan report for XXX.YYYY.ZZZ.XXX <---- Correct IP
Host is up (0.090s latency).
Not shown: 92 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp filtered smtp
111/tcp filtered rpcbind
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds
8000/tcp open http-alt <---- Django
8080/tcp open http-proxy <---- Vue3
If you do not provide a port in Chrome - it will default to port 80. But your Vue3 Docker is running on port 8080. Therefore you have to either provide this port when you type the URL in Chrome - or you must run your Docker on port 80.
You are providing port 8000 for the Django administration site - do the same (with port 8080) for your Vue3 application.

HAproxy fails to start after changing ssl certificates

I've been struggling with this issue for 2 days now and it's starting to be a big problem.
we have 2 LB on which HAproxy is installed,
I've tried to change the certificats on the first one and it fell down and couldn't restart it even when getting back the old haproxy.cfg file.
after a while I tried to restart the server and it did the job. I had my Haproxy running on the failed node. and I successfully changed the ssl certificats on that one.
Then, I tried to do the same on the second, and then it went down and nothing seem to be correcting the problem; not restarting haproxy on the old haproxy.cfg file nor restarting the whole server.
the error I get is like this :
Starting frontend PAGEMAINTENANC_GUN: cannot bind socket [10.168.10.16:80]
Can you please give me some little help?
thank you all in advance.
It seems that I've been trying to bind to an IP address that is not local. That's why the HAproxy fails to start. The solution was to set ip_nonlocal_bind to 1.
To get info:
sysctl net.ipv4.ip_nonlocal_bind
Set net.ipv4.ip_nonlocal_bind to 1
sysctl -w net.ipv4.ip_nonlocal_bind=1
Restart HAproxy works

Cannot bind to port 8080. It is probably taken by another application or you don't have enough privileges

I deleted my XAMPP from the applications folder(without uninstalling) and installed it again then I tried to change my apache port 8080 after that this problem showed up 'Cannot bind to port 8080. It is probably taken by another application or you don't have enough privileges'
I tried to fix it by uninstalling and installing again it didn't work then I deleted cache files of XAMMP with some sudo code but it didn't work anyway
in windows to check what ports applications are running on, open command prompt as admin and type "netstat -a -b"
stop whatever application is running on port 8080

How to run Tomcat on Linux (which has glassfish on port 8080)

I am trying to run to tomcat on linux where glassfish is already running on port 8080 ( you can check here - vhost2.cs.rit.edu:8080 . So i changed the tomcat port to 8181 by editing the server.xml file. NOw with the command startup.sh and i get the following output
Using CATALINA_BASE: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_HOME: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_TMPDIR: /home/krs8785/apache-tomcat-7.0.54/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/krs8785/apache-tomcat-7.0.54/bin/bootstrap.jar:/home/krs8785/apache-tomcat-7.0.54/bin/tomcat-juli.jar
Tomcat started.
I am assuming that tomcat is now working. Now when i test the server by - vhost3.cs.rit.edu:8181 I get
No data received on the browser.
What is the problem here and how do i solve it?
The problem may be unrelated to tomcat. I think your first step should be to exclude networking issues.
I have assumed you are accessing vhost3.cs.rit.edu:8181 from another machine. If that is the case, try to access localhost:8181 from vhost3.cs.rit.edu. If this is not possible in a conventional browser, perhaps because it is a headless server with X forwarding disabled then use a terminal based browser. Try typing the following in the terminal on vhost3.cs.rit.edu
lynx localhost:8181
If you are able to see a representation of a tomcat splash page then you can attribute it to networking issues. This could be firewall related (perhaps even an issue with iptables on linux).