Closed Tellik closed 3 years ago
Seems python 2 rears its ugly head once again... seems that a method was changed to return a file object opened with bytes instead of being normal. Luckily I implemented a fix on my fork of mark2 for testing purposes to confirm it works for you Mind trying it out?
git remote add column https://github.com/Column01/mark2.git
git pull column master
mark2 config
I will also need to update the arch guide, it was ported from the old one without testing as I run debian. Did using pip3 install -r requirements.txt
suffice for adding them?
I will also need to update the arch guide, it was ported from the old one without testing as I run debian. Did using
pip3 install -r requirements.txt
suffice for adding them?
Yes, either pip or pip3 worked and accomplished the same requirements. I'll check the forked fix here in a moment.
Seems python 2 rears its ugly head once again... seems that a method was changed to return a file object opened with bytes instead of being normal. Luckily I implemented a fix on my fork of mark2 for testing purposes to confirm it works for you Mind trying it out?
git remote add column https://github.com/Column01/mark2.git git pull column master mark2 config
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), 442 bytes | 442.00 KiB/s, done.
From https://github.com/Column01/mark2
branch master -> FETCH_HEAD
[new branch] master -> column/master
Updating 5201ca2..4669f21
Fast-forward
mk2/launcher.py | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
Perfect, works fine.
Config option pulls up nano with the config file, which is kind of weird because it shoves the mark2.properties in ~/.config/mark2/mark2.properties. I'm guessing that it no longer is needing /etc/mark2/*?
Running mark2 start (without changing anything) also works, says it can't find the server jar like I"d expect and stops. So I'll work on finishing this setup.
The other error that I'm seeing, probably because I'm doing it wrong, but it doesn't error out cleanly, is by running mark2 jar-list:
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/twisted/internet/base.py", line 503, in fireEvent
DeferredList(beforeResults).addCallback(self._continueFiring)
File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 339, in addCallback
return self.addCallbacks(callback, callbackArgs=args, callbackKeywords=kw)
File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 330, in addCallbacks
self._runCallbacks()
File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks
current.result = callback(current.result, *args, **kw)
--- <exception caught here> ---
File "/usr/lib/python3.9/site-packages/twisted/internet/base.py", line 515, in _continueFiring
callable(*args, **kwargs)
File "/home/tellik/mark2/mk2/launcher.py", line 565, in start
d = servers.jar_list()
File "/home/tellik/mark2/mk2/servers/__init__.py", line 121, in jar_list
d = get_raw()
File "/home/tellik/mark2/mk2/servers/__init__.py", line 87, in get_raw
mod.ref(d)
File "/home/tellik/mark2/mk2/servers/__init__.py", line 36, in __init__
self.work()
File "/home/tellik/mark2/mk2/servers/vanilla.py", line 8, in work
self.get(self.base + 'versions.json', self.handle_data)
File "/home/tellik/mark2/mk2/servers/__init__.py", line 39, in get
d = getPage(str(url))
File "/usr/lib/python3.9/site-packages/twisted/python/deprecate.py", line 298, in deprecatedFunction
return function(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/twisted/web/client.py", line 814, in getPage
return _makeGetterFactory(
File "/usr/lib/python3.9/site-packages/twisted/web/client.py", line 760, in _makeGetterFactory
uri = URI.fromBytes(_ensureValidURI(url.strip()))
File "/usr/lib/python3.9/site-packages/twisted/web/_newclient.py", line 634, in _ensureValidURI
if _VALID_URI.match(uri):
builtins.TypeError: cannot use a bytes pattern on a string-like object
But, let me work with this and see if I can get it running and I should be good at least for this situation.
Mark2's jar system is no longer supported at this time, it needs some serious updating and is not on my list of things to fix at this time.
Mark2 will generate a default configuration file in .config/mark2
for use if none is present in the server directory. You will need to add a mark2.properties
file to the server directory and edit the value to point to the server jar you wish to use (see the samples directory for an example mark2.properties
to place in a server directory). It doesn't need to be the full file that mark2 config
generates, it only needs changes you want to make inside it (for example changing the jar path or memory limits).
Also, this implementation is actually going to be changed when #133 gets implemented and it might fix this particular issue
Ah, got it. I'll ignore that option then.
Finished setting things up and it worked with getting a server running.
One issue I did run into was in the config file for possible speed-ups, I had an option set "G1NewSizePercent" that is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions. However, I had the config file line uncommented and active for "java.cli.XX.UnlockExperimentalVMOptions=true". My guess is that those don't work, but I was able to add my testing java launch arguments to the prepend config file part and they were all used correctly.
Other than that, everything's really clean and good. Thanks for your assistance.
The JVM arguments should be placed in order of how they are laid out in the config. So if you put java.cli.XX.UnlockExperimentalVMOptions=true
at the top it would load it first which enables the other options you wanted to use. Although prepend does work too 😄
Gonna close this, if you need any other help, join the discord server and post a message in the support channel
Ahhh, that makes more sense then. No worries, everything is resolved. Thank you again.
Ended up updating the jar system to work again for vanilla jars. Figured it was useful and I was motivated... not gonna get into how much of a nightmare it actually was...
Installation Path:
Started with cloning the git, and then ln -s the bin file. Verified that all packages were installed according to the Arch section:
Even though it isn't in the Arch section, I went ahead and pip installed the requirements.txt as well.
So now that I'm sure I have the installation correct, hopefully, this is the problem where I'm at:
I went ahead and tried mark2 start, which told me it was unconfigured and to run the config. This is what I see when I try to run config.
I also tried the other method, of making the directory /etc/mark2 and touching the mark2.properties to generate the file, that didn't work.
I get some other errors, but since it isn't configured completely I'll hold off on those.