jaredballou / srcds-controller

Automatically exported from code.google.com/p/srcds-controller
0 stars 0 forks source link

SRCDS won't start #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I believe I have all of the parameters set up properly but when I try to start 
the SRCDS instance I receive the 
following output in my console window:

Feb 7, 2010 7:15:04 PM [SourceDServerController] INFO: Server was terminated
Feb 7, 2010 7:15:04 PM [SourceDServerController] INFO: SRCDS path is left4dead2
Feb 7, 2010 7:15:04 PM [SourceDServerController] INFO: Game type is LEFT4DEAD2
Feb 7, 2010 7:15:04 PM [SourceDServerController] INFO: Process: [F:\Server\L4D2\
left4dead2\srcds.exe, -game left4dead2, +hostport 27015, -norestart, -console, -
secure, +map c1m1_hotel, +exec server.cfg]
Feb 7, 2010 7:15:04 PM [ServerOutputReader] INFO: Reading server output started
Feb 7, 2010 7:15:05 PM [ServerOutputReader] INFO: Reading server output stopped
Feb 7, 2010 7:15:06 PM [SourceDServerController] INFO: Server was terminated
Feb 7, 2010 7:15:06 PM [AbstractRegisteredHandler] WARNING: Exception in request
 handler '/start': de.eqc.srcds.exceptions.StartupFailedException: Unable to sta
rt server: Process was terminated during startup phase

This is the correct path to my srcds executable: 
F:\Server\L4D2\left4dead2\srcds.exe
I attached my config file. Is there a way to see more detailed error 
information?

I see this in the controller log file:
Feb 7, 2010 7:15:04 PM [ServerOutputReader] INFO: Reading server output started
Feb 7, 2010 7:15:05 PM [ServerOutputReader] FINE: #
Feb 7, 2010 7:15:05 PM [ServerOutputReader] FINE: #Console initialized.
Feb 7, 2010 7:15:05 PM [ServerOutputReader] FINE: #hl2\gameinfo.txt is missing.
Feb 7, 2010 7:15:05 PM [ServerOutputReader] FINE: #hl2\gameinfo.txt is missing.
Feb 7, 2010 7:15:05 PM [ServerOutputReader] INFO: Reading server output stopped

I love what you guys are doing here. A great free solution for us little guys 
who just want to set up a little 
server among friends.

Any help would be appreciated.. Thanks!
-Tom

Original issue reported on code.google.com by tsche...@gmail.com on 8 Feb 2010 at 12:30

Attachments:

GoogleCodeExporter commented 8 years ago
Honestly we didn't test the L4D2 support for Windows by now - so your input is 
highly
appreciated.

If I try to run "srcds.exe -console" using cmd.exe I got the same output as the
ServerOutputReader prints out:
#Console initialized.
#hl2\gameinfo.txt is missing.
#hl2\gameinfo.txt is missing

I'll look into this in more detail ASAP.

Original comment by hannes.s...@googlemail.com on 11 Feb 2010 at 7:04

GoogleCodeExporter commented 8 years ago

Original comment by hannes.s...@googlemail.com on 11 Feb 2010 at 7:04

GoogleCodeExporter commented 8 years ago

Original comment by hannes.s...@googlemail.com on 11 Feb 2010 at 7:05

GoogleCodeExporter commented 8 years ago
Is the server starting if you run it without the srcds controller or does it 
fail
also? The last log statement from the dying srcds.exe was:
#hl2\gameinfo.txt
Does this file exist?

Original comment by HolgerCr...@gmail.com on 11 Feb 2010 at 7:50

GoogleCodeExporter commented 8 years ago
The server does start when executing the command in a batch file but the server 
is down 
at the moment, plus I'm at work so I can't check.

I'll try to gain access later tonight and I'll post the command I use to start 
the 
server. I'll also check for the gameinfo.txt file.

Thanks for looking into this!

Original comment by tsche...@gmail.com on 11 Feb 2010 at 8:05

