mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
205 stars 44 forks source link

I just updated mark2 for the first time in years on my prod, and now its broken, help! #159

Closed TomLewis closed 2 years ago

TomLewis commented 2 years ago

I went to my /usr/mark2 and did a git pull Screenshot 2021-11-21 12 51 09 Quite a lot of changes, then I run mark2 list to make sure my services were still up (this is prod) and im getting errors!

 mark2 list
Traceback (most recent call last):
  File "/usr/bin/mark2", line 3, in <module>
    from mk2.launcher import main
  File "/usr/mark2/mk2/launcher.py", line 14, in <module>
    from . import manager
  File "/usr/mark2/mk2/manager.py", line 5, in <module>
    from twisted.internet import reactor
ModuleNotFoundError: No module named 'twisted'

Im shitting bricks as this is prod and this has been up and working for years, servers currently still up but if it crashes or it reboots tomorrow morning, it wont come back up.

Im sure I had twisted installed years ago, but its been years since I last changed anything with mark2, with all those changes, what do I need to do to fix it?

TomLewis commented 2 years ago

Crisis averted (I think?) I re-looked at the setup instructions and run

sudo apt-get install python3-pip xclip
sudo pip3 install -r requirements.txt

Which I needed to update pip too (as sudo for it to work) then it complained I used sudo!

Now It seems to be working again, but all my servers are still running, will I need to fully stop them and re-run them for changes to take effect? I'm surprised they stayed up to be fair

Edit: It gained tab support for usernames Woooo! thank god! Shame it cant auto-complete plugin tab for sub commands.

Column01 commented 2 years ago

Yes when you updated, you pulled python3 code into a python 3 environment with no modules which will not work properly. In order for you to get the new code running on servers you will also need to restart them all (I suggest taking them all down and bringing them back up only after that)

Column01 commented 2 years ago

Currently your servers are running using the python 2 code in a daemonized process and that's why the update didn't stop them, to make sure nothing goes wrong I suggest you restart them ASAP

Column01 commented 2 years ago

I'm going to close this and pin it so others don't make this same issue if it happens to them :P

To be fair my original intention was to make the py3 port into its own branch on the repo but gsand didn't bother so it was merged into master

TomLewis commented 2 years ago

Awesome, if its pinned I actually changed the git URL before I pulled too with git remote set-url origin https://github.com/mark2devel/mark2.git as mine was still set to https://github.com/gsand/mark2 I have no idea if this was required, but I'm logging it anyway in-case anyone else finds this on Google.

Quick one, for people like me that did this giant update, is there a set of changelogs I can read over to see what new features I gained?

Column01 commented 2 years ago

Changing the URL was not required, the closest thing to a changelog would be looking at the commit history, a changelog is going to be apart of the new project I started as per the discord announcement 😉

Column01 commented 2 years ago

Everything after this commit is new: https://github.com/mark2devel/mark2/commit/4b151cdf3fd7e12be28f768633c25ac1b4bef1da

Basic rundown: