Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: Nihongo^ on Sep 14, 2016, 08:17 AM

Title: Linux server run
Post by: Nihongo^ on Sep 14, 2016, 08:17 AM
im trying to run server on my Linux vps ( 64 bit )

i have few questions

how can i run server i mean commands  ( when i use this command  -allow-server-runas-root the server start but after close the putty server also off how can i fix it ?

how can i restart or turn off the server  ( when i again try to run server it said port already in use but the server is off )

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi65.tinypic.com%2Fnqy1w8.png&hash=8ee3be311f896a4ceeec87c39096a4c13d560fcd)
Title: Re: Linux server run
Post by: ysc3839 on Sep 14, 2016, 09:43 AM
Use the `screen` command.
First, use `screen -S sessionname` to start a new session. Eg `screen -S vcmp`.
Then, start the server normally.

After started the server. Click Ctrl+A+D to return to main session. Then you can disconnect, the server is still running.

When you want to go back. Use `screen -r sessionname`. Eg `screen -r vcmp`.

You can use `screen -ls` to see all running sessions.

Here is a full tutorial of screen: https://www.linux.com/learn/taking-command-terminal-gnu-screen
Title: Re: Linux server run
Post by: Xmair on Sep 14, 2016, 09:44 AM
The 8192 port is used somewhere. Try using 'killall mpsvrrel64'.
Title: Re: Linux server run
Post by: . on Sep 14, 2016, 09:45 AM
@Xmair he tried 'killall' but if you notice he couldn't make the difference between a command and an executable file. So he used './killall'




Quote from: ysc3839 on Sep 14, 2016, 09:43 AMUse the `screen` command.

I'm guessing that the next error will be "-bash: screen: command not found" so be ready to answer that too :D



@OP I don't really get you people. You don't know the very first thing about something and yet you insist on using it.

And if you can't read the message in that image "Port in use?" then how dahell did you even reached this age without getting hit by a car or something.

Yes, I might sound a bit harsh but come on.
Title: Re: Linux server run
Post by: Nihongo^ on Sep 14, 2016, 10:31 AM
Thanks ysc3839 its work but still problem how can i restart or turn it off
+
its still saying port in use after using killall
Title: Re: Linux server run
Post by: ysc3839 on Sep 14, 2016, 02:47 PM
Quote from: Nihongo^ on Sep 14, 2016, 10:31 AMThanks ysc3839 its work but still problem how can i restart or turn it off
+
its still saying port in use after using killall
Restart the whole server using `reboot`. If it don't works. Try to run as root.
Title: Re: Linux server run
Post by: aXXo on Sep 14, 2016, 04:51 PM
Run the command 'ps aux' or 'top'
It will list all the processes running with their PIDs. Check if any VCMP server is running, and 'kill PID' to shut it.
Title: Re: Linux server run
Post by: Nihongo^ on Sep 14, 2016, 05:55 PM
Quote from: ysc3839 on Sep 14, 2016, 02:47 PM
Quote from: Nihongo^ on Sep 14, 2016, 10:31 AMThanks ysc3839 its work but still problem how can i restart or turn it off
+
its still saying port in use after using killall
Restart the whole server using `reboot`. If it don't works. Try to run as root.

i try this but its stuck when i use that command

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi67.tinypic.com%2Foh3by1.png&hash=b8eb8e8a32a3b0c6c1c418f5807d6e5a69ff4232)

Quote from: aXXo on Sep 14, 2016, 04:51 PMRun the command 'ps aux' or 'top'
It will list all the processes running with their PIDs. Check if any VCMP server is running, and 'kill PID' to shut it.
Thanks aXXo its really works for me :D but any other solution to restart the server ? instead of kill them again and again
Title: Re: Linux server run
Post by: Nihongo^ on Sep 14, 2016, 06:11 PM
@edit that cmd top and ps aux work but now its not showing the server name in list  :/
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi65.tinypic.com%2F2ibdlbo.png&hash=79b5f66d7877097b34074f7a4510c0ccb1c3e5c0)

in list
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi63.tinypic.com%2Fv6rqit.png&hash=9bb6f6c7237f4b8acdcf733ad32ec31824d7daa5)
Title: Re: Linux server run
Post by: ysc3839 on Sep 15, 2016, 12:43 AM
Quote from: Nihongo^ on Sep 14, 2016, 06:11 PM@edit that cmd top and ps aux work but now its not showing the server name in list  :/
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi65.tinypic.com%2F2ibdlbo.png&hash=79b5f66d7877097b34074f7a4510c0ccb1c3e5c0)

in list
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi63.tinypic.com%2Fv6rqit.png&hash=9bb6f6c7237f4b8acdcf733ad32ec31824d7daa5)
I think it's your OS's issue. It refuses you bind a port.
Title: Re: Linux server run
Post by: Shovon^ on Sep 15, 2016, 03:29 AM
Use a very different port ex 5194 or some other ports
Title: Re: Linux server run
Post by: EK.IceFlake on Sep 15, 2016, 04:37 AM
Why are you trying to run it as root?
useradd vcmp
su vcmp
//screen stuff here
./mpsvrrel64

fix no screen:
[on debian]
apt-get install screen
[assuming you are on root, otherwise prefix it with 'sudo ']



To answer your question, you need to make a script that saves its PID in some file, and restart uses pkill from its PID and start a new one and save the new PID