mcpeserver icon indicating copy to clipboard operation
mcpeserver copied to clipboard

more than one server-instance

Open Shizzlebix opened this issue 7 years ago • 20 comments

Hey there,

it would be nice to use more than just one instance of this server.

My Problem... i play with collegue (survival) but my daughter want´s to play creative with her friends.... i had add a second config but it will not work :(

Shizzlebix avatar Sep 15 '18 09:09 Shizzlebix

@Shizzlebix you meay need to specify a different port for it (IPv6 and IPv4 port

codehz avatar Sep 15 '18 10:09 codehz

no not ipv6

i mean that can start 2 instance with 2 different config files.

for example:

mcpserver -c config1 run (port 12345 / survival) - world 1 mcpserver -c config2 run (port 67591 / creative) - world 2

i hope you can understand that i mean?

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

you can use option --profile to select profile file (

mcpeserver run --profile default 
mcpeserver run --profile creative

you should copy the default.cfg to creative.cfg and change both of ports ( even you don't have IPv6 address, )

codehz avatar Sep 15 '18 11:09 codehz

The default profile is called default :)

codehz avatar Sep 15 '18 11:09 codehz

if this also functional with daemon mode? because i become a dbus error file exsist

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

if you're using the systemd service you can use systemctl start mcpeserver@default to launch default profile and systemctl start mcpeserver@creative to launch creative profile

codehz avatar Sep 15 '18 11:09 codehz

i start my server (normaly) with mcpserver daemon

so i wil lnow try too start it with mcpeserver deamon --profile default and mcpeserver daemon --profile creative

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

@Shizzlebix does it not working?

codehz avatar Sep 15 '18 11:09 codehz

BTW the daemon subcommand is internal usage ( only systemd can trace the daemon, or it will hard to manage

codehz avatar Sep 15 '18 11:09 codehz

systemctl start mcpeserver@kiara Failed to start [email protected]: Unit [email protected] not found

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

well, if you are using the script https://gist.github.com/codehz/610bdeba96fcec16e6339abae7208e7d you should answer "y" when it ask for installing systemd service

codehz avatar Sep 15 '18 11:09 codehz

of cause yes and it say failed :(

because

/usr/lib/systemd/system/

doesnt exsist on ubuntu 18.04

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

@Shizzlebix run this script again and paste the output ?

codehz avatar Sep 15 '18 11:09 codehz

/usr/lib/systemd/system/

doesnt exsist on ubuntu 18.04

just this ones are exsist in: /usr/lib/systemd/ boot catalog tests user user-environment-generators user-generators user-preset

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

Oh , Trying to execute sudo cp [email protected] /lib/systemd/system/

codehz avatar Sep 15 '18 11:09 codehz

after put the service to right place, exec killall bedrockserver and then try to starting server via systemctl

codehz avatar Sep 15 '18 11:09 codehz

i had copied it

` systemctl start mcpeserver@kiara

Job for [email protected] failed because a timeout was exceeded. See "systemctl status [email protected]" and "journalctl -xe" for details. root@mc:/srv# root@mc:/srv# root@mc:/srv# systemctl status [email protected][email protected] - Minecraft Bedrock Edition Server Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled) Active: activating (start) since Sat 2018-09-15 13:46:04 CEST; 6s ago Docs: https://github.com/codehz/mcpeserver Process: 3772 ExecStartPre=/usr/bin/install -dm 0755 -o root -g root /srv (code=exited, status=0/SUCCESS) Main PID: 3773 (mcpeserver) Tasks: 20 (limit: 4915) CGroup: /system.slice/system-mcpeserver.slice/[email protected] ├─3773 /srv/mcpeserver daemon -profile kiara -systemd └─3778 ./bin/bedrockserver kiara

Sep 15 13:46:07 mc bedrockserver[3778]: [AppPlatform] getInternalStoragePath: /srv/data Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Adding vanilla resource pack Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Adding world resource packs Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Initializing SaveTransactionManager Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Initializing ExternalFileLevelStorageSource Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Initializing ServerInstance Sep 15 13:46:07 mc bedrockserver[3778]: [Minecraft] NO LOG FILE! - IPv4 supported, port: 19190 Sep 15 13:46:07 mc bedrockserver[3778]: [Minecraft] NO LOG FILE! - IPv6 supported, port: 19193 Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Loading language data(de_DE) Sep 15 13:46:07 mc bedrockserver[3778]: [Bridge] Server initialized`

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

it run.... but why this error?

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix

@Shizzlebix the status show it is running... so I think it just fake alert

codehz avatar Sep 15 '18 11:09 codehz

i think it is running.... i will test both instances as soo as posible. many thanks

Shizzlebix avatar Sep 15 '18 11:09 Shizzlebix