DVSwitch Dashboard Web Port
Hello Everybody!
How i can do to change the default web port (80) of my DVSwitch Server with another port? Where i can find the program file to change this port?
I have three DVSwitch installations running on three different Linux computers. Two of the three have the Dashboard running on the standard lighttpd port and the RX Monitor works fine.
I had to change the port on the third to something else since I already have a webserver occupying the standard one. The RX Monitor on that one does not work. It goes red, green, red, blue, etc. and no audio comes through.
Everything else behaves properly.
Thoughts?
Steve N4IRS
Would changing the port have any repercussions, such as causing the RX Monitor button to malfunction?
I have three DVSwitch installations running on three different Linux computers. Two of the three have the Dashboard running on the standard lighttpd port and the RX Monitor works fine.
I had to change the port on the third to something else since I already have a webserver occupying the standard one. The RX Monitor on that one does not work. It goes red, green, red, blue, etc. and no audio comes through.
Everything else behaves properly.
Thoughts?
Sent: Wednesday, December 9, 2020 9:02:54 AM
To: main@DVSwitch.groups.io <main@DVSwitch.groups.io>
Subject: Re: [DVSwitch] DVSwitch Dashboard Web Port
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1376/node
Which is, I assume, the RX Monitor doing its thing.
On the one where I switched lighttpd to port 8888, there is nothing listed with port 8080 anywhere.
Is that what you're looking for or do you need me to post the entire output? If the latter, then I'd need to (ahem) redact a few things in it for security reasons, HI HI.
On the one where I switched the lighttpd port, there is nothing with port 8080 listed.
On the non working node, try systemctl restart webproxy.
Check netstat
Look at /var/log/dvswitch/webroxy
Sent: Wednesday, December 9, 2020 1:06 PM
To: main@dvswitch.groups.io
Subject: Re: [DVSwitch] DVSwitch Dashboard Web Port
On the two working DVSwitch installations, netstat -tnap shows the following line:
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1376/node
Which is, I assume, the RX Monitor doing its thing.
On the one where I switched lighttpd to port 8888, there is nothing listed with port 8080 anywhere.
Is that what you're looking for or do you need me to post the entire output? If the latter, then I'd need to (ahem) redact a few things in it for security reasons, HI HI.
On the one where I switched the lighttpd port, there is nothing with port 8080 listed.
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 14654/node
tcp 0 0 0.0.0.0:88 0.0.0.0:* LISTEN 20288/lighttpd
Personally, I selected port 88 (after looking at the raw page and noticing that port 8080 was mentioned for RX Monitor) to avoid the obvious conflict there.
Also made sure nothing else was grabbing port 8080 on the machine.
systemctl status lighttpd and/or
ps ax | grep lighttpd
On the two working DVSwitch installations, netstat -tnap shows the following line:
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1376/node
Which is, I assume, the RX Monitor doing its thing.
On the one where I switched lighttpd to port 8888, there is nothing listed with port 8080 anywhere.
Is that what you're looking for or do you need me to post the entire output? If the latter, then I'd need to (ahem) redact a few things in it for security reasons, HI HI.
On the one where I switched the lighttpd port, there is nothing with port 8080 listed.
Okay...problem (finally) solved. Turns out that the problem was (probably) not related to changing the dashboard web port. Documenting my experience so that others may benefit.
Steve, your suggestion to check for webproxy log started me on the trail: THERE WASN'T ONE! Which meant that the service wasn't running at all.
I then tried running the following command manually: sudo /usr/bin/node /opt/Web_Proxy/proxy.js 8080 2222 which generated a SyntaxError: "Unexpected token "Const { Exit }"
Much Googling told me earlier versions of node.js would do that. Found out that, somehow, I had version (gasp) 4 installed for some reason! My other instances were running 8.10.0, so that had to be the culprit. Much more Googling told me how to update it to the latest version (15.4.0 as of this writing):
First, install npm: sudo apt-get install npm
Then install n, a node version manager: sudo npm install -g n
Then install the latest version of node: sudo n latest
If the installer changed the path from what's specified in the webproxy service call, change it back with "PATH=$PATH"
Verify that node was truly updated with: node -v
Try running the service manually: sudo /usr/bin/node /opt/Web_Proxy/proxy.js 8080 2222
If you still get the same error, you might have to forcibly copy the newer binary to where the webproxy expects it to be: sudo cp /usr/local/n/versions/node/15.4.0/bin/node /usr/bin/node
Try running the service manually again. If you get a "cannot find module "ws" " error, then do this: cd /opt/Web_Proxy/ and then install the ws module with sudo npm install ws
Try running the service manually again. It should now run with no errors. Control C out of it. You're almost done.
Finally, start the service properly: sudo systemctl start webproxy.service
Voila: RX Monitor audio AT LAST!
Interesting that webproxy was not running when it was showing with netstat.
As far as upgrading nodejs, you might look at: <https://github.com/nodesource/distributions>
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
I used it to upgrade a install of Stretch.
Glad you have it working.
Steve
Okay...problem (finally) solved. Turns out that the problem was (probably) not related to changing the dashboard web port. Documenting my experience so that others may benefit.
Steve, your suggestion to check for webproxy log started me on the trail: THERE WASN'T ONE! Which meant that the service wasn't running at all.
I then tried running the following command manually: sudo /usr/bin/node /opt/Web_Proxy/proxy.js 8080 2222 which generated a SyntaxError: "Unexpected token "Const { Exit }"
Much Googling told me earlier versions of node.js would do that. Found out that, somehow, I had version (gasp) 4 installed for some reason! My other instances were running 8.10.0, so that had to be the culprit. Much more Googling told me how to update it to the latest version (15.4.0 as of this writing):
First, install npm: sudo apt-get install npm
Then install n, a node version manager: sudo npm install -g n
Then install the latest version of node: sudo n latest
If the installer changed the path from what's specified in the webproxy service call, change it back with "PATH=$PATH"
Verify that node was truly updated with: node -v
Try running the service manually: sudo /usr/bin/node /opt/Web_Proxy/proxy.js 8080 2222
If you still get the same error, you might have to forcibly copy the newer binary to where the webproxy expects it to be: sudo cp /usr/local/n/versions/node/15.4.0/bin/node /usr/bin/node
Try running the service manually again. If you get a "cannot find module "ws" " error, then do this: cd /opt/Web_Proxy/ and then install the ws module with sudo npm install ws
Try running the service manually again. It should now run with no errors. Control C out of it. You're almost done.
Finally, start the service properly: sudo systemctl start webproxy.service
Voila: RX Monitor audio AT LAST!
Webproxy WASN'T running. That was the netstat output from the WORKING nodes. Netstat had shown nothing for port 8080 on the non-working one. That should have been my first clue. Bu the lack of a generated log file clinched it.
Incidentally, I did look (and had tried) your suggested way of upgrading nodejs. For some reason, that method completely hosed the existing install on that server. As a result, I ended up having to remove and completely purge it.
Doing so also removed the DVSwitch installation (but, thankfully, left all the config files intact). After reinstalling DVSwitch, I ended up back at version 4 of node...which I was then able to successfully update the way I described.
I'm betting that it had something to do with the fact that the server is Ubuntu based (Mint) rather than "pure" Debian (Stretch). But hey, no big deal. Just happy it now works.
Thanks again for pointing me in the right direction(s).
73,
Joe
The port number can be changed.
edit /lib/systemd/system/webproxy.service
See this line:
ExecStart=/usr/bin/node /opt/Web_Proxy/proxy.js 8080 2222
edit to taste and reboot.
73, Steve N4IRS
Hi Steve and all, Is possible change port 8080? This port is to use for the other machine.
Thank you.