Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80
-
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I just followed the instructions in the MC guide.
Which is fine on its own, but limits you to the versions of NodeJS and NPM that come with the OS. You want one that is newer, which is not something that MC sets up for you. So in the one case you are following the instructions, but now you are not, so the mix is causing an issue. I never use NodeJS from the OS because it always causes problems for me (any OS, nothing to do with Ubuntu.) I've found that having version control is critical in the Node ecosystem. But MCs goal is to walk you through only enough ecosystem setup to get their app running.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I just followed the instructions in the MC guide.
Which is fine on its own, but limits you to the versions of NodeJS and NPM that come with the OS. You want one that is newer, which is not something that MC sets up for you. So in the one case you are following the instructions, but now you are not, so the mix is causing an issue. I never use NodeJS from the OS because it always causes problems for me (any OS, nothing to do with Ubuntu.) I've found that having version control is critical in the Node ecosystem. But MCs goal is to walk you through only enough ecosystem setup to get their app running.
I will keep this in mind for future deployments.
I have NVM installed, now using 6.9 of NVM and v12.2.0 of node. The npm error is now gone but the original problem still exists.
Will continue hunting.
-
Let's see the config file.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
Let's see the config file.
I believe you want the config.json file. Its a pretty generic file.
{ "__comment__" : "This is a sample configuration file, edit a section and remove the _ in front of the name. Refer to the user's guide for details.", "settings": { "WANonly": true, "_Minify": 1, "SessionTime": 30, "Port": 443, "RedirPort": 80, "_SelfUpdate": true, "newAccounts": 0, "UserAllowedIP": "External IP addresses", "_WebRtConfig": { "iceServers": [ { "urls": "stun:stun.services.mozilla.com" }, { "urls": "stun:stun.l.google.com:19302" } ] } }, "letsencrypt": { "email": "emailaddress", "names": "domainname.net", "rsaKeySize": 3072, "production": true }, "smtp": { "host": "smtp.gmail.com", "port": 465, "from": "from address", "user": "to address", "pass": "password", "tls": true } }
-
@pmoncho in your original post, you said that MC was moving itself to a different port. But in your netstat, MC wasn't running. What port is it going to?
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
is it goin
My apologies. It is going to 1024 and https to 1025.
That is the weird part. If something was hogging port 80, I would understand the move to higher ports as that is what MC does. Nothing shows on port 80 at all so that is what I cannot figure out.
Plus I know you had it working on U 19.04 so I was gungho for the upgrade.
-
I wonder if you need do this?
http://info.meshcentral.com/downloads/MeshCentral2/MeshCentral2InstallGuide-0.0.7.pdf -
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
My apologies. It is going to 1024 and https to 1025.
Did you forget to run as root? Those are unprivileged ports.
-
If you run as non-root (I know the new directions seem to point people to avoid this, but the ones we used when everyone originally got this up and running all pointed us to use root) you have a lot of additional complications that you likely want to avoid. I highly recommend sticking to root for almost anyone deploying this.
-
@black3dynamite said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I wonder if you need do this?
http://info.meshcentral.com/downloads/MeshCentral2/MeshCentral2InstallGuide-0.0.7.pdfThat did it. Ugh. I totally forgot about this because I upgrade from 16.04 to 18.04 to and then to 18.10 and did not have that issue. Apparently I now have that issue.
Thanks. Boy, I did learn alot over the last two days. Now I have a go to check in the future..
-
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
That did it. Ugh. I totally forgot about this because I upgrade from 16.04 to 18.04 to and then to 18.10 and did not have that issue. Apparently I now have that issue.
That setcap setting is "by the version", so if Node updates, the setting would need to update.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
If you run as non-root (I know the new directions seem to point people to avoid this, but the ones we used when everyone originally got this up and running all pointed us to use root) you have a lot of additional complications that you likely want to avoid. I highly recommend sticking to root for almost anyone deploying this.
I do run as a non-root user. I will probably install as root in the near future. I installed as non-root as it seemed more secure but I do see the issue that it presents also.
Thanks for the help.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
That did it. Ugh. I totally forgot about this because I upgrade from 16.04 to 18.04 to and then to 18.10 and did not have that issue. Apparently I now have that issue.
That setcap setting is "by the version", so if Node updates, the setting would need to update.
Thanks. I thought it was a OS thing. I didn't put 2 and 2 together. Ugh. I know better now.
-
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I installed as non-root as it seemed more secure but I do see the issue that it presents also.
Installing as root is one piece, running as root is another. You should be able to just run the current install as root to fix at least that problem.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I installed as non-root as it seemed more secure but I do see the issue that it presents also.
Installing as root is one piece, running as root is another. You should be able to just run the current install as root to fix at least that problem.
I would need to move it outside of home dir to something like /opt?
-
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I would need to move it outside of home dir to something like /opt?
Should, of course. No software ever goes in the /home directory. But need to? No, root can use any directory.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I would need to move it outside of home dir to something like /opt?
Should, of course. No software ever goes in the /home directory. But need to? No, root can use any directory.
Will work on this. Thanks
-
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I would need to move it outside of home dir to something like /opt?
Should, of course. No software ever goes in the /home directory. But need to? No, root can use any directory.
Will work on this. Thanks
If you are using NeDB, it is super simple to move the data file. If you are using MongoDB, the database is always still there on the same port.
-
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@scottalanmiller said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
@pmoncho said in Ubuntu 19.04 upgraded from 18.10 - Meshcentral not redirecting port 80:
I would need to move it outside of home dir to something like /opt?
Should, of course. No software ever goes in the /home directory. But need to? No, root can use any directory.
Will work on this. Thanks
If you are using NeDB, it is super simple to move the data file. If you are using MongoDB, the database is always still there on the same port.
Until MongoDB is gone!