-1

I am using GCP to run a game server and added a startup script to the VM to automatically run the gameserver in a screen, so if needed I can access the console to the server by re-attaching, the screen is starting and I am able to connect to the server so I know its their but I cannot find the screen using screen -ls

My startup script is:

#! /bin/bash
cd /home/minecraft
screen -dm java -Xmx3G -Xms2G -jar ./BTeam.jar nogui

After running screen -ls to find the screen to re-attach to it says there are no sockets to attach to.

Any help is appreciated.

asterisk
  • 1
  • 1

1 Answers1

0

Are you able to find screen running if you run

ps aux | grep -i screen

If so, please post the ENTIRE line that results from it (that isn't "grep -i screen")

Thanks!

Ryan Smith
  • 382
  • 3
  • 9
  • Nope, just shows the grep -i screen process, is it possible that the screen isn't running and that it just ran the command normally? – asterisk Apr 01 '19 at 16:20
  • I am however able to see the java process using `ps aux | grep -i java` it shows as `root 745 25.0 29.9 5733072 1365712 ? Sl 15:33 12:36 java -Xmx3G -Xms2G -jar ./BTeam.jar nogui` – asterisk Apr 01 '19 at 16:25
  • if you were to start screen, initiate your java process and then 'Ctrl-a d' Do you see it then? – Ryan Smith Apr 01 '19 at 19:30
  • It seems that the screen was not running in the startup script, which is odd. Not sure why it isn’t running I am going to give it a shot using a different multiplexer – asterisk Apr 02 '19 at 06:41
  • Could you solve your issue asterisk? If you did please put it as an answer so it could help other people. – Lozano Apr 17 '19 at 08:12