[Mono-list] Service problem
andreas.faerber at web.de
Mon Feb 27 20:03:09 EST 2006
I'm experiencing a weird problem with a Service on FC4... It's basically
a multithreaded TcpListener based server. When I run it as a standard
console application it works fine; now I'm attempting to transform it
into a mono-service based daemon and it does not work. Specifically the
problem is that on the client side I do not receive anything (length of
zero) when the server is run with mono-service.
The service appears to start correctly (according to /var/log/messages),
I can connect to it via TCP and send it a SOAP request. On the client
side (Windows/.NET, Mac/Mono) TcpClient's NetworkStream.Read reads zero
bytes and returns. Afterwards the daemon (started manually with an init
script) is no longer existant, with no new message in /var/log/messages.
Does this indicate Mono crashed, or doesn't mono-service output anything
when it stops the service? (and I do not stop it)
Using MSSoapT as intermediary I am however seeing a complete response in
the trace (while the client still does not receive it), only that it
does not change as expected (using Guid.NewGuid()); and if I use the
same classes in a console app it works as expected.
Reading that stdout is redirected to /dev/null for mono-service I have
double-checked for Console.WriteLine calls and replaced them with
Console.Error.WriteLine, but still no indication in /var/log/messages
after "mono: [...].exe Service [...] started".
The assemblies are within my home directory and owned by me, the init
script is symlinked from /etc/init.d into my home directory and owned by
root (symlink root:root, file root:me).
More information about the Mono-list