GoogleCodeExporter commented 8 years ago
I just recognized that the Java ProcessBuilder works slightly different if 
running on
a Windows machine. Command line parameters with an additional option have to be
passed as two items (e.g. "-game", "left4dead2") whereas Linux needs them to be 
a
single item.
I changed the code to deal with this and it seems to work fine. But now I ran 
into a
problem you find quite often mentioned on the internet. It seems like you cannot
execute srcds.exe directly from Java (according to some forum threads - same 
for C#).
The process terminates with following error message: 
"CTextConsoleWin32::GetLine:
!GetNumberOfConsoleInputEvents)".
It seems to work fine if I try to start it using e.g. "cmd /K" or a batch file, 
but
then the process runs completely independent from the controller - thus no way 
to
stop it and no live output available then.

Original comment by hannes.s...@googlemail.com on 11 Feb 2010 at 8:22

GoogleCodeExporter commented 8 years ago
BTW: The log output "hl2\gameinfo.txt" is a consequence of the fact that due to 
the
wrong handling of arguments by the controller, the "-game" parameter was not 
set.
This caused "-game" to be set to "hl2" - which is the default game for srcds.

Original comment by hannes.s...@googlemail.com on 11 Feb 2010 at 8:27

GoogleCodeExporter commented 8 years ago
That sounds rather discouraging so I gave it a google and I came across the 
same forum post you did. Explained 
exactly that and the example was in C#. So, I started a search to see if java 
can monitor an external program 
after launch.

I found this one article which makes it sound like you can do this.

<snippet page=4>
One additional improvement to TestExec would include a command-line switch to 
accept input from standard input. 
You would then use the Process.getOutputStream() method to pass the input to 
the spawned external program.
</snippet>

Link: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1

It's four pages which I just skimmed through but it looks possible.

Does this look feasible to you? Would SRCSD allow this kind of control?

Original comment by tsche...@gmail.com on 12 Feb 2010 at 1:42

GoogleCodeExporter commented 8 years ago
Thanks, we do it the same way.
This works under Linux and for most of the Windows processes, but srcds.exe 
behaves
strangely. However I managed to start and stop srcds.exe using the controller by
disabling the "live server output". If "live server output" is enabled you see 
the
first ~20 lines in the log, but then srcds.exe crashes with the error message I
mentioned above. I'll continue investigating this issue and will keep you 
posted on this.
@tscheick: If you're interested in this test version (without live output), I 
could
upload a jar file here.

Original comment by hannes.s...@googlemail.com on 12 Feb 2010 at 9:33

GoogleCodeExporter commented 8 years ago
That sounds great! I thought you couldn't interact with SRCDS at all. Viewing 
the 
server output would be a nice perk but it's not a requirement for me. If it 
works for 
starting/stopping the server, that's all I really need at the moment.

I would definitely like to try the test version without live output. I will be 
going 
away for the weekend, so it would be nice to give my friends access to 
start/stop the 
server if necessary.

Thanks!

Original comment by tsche...@gmail.com on 12 Feb 2010 at 4:02

GoogleCodeExporter commented 8 years ago
Is it possible to pull just a portion of the output without the server crashing?

I'm wondering if I can enter an rcon command and view the response. For 
example, I'd 
like to enter the "status" command to see if there are users connected, etc.

If not, I'll still try the test version - I'm just curious if this would be any 
different (I'm assuming it's not).

Original comment by tsche...@gmail.com on 12 Feb 2010 at 4:17

GoogleCodeExporter commented 8 years ago
Rcon should work fine, because it is completly independant from the output of 
the
process. But I'll try first and then provide you the test version.

Original comment by hannes.s...@googlemail.com on 12 Feb 2010 at 4:55

GoogleCodeExporter commented 8 years ago
@tscheick
Please keep in mind that you should change your rcon and srcds controller 
password.
After you have uploaded your configuration file, everyone with little java 
skills
could decrypt your passwords. 

Original comment by HolgerCr...@gmail.com on 12 Feb 2010 at 5:20

GoogleCodeExporter commented 8 years ago
I just finished testing and I'm sad to say that the test version doesn't work as
expected - means you have to wait a little longer. I'm not sure how long it'll 
take
to fix this, but I'll keep you posted.

Maybe we should think about letting srcds run as a service (see also:
http://code.google.com/p/srcds-controller/issues/detail?id=5).

Original comment by hannes.s...@googlemail.com on 12 Feb 2010 at 6:43

GoogleCodeExporter commented 8 years ago
@HolgerCremer Good point, I will change the password.

@hannes.scharmann That's alright, I will keep following your progress.

I appreciate the help!

Original comment by tsche...@gmail.com on 12 Feb 2010 at 6:48