DVSwitch Dashboard Web Port


IZ1XBB - Pier Paolo
 

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?


Steve N4IRS
 

/etc/lighttpd/lighttpd.conf

On 12/8/20 6:37 AM, IZ1XBB - Pier Paolo wrote:

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?



Joe, WB3IHY
 

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?


Steve N4IRS
 

What port did you move the dashboard to? RX Monitor uses port 8080.

Steve N4IRS

On 12/8/20 7:07 PM, Joe, WB3IHY wrote:

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?


IZ1XBB - Pier Paolo
 

All done! Now is all OK! Thank you for the help!!!


Joe, WB3IHY
 

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.


Mike Zingman - N4IRR
 

That port is in the  privileged range. Please use a port number > 1000


Joe, WB3IHY
 

Okay.  Changed it to port 8888.  No difference in the RX Monitor problem.


Steve N4IRS
 

What does netstat -tnap show as root?

Sent via smoke signal (AT&T)


From: main@DVSwitch.groups.io <main@DVSwitch.groups.io> on behalf of Joe, WB3IHY <groupsdotio@...>
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
 
Okay.  Changed it to port 8888.  No difference in the RX Monitor problem.


Joe, WB3IHY
 

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.


Steve N4IRS
 

On the non working node, try systemctl restart webproxy.

Check netstat

Look at /var/log/dvswitch/webroxy

 

From: Joe, WB3IHY
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.

 


Steve N4IRS
 

This is what I see on server.dvswitch.org when I set lighttpd to port 88:

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     


On 12/9/20 8:27 AM, Joe, WB3IHY wrote:

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.


Steve N4IRS
 

Is lightttpd running?
systemctl status lighttpd and/or
ps ax | grep lighttpd

On 12/9/20 1:06 PM, Joe, WB3IHY wrote:

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.


Joe, WB3IHY
 

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!


Steve N4IRS
 

Joe,
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

On 12/9/20 10:28 PM, Joe, WB3IHY wrote:

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!



Joe, WB3IHY
 

Steve,
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


EA4GAX - Sergio
 

Hi Steve and all, Is possible change port 8080? This port is to use for the other machine.
Thank you.


Steve N4IRS
 

Sergio,
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

On 12/20/20 6:38 AM, EA4GAX - Sergio wrote:

Hi Steve and all, Is possible change port 8080? This port is to use for the other machine.
Thank you.


EA4GAX - Sergio
 

Ok, excelent.
Thank yor