Closed JackAdams closed 2 years ago
I'm still interested in the answer to the question about maintenance of this awesome package, but closing the issue, as I've been able to fix 2) and work around 1), and, moreover, neither was a problem with the package itself.
In /usr/local/lib/node_modules/pm2-meteor/lib/remoteTasks.js
change line 173 from:
cmd = cmdString(pm2mConf, `cd ${serverLocation} && node --version && npm install --production`);`
to
cmd = cmdString(pm2mConf, `cd ${serverLocation} && node --version && npm install --production && node npm-rebuild`);
Some things about the above:
pm2-meteor
that change will be gone and you'll need to add it in again/usr/local/lib/node_modules/
pm2-meteor
on my laptop often (the package itself hasn't been update for a couple of years), so that little change should be good for awhileIn case someone else come across the same problem:
When using Ubuntu 22 ...
On remote machine:
sudo pico /etc/ssh/sshd_config
Add the following at the end of the file:
PubkeyAcceptedKeyTypes=+ssh-rsa
PubkeyAcceptedAlgorithms=+ssh-rsa
Ciphers aes128-cbc,3des-cbc
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange>
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
Some of the above is probably superfluous (for instance, is read somewhere that PubkeyAcceptedKeyTypes is a deprecated alias for PubkeyAcceptedAlgorithms). It just took so long to get it working, I didn't want to remove anything from the config file and stuff it up again.
If this messes up your ability to ssh in from the terminal:
On dev machine:
pico /Users/<yourusername>/.ssh/config
Add this line to the file: (If you don't have this file, create it.)
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
If you're ssh'ing into multiple remote servers from your dev machine's terminal, you might want to put that last line in a host
block for the specific Ubuntu 22 server.
I love this sooo much but it hasn't really worked so well in recent years. Primarily:
1) Need to run
node npm-rebuild
in/opt/meteor-apps/myappname/bundle/programs/server
on the remote server (since Meteor 2.3 update) before the app will run. Pretty sure node and npm versions are the same everywhere (Mac where I'm building, dev instance of Meteor app, and remove server)2) It won't deploy to Ubuntu 22 server using identical deploy config (was working on Ubuntu 16). I've tried to set up the Ubuntu servers identically as well, but maybe something I done too ...