mark2devel / mark2 Goto Github PK
View Code? Open in Web Editor NEWMinecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
License: Other
Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
License: Other
When '~restart ' is used on a bungee-instance the broadcasts should be sent with 'alert ' instead of 'say as BungeeCoord doesn't support it.
Same for ~stop, 'end' has to be used instead of 'stop'
Traceback (most recent call last):
File "/usr/local/bin/mark2", line 6, in
sys.exit(main())
File "/home/minecraft/mark2/mk2/launcher.py", line 611, in main
command.start()
File "/home/minecraft/mark2/mk2/launcher.py", line 126, in start
self.run()
File "/home/minecraft/mark2/mk2/launcher.py", line 506, in run
f = user_client.UserClientFactory(self.server_name, self.shared_path)
File "/home/minecraft/mark2/mk2/user_client.py", line 456, in init
self.ui = UI(self.config.get_palette(), self.get_players, self.run_command, self.switch_server, self.connect_to_server, self.config.get_player_actions(), self.config.get_player_reasons())
File "/home/minecraft/mark2/mk2/user_client.py", line 211, in init
self.build()
File "/home/minecraft/mark2/mk2/user_client.py", line 217, in build
g_head = urwid.AttrMap(urwid.Columns((('weight', 3, self.g_servers), self.g_users)), 'head')
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1092, in init
if focus_column is None and w.selectable():
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1411, in selectable
return self.widget_list[self.focus_col].selectable()
IndexError: list index out of range
Got this when i try to mark2 attach, what's wrong?
Hey,
Is there any way to make copy and paste work? paste into the input line and mark/copy from the console? If not, any chance of implementation? For us it would be highly useful and one of the biggest things we miss since using mark2.
Im a little anxious asking this as you may think this is an easy task, but Im worried about breaking something, how do I go about updating Mark2 without breaking anything? im using Debian 6
Hey,
is there any way to send a command to all servers? When I use mark2 send
the command gets send to the first server (alphabetical order). It would ease the management in terms of a global restart/stop.. Current use case for me is updating mark2, which requires all servers to be stopped.
I can't seem to resolve this issue. Any help would be appreciated! :)
xxx@xxxxx:/home/minecraft/hub$ mark2 start
Traceback (most recent call last):
File "/usr/local/bin/mark2", line 6, in
sys.exit(main())
File "/usr/local/share/mark2/mk2/launcher.py", line 611, in main
command.start()
File "/usr/local/share/mark2/mk2/launcher.py", line 125, in start
b.do_start(self)
File "/usr/local/share/mark2/mk2/launcher.py", line 150, in do_start
os.remove(path)
OSError: [Errno 1] Operation not permitted: '/tmp/mark2/hub.pid'
How does one use custom jar files with this? such as Crackpack, FTb, Tekkit, etc.
Thank you,
Eggonomicon
Whenever my server crashes, it doesn't reboot since it displays the stacktrace then runs the stop command. Is there a way to fix this?
Hey,
what are the thoughts about color support? For me with a busy console output it is pretty helpful to identify the important things. E.g. you start a backup before you shutdown the server for an upgrade. The console is busy by writing one page each 1-2 seconds. The single line that says "Backup successful" is hard to spot, hence it is green, but with mark2 those colors do not show.
None of the push services are really used any more, Pushbullet is the go-to push service nowerdays as its Cross platform and gigantic userbase, plus the API is really, really easy to work with, I managed to get it working using a simple curl request!
http://www.pratermade.com/2014/08/use-pushbullet-to-send-notifications-from-your-pi-to-your-phone/
To push when anything bad happens!
Hello,
I recently stopped BungeeCord by typing 'end'. Everything worked just fine, but for some reason, I was suddenly attached to the screen of another user!
This is a security problem, allowing anyone to attach to somebody else's screens.
I just upgraded from mcdevs to this and now everyserver restarts because mark2 thinks it crashed.
EDIT: nvm had to change the unknown command on the mark2 folder not in the server folder.
Is this a working feature? I cannot seem to get it to work. Not exactly sure what to set "use-filter" equal to in mark2rc.properties. Thanks.
How would I give a user permission to start and see the console of a serveR?
I was wondering if it would be possible to add something that can rotate backups, or if you had another solution to offer that's compatible with mark2. Thanks.
If you include a Minecraft colour code sequence (using the unicode section sign, U+00A7) in mark2.properties, then mark2 fails to start.
When this happens, mark2 commands like ~stop, ~restart are rendered non-functional.
Mark2's initialisation sequence is, in part:
When there is a unicode character in mark2.properties, an exception is raised:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
at: https://github.com/gsand/mark2/blob/master/mk2/properties.py#L80
However, it is not possible to see this exception because standard output is /dev/null and the Twisted log file isn't open yet. You have to add custom debug logging to mark2 to see this happen, and you can't use print
because stdout is dead.
So I raise this issue partly as a warning to others and of course to see if mark2 can more gracefully handle unicode in its config.
After putting in the settings for my backup to be made, im getting:
cowardly refusing to create an empty archive
the backup folder is created but no tar is being created.
###
# BACKUP
# Compresses the world folders to a .tar.gz
# Provides ~backup command
plugin.backup.enabled=true
plugin.backup.path=backups/{timestamp}.tar.gz
# mode
# include: back up only the paths in 'spec'
# exclude: back up everything in the server directory except the paths in 'spec
plugin.backup.mode=include
# Semicolon separated paths to include or exclude, depending on mode
plugin.backup.spec=hub
# Flags to pass to `tar`
plugin.backup.tar-flags=-hpczf
# How long to wait after issuing `save-off` for minecraft to finish writing chunks (seconds)
plugin.backup.flush-wait=5
I get Unknown Command every minute in the server logs, starting immediately after the server starts and continuing... I'm using the serverstopped, userattach, userdetach, playerchat, playerjoin, playerquit, and playerdeath commands in scripts.txt
. I'm using the alert plugin, backup plugin, and rss plugin. mark2 is up to date.
[08:01:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
[08:02:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
[08:03:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
[08:04:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
[08:05:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
[08:06:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
[08:07:11] [Server thread/INFO]: Unknown command. Try /help for a list of commands
Any ideas?
For unknown reasons I have a new spigot instance running on bungeecord the same setup of plugins I use on another server, and another world that I have scanned for any issues, Out of the blue just shuts down the server the only error message that I can see is:
server might have crashed: not accepting accepting console commands or crash-unknown-cmd-message is not set -- restarting
Which is mark2 error, what is happening? and how can I stop the server just shutting down when everything should be working? This seems to have only started since I set the spigot.yml bungeecord: true.
When I use page up & page down to scroll through the history of events from the console, it only seems to show a few hundred lines, I need to find a way to show about 25x the amount of history to sroll back to, is there an option to set the amount of lines that can be scrolled back to?
I have tried looking through the property files here:
https://github.com/gsand/mark2/tree/master/mk2/resources
But im not really sure what to look for..
If the Event.prefilter method throws an exception due to invalid prefilter arguments, such as an invalid regex for the ServerOutput event, it will spam the console with the error log whenever the event is called. The resulting error message makes it difficult to trace down the rogue arguments though, as it does not contain any information on the source. This is rather bad as some of these regexes are defined via the config files and can therefor be edited by non-programmers. So, I'd suggest some kind of pre-validation of the prefilter arguments when the event is registered.
So ive been using mark2 as my main servers wrapper a few days now, and its just not working very nice. That small box at the bottom where you type things, has a good 30 second lag on each letter being entered, most times I cant even select it or type in it, its infuriating.
Not only that, you cant paste into it!
Same goes for trying to click any of the other servers that are currently running, nearly impossible to switch, theres a good massive amount of lag.
I'm a rookie mac user. Using the macbook I'm currently typing this with, I'm unable to switch servers using ctrl + arrow keys as that is overridden by the OS. I was thinking it might be appropriate to change it to something else, such as alt or maybe shift. I would advise against alt as it seems that it is usually used to scroll through words on linux and osx. Maybe even ctrl + h (left) or l (right).
Is there any hot key or attach argument to hide the side bar? Using mark2 on a mobile device is nearly impossible: https://i.imgur.com/z2E1JEK.png
would be great if there is a command to see the time left until the next server restart.
Hello,
I am suggesting that support for bungeecord is added
Currently running the restart/stop via mark2 command causes it to kill bungeecord as bungeecord uses "end" instead of "stop".
It also has a different output for when it finishes running, which is "Listening on "
Hey,
is there a feature build in which allows me to execute commands/events/scripts based on a servers uptime. So to say let it restart after it has been up for 6 hours instead of at 0, 6, 12, 18, 24 o'clock? The server does restart on its own every few minutes causing that the scheduler is restarting it after only a few minutes of uptime.
Ahoy!
I tried to customize the restart message to match what we have broardcast at present but it looks as if \n trys to run a command thats actually that, so a few questions, are the varaibles capable of running in-game commands?
How could I format a new line when customizing this message, and do colors work?
When a player leaves the server they are left behind on the mark2 playerlist.
Using latest version of mark2 from git and latest Spigot 1.8 build.
I just configured my first VPS, setup everything, got mark2 start a server (I can see it in my server list)
But right at the very last step, I cant attach to the running servers console! I can't believe I got this far and it broke, I followed everything in the INSTALL.md & USAGE.md.
This is the error I get in my console:
tom@piratecraft:~/piratecraft/games$ mark2 attach games
Traceback (most recent call last):
File "/usr/bin/mark2", line 6, in <module>
sys.exit(main())
File "/usr/mark2/mk2/launcher.py", line 611, in main
command.start()
File "/usr/mark2/mk2/launcher.py", line 126, in start
self.run()
File "/usr/mark2/mk2/launcher.py", line 506, in run
f = user_client.UserClientFactory(self.server_name, self.shared_path)
File "/usr/mark2/mk2/user_client.py", line 456, in __init__
self.ui = UI(self.config.get_palette(), self.get_players, self.run_command, self.switch_server, self.connect_to_server, self.config.get_player_actions(), self.config.get_player_reasons())
File "/usr/mark2/mk2/user_client.py", line 211, in __init__
self.build()
File "/usr/mark2/mk2/user_client.py", line 217, in build
g_head = urwid.AttrMap(urwid.Columns((('weight', 3, self.g_servers), self.g_users)), 'head')
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1092, in __init__
if focus_column is None and w.selectable():
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1411, in selectable
return self.widget_list[self.focus_col].selectable()
IndexError: list index out of range
This is really more of a question,
Is there a way to use colors and or references like @p
in the mark2 scripts?
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "/usr/mark2/mk2/launcher.py", line 506, in run
f = user_client.UserClientFactory(self.server_name, self.shared_path)
File "/usr/mark2/mk2/user_client.py", line 466, in init
t.start(self.config.get_interval('users'))
File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 163, in start
self()
File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 208, in call
d = defer.maybeDeferred(self.f, _self.a, *_self.kw)
--- ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
result = f(_args, *_kw)
File "/usr/mark2/mk2/user_client.py", line 512, in update_users
self.system_users.update_users()
File "/usr/mark2/mk2/user_client.py", line 380, in update_users
for u in psutil.get_users():
exceptions.AttributeError: 'module' object has no attribute 'get_users'
Is there a way through scripts.txt or otherwise using Mark2 to execute ./start.sh in the server directory as soon as the server stops?
I am basically trying to have mark2 start a server back up as soon as it shuts down.
Hello,
I am trying to get mark2 to be executed via a script that is called via sudo from a PHP webpage. The command executes fine but it always prints 0 servers, e.g. when executing mark2 list
.
I also tried executing with the additional -b /tmp/mark2
param but mark2 list
still prints 0 servers event though when I execute it from the shell directly, it prints 7 servers.
Any thoughts?
// edit:
I am using the following PHP script to execute the mark2 restart script:
exec("/home/minecraft/scripts/restart-server.sh -e 'Test' -s $server", $output);
And this is the corresponding restart.sh
:
#!/bin/bash
scriptPath=${0%/*}
. "$scriptPath/common.sh"
# A POSIX variable
OPTIND=1 # Reset in case getopts has been used previously in the shell.
environment="Test"
server="Azuran"
while getopts "e:s:" opt; do
case "$opt" in
e) environment=$OPTARG
;;
s) server=$OPTARG
;;
esac
done
echo "mark2 -b /tmp/mark2 list"
mark2 list -b /tmp/mark2/
echo "mark2 send -n \"$environment|$server\" \"~restart 10s\""
mark2 send -n "$environment|$server" "~restart 10s"
wait
Hi, I would like to know if it's possible to translate variables like {delay}. For example I want to translate:
plugin.save.warn-message=WARNING: saving map in {delay}.
to Spanish, so:
plugin.save.warn-message=AVISO: guardando mapa en {delay}.
But when the message shows the following image where "minute" should say "minuto" for Spanish. Is it possible to translate the variables?
Thanks!!
Hi,
We have different administrators for different servers, they have different user accounts preserver.
As it is now one user can access the mark2 and attach to other servers that they should not have access to.
It's not a big deal as i trust those with shell access it's more for cleanse then any thing.
Sometimes managing multiple servers in mark2 can be a bit confusing as you mix up servers.
I'd like it to highlight the tab which is currently active (Maybe just invert?).
If there's a way to do this already, let me know.
I would love a way to use the trigger itself in the response to a trigger. For example, set a trigger for @PlayerChat that includes the chat itself in its response. AFAIK, I have to parse the log file to get the chat message.
@PlayerChat $[do something with] ~PlayerChat
Likewise, I'd like to be able to tell who triggered a PlayerDeath, a Join or Leave, etc.
I get this error when attaching.
I am using Debian 7
Traceback (most recent call last):
File "/usr/bin/mark2", line 6, in
sys.exit(main())
File "/usr/mark2/mk2/launcher.py", line 611, in main
command.start()
File "/usr/mark2/mk2/launcher.py", line 126, in start
self.run()
File "/usr/mark2/mk2/launcher.py", line 506, in run
f = user_client.UserClientFactory(self.server_name, self.shared_path)
File "/usr/mark2/mk2/user_client.py", line 456, in init
self.ui = UI(self.config.get_palette(), self.get_players, self.run_command, self.switch_server, self.connect_to_server, self.config.get_player_actions(), self.config.get_player_reasons())
File "/usr/mark2/mk2/user_client.py", line 211, in init
self.build()
File "/usr/mark2/mk2/user_client.py", line 217, in build
g_head = urwid.AttrMap(urwid.Columns((('weight', 3, self.g_servers), self.g_users)), 'head')
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1092, in init
if focus_column is None and w.selectable():
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1411, in selectable
return self.widget_list[self.focus_col].selectable()
IndexError: list index out of range
I'm trying to run an FTB Infinity server but it crashes every 1m 42s when using mark2. If I run it straight from the command line, it runs without issue.
My mark2.properties is as follows:
java.cli.X.ms=1G
java.cli.X.mx=8G
java.cli.XX.MaxPermSize=256M
java.cli.XX.UseParNewGC=true
java.cli.XX.CMSIncrementalPacing=true
java.cli.XX.ParallelGCThreads=2
java.cli.XX.MinHeapFreeRatio=5
java.cli.XX.MaxHeapFreeRatio=10
java.cli-extra=-server -d64
mark2.jar-path=FTBServer*.jar
From my logs after mark2 starts until it restarts the server:
2015-06-04 16:45:07 # mark2 started.
2015-06-04 16:45:07 | Done (4.341s)! For help, type "help" or "?"
2015-06-04 16:45:07 | [Galacticraft]: Registered Dimension: -30
2015-06-04 16:45:07 | [Galacticraft]: Registered Dimension: -29
2015-06-04 16:45:07 | [Galacticraft]: Registered Dimension: -28
2015-06-04 16:45:07 # root attached
2015-06-04 16:45:07 | [neresources]: Loading compatibility for minecraft
2015-06-04 16:45:08 | [neresources]: Loading compatibility for CoFHCore
2015-06-04 16:45:08 | [neresources]: Metallurgy not loaded - skipping
2015-06-04 16:45:08 | [neresources]: Loading compatibility for NetherOres
2015-06-04 16:45:08 | [neresources]: Loading compatibility for BigReactors
2015-06-04 16:45:08 | [neresources]: Loading compatibility for appliedenergistics2
2015-06-04 16:45:08 | [neresources]: Loading compatibility for Thaumcraft
2015-06-04 16:45:08 | [neresources]: ElectriCraft not loaded - skipping
2015-06-04 16:45:08 | [neresources]: ReactorCraft not loaded - skipping
2015-06-04 16:45:08 | [neresources]: Loading compatibility for Forestry
2015-06-04 16:45:08 | [neresources]: Loading compatibility for TConstruct
2015-06-04 16:45:08 | [neresources]: Loading compatibility for IC2
2015-06-04 16:45:08 | [neresources]: MobProperties not loaded - skipping
2015-06-04 16:45:08 | [JourneyMapServer]: World ID: eba56a00-40d5-41ec-95fc-4ba4f65b0cbf
2015-06-04 16:45:08 | [PortalGun]: [4.0.0-beta-4] Loading world properties.
2015-06-04 16:45:08 | [STDOUT]: [mcjty.rftools.RFTools:serverStarted:187]: ###### RFTools.serverStarted
2015-06-04 16:45:08 | [mcjty.rftools.RFTools]: Registering RFTools dimensions
2015-06-04 16:45:10 | [Galacticraft]: Galacticraft remote version found: 3.0.11
2015-06-04 16:45:26 | [FML]: Unloading dimension -7
2015-06-04 16:45:26 | [FML]: Unloading dimension -100
2015-06-04 16:45:26 | [FML]: Unloading dimension -37
2015-06-04 16:45:26 | [FML]: Unloading dimension -38
2015-06-04 16:45:26 | [FML]: Unloading dimension -39
2015-06-04 16:45:26 | [FML]: Unloading dimension -42
2015-06-04 16:45:26 | [FML]: Unloading dimension -19
2015-06-04 16:45:26 | [FML]: Unloading dimension 1
2015-06-04 16:47:07 # server has crashed -- restarting.
2015-06-04 16:47:07 # stopping ftb
When I type: python2 mark2 config I get:
Traceback (most recent call last):
File "./mark2", line 6, in <module>
sys.exit(main())
File "/home/jerzy/mc/mark2/mk2/launcher.py", line 611, in main
command.start()
File "/home/jerzy/mc/mark2/mk2/launcher.py", line 126, in start
self.run()
File "/home/jerzy/mc/mark2/mk2/launcher.py", line 485, in run
subprocess.call([editor, path_tmp])
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Hello ive been using mark2 for all my server but recently ive made a modpack server. Im using kcauldron bootstrap which needs the arguments "-r latest".
This is my config: http://pastebin.com/raw.php?i=LZhMdAqh
Maybe ive done something wrong or it just simply doesnt support all arguments you put in?
Hi, my BungeeCord server is restarting around every 3 minutes, in the console it says this:
http://pastebin.com/rDrZefmZ
I'm using this config for BungeeCord: http://pastebin.com/WMhsLwJE
And I'm using this config for mark2 for BungeeCord: http://pastebin.com/J3uHhHe8
I'm also using the alerts and script provided in the sample folder for bungeecord of mark2.
Please can you help me solve this?
Thank you :)
Hey gsand,
nice to see that you picked up the project. :)
Do you have some time and still interested on picking up on this feature?
barneygale/mark2#142
~hold [reason] - holds the server after the specified time with a configurable broadcast message and message on kick like "Server going into maintenance. Reason: {reason}"?
~unhold - starts the server back up
hey,
the gray color is shown as black in mark2 which makes it impossible to read.
I am interested in using the tellraw command instead of using say or msg as it adds a much nicer look and feel to things.
I can easily use it in the triggers and alerts plugins due to the way they are made (outputs the exact line from their respective text files).
However, I'd also like to use them with others such as the mumble, rss, save, & shutdown plugins.
I tried using escape characters to get them the others to work, but was unable to do so.
Hey,
would it be possible to let the page up/down scroll pages and not just a few lines? Idk, if it would be difficult regarding re-sizing. I really miss it from being used to screen, tmux, byobu.
Hi,
We just implemented mark2 for our servers at breakfastcraft.com and I have to say I'm liking mark2 very much coming from mineos before. We have an irc channel that connects all the server's chat.
the save message is quite spammy and we wanted to remove it.
there are no settings to remove the message so we tried blanking the messages. that would just spam a blank line in the irc chat. One of my admins does some python and tweaked the save.py (line 20) to check for blankplugin.save.warn-message=
and plugin.save.message=
in mark2.proprieties.
So I guess this is a enhancement request more than an issue.
def warn(self, delay):
if self.warn_message:
self.send_format(self.warn_command % self.warn_message, delay=delay)
Thanks.
Hi, I'm having problems with my spigot server, its restarting nearly every 3 minutes, here is the pastebin: http://pastebin.com/QwY5BHjr
Everything is black and white in the live console for Mark2, how can I get colors to show for colored items in the console? Like player names etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.