Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msm <server-name> connected don't work! #159

Open
Karlsson-i-taket opened this issue May 30, 2013 · 12 comments
Open

msm <server-name> connected don't work! #159

Karlsson-i-taket opened this issue May 30, 2013 · 12 comments
Labels

Comments

@Karlsson-i-taket
Copy link

minecraft@sebastian:$ msm rpg-craft connected
No players are connected.
minecraft@sebastian:
$

I don't understand this i am logged in to minecraft at this server but when i write this command it does not show anyone. I have been reading in the forums and some others got the same problem i saw the #131 issue and i fixed it but it still don't work.
Please help i really need it.

@TrogloGeek
Copy link
Contributor

Hi,
First, please make sure that msm-version is correctly configured for your serveur (take a look at documentation if you don't know what I'm talking about).
If it's ok and still don't work, issue the connected command again, read server log and paste us the server's answer to the command. Obviously, you won't forget to give us the MSM and minecraft server versions you're using.

@Karlsson-i-taket
Copy link
Author

minecraft@sebastian:$ msm rpg-craft connected
No players are connected.
minecraft@sebastian:
$

MSM version was 0.8.16 beta and i'm using craftbukkit/1.5.2

@Karlsson-i-taket
Copy link
Author

And i also saw now that if i write:

minecraft@sebastian:$ msm rpg-craft connected
No players are connected.
minecraft@sebastian:
$

I displayed this on msm rpg-craft console:

There are 1 out of maximum 20 players online.
Connected players: xXIQue_KillerzXx

Every time i write msm rpg-craft connected it display on the console

@IronTetsubo
Copy link
Contributor

attach your server log, please (stick it in pastebin, or use gist) - it's likely that msm isn't parsing it properly, but I don't use craftbukkit, so it's harder for me to see. What you're pasting is what it's matching on, so something's strange - maybe a look at the whole server log will help.

@IronTetsubo
Copy link
Contributor

I use ftb direwolf20, and vanilla mc. I'm working on a patch to add ftb support for the various servers.

@marcuswhybrow
Copy link

For now you could use msm <server-name> cmdlog list. This will issue the /list command and then log the output to stdout.

The cause of this issue is different Minecraft server versions returning the list of players from the /list command in different formats. Therefore MSM has to handle every eventuality (which is hard).


Taking one step back, I'm thinking MSM should stop trying to stand between you and your Minecraft server's commands in general by giving you raw access only; looking something like cmd/cmdlog does. Who want's to learn MSM's idiosyncrasies on top of all the Minecraft commands anyway?

@IronTetsubo
Copy link
Contributor

It's nice to have a standard way to do this that wraps up the various idiosyncrasies of the server jars being used to present one standard way to interact with the minecraft server. So, I recommend continuing down the road you're heading, and maybe the fix here is to update the docs/interface to make it clearer that "cmd/cmdlog" is the way to interact with the server if the various wrapper calls aren't working.

@ghost
Copy link

ghost commented Dec 9, 2013

Sorry to revive this but I'm trying to find a work around. msm <server-name> cmdlog list doesn't seem to play nice with 1.7.2. It's not a big deal since I can run the /list command manually but it was super convenient to just use the msm <server-name> connected command to get a quick list. It's my understanding that it'd be difficult to to accept all the different output formats from Minecraft but I was wondering if there was a quick/dirty way of just getting it to regurgitate all connected users.

Any help would be appreciated. If using the msm <server-name> connected wrapper is being deprecated due to the many varying server outputs, so be it.

Thanks.

@BADproducts
Copy link

Proposed Solution

Minecraft changed its log file location and format in 1.7.2 as follows:

  • server.log changed to latest.log
  • latest.log contains only the current days log entries
  • log entry format removed the date and added brackets around the time, and removed colon.
  • text of the number of users on changed

my solution breaks backwards comparability however it could be modified easily to be backwards compatible.
MSM

  • update server_log_get_line() line:
local regex="${LOG_REGEX} ($3)"

with:

local regex="${LOG_REGEX}: ($3)"

note the semi colon.

  • update server_log_get_line() after line
while read -t $4 line; do

with the following:

[[ $line =~ ^\[(.*)\][[:space:]](.*) ]]
line="`date +%Y-%m-%d` ${BASH_REMATCH[1]} ${BASH_REMATCH[2]}"

This brings the log file in line with the expected format (needed because UNIX time is used).
versioning / minecraft / 1.7.0.sh

  • create versioning / minecraft / 1.7.0.sh
  • contents copied from 1.3.0.sh
  • update line after
console_command CONNECTED "list" \

to the following:

"There are ([1-9][0-9]*)/([0-9]+) players online:$" \

notes
i had to delete server.log and then add symbolic link to the latest.log (debian) as folows:

ln -s ./logs/latest.log ./server.log

I'm not sure of the best method to handle this with the MSM script set.

@msashlee
Copy link

I am having this issue on Minecraft 1.8.8 MSM version 0.9.2. Is the only fix to follow the above?

@renderorange
Copy link
Contributor

Hello msashlee, are you referring to the log issue noted above, or the OP about the connected command? If about the log location, there are some current commits being pushed which solve this issue.

@lhwn5407
Copy link

Paper or Spigot solution

If you are using Paper 1.16.x or higher, you can fix this by adding the following Versioning directories and files.

mkdir /opt/msm/versioning/paper
cd /opt/msm/versioning/paper
touch 1.16.0.sh

Now use vim to edit the 1.16.0.sh file as follows:

# vim 1.16.0.sh
# MSM version file for Paper 1.16.0 and above

extends "minecraft/1.7.0"

console_command CONNECTED "list" \
  ".+:(.+)?$" \
  "$"

Modify the msm-version of the server.properties file under the server working directory to specify the version to use.
A typical location is /opt/msm/servers/<server-name>/server.properties.

# vim /opt/msm/servers/<server-name>/server.properties
msm-version=paper/1.16.0

This is the end! Now msm <server-name> connected works magically.

# msm <server-name> connected
There are 1 of a max of 20 players online: abcd1234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants