[Mono-list] mono-service doesn't start my service - no errors

Rafael Teixeira rafael.teixeirabr at terra.com.br
Sun Jan 21 15:38:46 EST 2007


Recently a fix for static constructors not being automatically called,
went into SVN, what looks like what you are telling. I think the fix
affects the in the native part of the runtime.

So, probably, you need to retest your case with a newer runtime compiled
from SVN head.

Hope it helps,

Rafael Teixeira

On Sun, 2007-01-21 at 08:40 -0800, jcmag wrote:
> >> but my service doesn't seem to start. I have no error messages,
> except:
> >> Jan 20 21:17:47 mylaptop mono: MyHal.Service.exe: Log file already
> exists:
> >> /tmp/MyHal.Service.exe.lock
> >
> >Try using /usr/bin/mono/usr/lib/mono/1.0/mono-service.exe
> >MyHal.Service.exe on a command line and see if there are any
> messages.
> 
> Same thing, no messages.
> 
> But I've found that the call to
> log4net.Config.XmlConfigurator.ConfigureAndWatch stops the programs.
> I've changed my Main method to:
> 
>             try
>             {
>                 error("Main1", "Begin"); 
>                  log4net.Config.XmlConfigurator.Configure(new
> FileInfo(System.IO.Path.GetFullPath("log4net.config")));
>                 error("Main1", "Begin2");
>                 ServiceBase.Run(new ServiceBase[] { new
> MyHal.Service.Service1() });
>                 error("Main1", "End");
>             }
>             catch(Exception exc)
>             {
>                 error("Main exception", exc.ToString());
>             }
> 
> Here I see in syslog the firt message ("Begin"). If I put in comment
> the log4net call I see "Begin2" method ; but then I think that the
> "MyHal.Engine.Core.Instance.Init();"  in the OnStart method does
> nothing... (the Core class has a static ctor with an error message
> that is never displayed)
> It's rather hard to debug what mono-service does.... or doesn't... 
> 
> JC 
> 
> -------------------- 
> http://sourceforge.net/projects/myhal
> 
> 
> ----- Original Message ----
> From: Jörg Rosenkranz <joerg.rosenkranz at gmail.com>
> To: jcmag <jcmag at yahoo.com>
> Sent: Sunday, January 21, 2007 4:33:25 PM
> Subject: Re: [Mono-list] mono-service doesn't start my service - no
> errors
> 
> Hi JC,
> 
> > but my service doesn't seem to start. I have no error messages,
> except:
> > Jan 20 21:17:47 mylaptop mono: MyHal.Service.exe: Log file already
> exists:
> > /tmp/MyHal.Service.exe.lock
> 
> Try using /usr/bin/mono/usr/lib/mono/1.0/mono-service.exe
> MyHal.Service.exe on a command line and see if there are any messages.
> 
> > I've also another question: after the call to mono-service, the
> service is
> > installed on the machine and will be executed, or do we have to do
> something
> > for that?
> 
> mono-service is only a tool to run your service. You have to provide a
> startup script for your specific distribution to run the service.
> 
> HTH,
> Joerg.
> 
> 
> 
> 
> 
> ______________________________________________________________________
> Don't be flakey. Get Yahoo! Mail for Mobile and 
> always stay connected to friends.
> 
> 
> ______________________________________________________________________
> E-mail classificado pelo Identificador de Spam Inteligente.
> Para alterar a categoria classificada, visite o Terra Mail
> 
> 
> ______________________________________________________________________
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 19/01/2007 / Versão:
> 5.1.00/4943
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list