Menu

Start as Service?

Help
2009-09-20
2013-06-12
1 2 > >> (Page 1 of 2)
  • Samtpfoti the cat

    First of all please let me thank you so much for a most wonderful solution for viewing/editing multiple calenders of multiple exchange postboxes on the iphone. this has been a problem that has cost me many hours for many months and with davmail it works perfectly.
    the only problem that I face now, is how to run your software under a windows server as a service. using sc.exe will obviously not work. have you any suggestions on how to achieve an automatic start of davmail without the need to log on?
    Thank you very much for your help
    Anja

     
  • Mickael Guessant

    Running DavMail as a service would definitely be a good idea in server mode. I added a new jsmooth config file in SVN to create a davmailservice.exe wrapper. This file can be registered as a windows service with sc:

        sc create DavMail binPath= \path\to\davmailservice.exe type= own start= auto

    You can add type= interact if you want to keep tray icon

     
  • Mickael Guessant

    Note : you can directly use davmailservice.exe install to register service with default options

     
  • Mickael Guessant

    davmailservice.exe available in 3.5.0

     
  • stifler6969

    stifler6969 - 2009-09-23

    How can i download this file without SVN ? And how install it ?

    Thx

     
  • Mickael Guessant

    It's included in the new 3.5.0 release in the windows installer.
    Warning: you will have to remove the HKCU/Software/Microsoft/Windows/CurrentVersion/Run/DavMail key created by the installer.

    If someone is comfortable enough with NSIS to add a choice page to the installer, I will gladly include it in the next release :-)

     
  • stifler6969

    stifler6969 - 2009-09-23

    I have installed the new release normaly but no service was configured.

    What is procedure ?

    Thx a lot

     
  • stifler6969

    stifler6969 - 2009-09-23

    i have an error when i execute davmailservice.exe in command line.

    This error is : "connect error 1063 (13)!"

     
  • stifler6969

    stifler6969 - 2009-09-23

    and in service.txt :

    Constructing winservice object DavMail
    setting up a connection with the control dispatcher (DavMail)

     
  • Mickael Guessant

    retry with

        davmailservice install

    or

        sc create DavMail binPath= \path\to\davmailservice.exe type= own start= auto

     
  • stifler6969

    stifler6969 - 2009-09-23

    Thank ! Its works.

    But the service doesn't load configurations. An idea ?

     
  • Mickael Guessant

    Sure, if you already started the service, you must have a davmail.properties file in davmailservice.exe directory, just edit this file according to
    and restart the service.

      : http://davmail.sourceforge.net/serversetup.html

     
  • stifler6969

    stifler6969 - 2009-09-24

    OK. Just one question : the port of Caldav is not declared in davmail.properties. What is the syntax ?

     
  • Mickael Guessant

    Caldav port setting is davmail.caldavPort

     
  • stifler6969

    stifler6969 - 2009-09-24

    I have these logs :

    13:55.46 :set status 3 (SERVICE_STOP_PENDING)
    13:55.46 :Stopping the service…
    13:55.46 :no jvm available
    13:56.35 :Constructing winservice object DavMail
    13:56.35 :setting up a connection with the control dispatcher (DavMail)
    13:56.35 :in service main… (1 args)
    13:56.35 :argument 0: DavMail
    13:56.35 :set status 2 (SERVICE_START_PENDING)
    13:56.35 :set status 2 (SERVICE_START_PENDING)
    13:56.35 :set status 4 (SERVICE_RUNNING)
    13:56.35 :set status 2 (SERVICE_START_PENDING)
    13:56.35 :Run…
    13:56.35 :set status 4 (SERVICE_RUNNING)
    13:56.35 :ERROR: could not find any suitable Java Virtual Machine

    An idea ?

     
  • Mickael Guessant

    Sure, you need to install java. You can launch davmail.exe instead of davmailservice.exe to get detailed instructions.

     
  • stifler6969

    stifler6969 - 2009-09-25

    i have already start davmail with davmail.exe and install java runtime 6. With this version of java the service doesn't work.

     
  • Mickael Guessant

    Well, it's working here:
      
        21:09.55 :Constructing winservice object DavMail
        21:09.55 :setting up a connection with the control dispatcher (DavMail)
        21:09.55 :in service main… (1 args)
        21:09.55 :argument 0: DavMail
        21:09.55 :set status 2 (SERVICE_START_PENDING)
        21:09.55 :set status 2 (SERVICE_START_PENDING)
        21:09.55 :set status 4 (SERVICE_RUNNING)
        21:09.55 :set status 2 (SERVICE_START_PENDING)
        21:09.55 :Run…
        21:09.55 :set status 4 (SERVICE_RUNNING)
        21:09.59 :JVM found and instanciated successfully (<C:\Program Files\Java\jre6><C:\Program Files\Java\jre6\bin\client\jvm.dll><1.6.0>)
        21:09.59 :set status 4 (SERVICE_RUNNING)

    => Are you able to start DavMail in normal (non service mode) ?

     
  • stifler6969

    stifler6969 - 2009-09-28

    Hi,

    I understand why it doesn't work !

    The service want to search Java in C:\Program Files\Java but on windows 2003 64 Bits, the directory is C:\Program Files (x86)\Java !

    I have tried with a shortcut :

    C:\Program Files\Java => C:\Program Files (x86)\Java

    It doesn't work

    Thx

     
  • Mickael Guessant

    Never tested the jsmooth wrappers under Windows 64, I understand "C:\Program Files (x86)\Java" is for 32 bits JVM, did you try with 64 bits JVM ?

     
  • stifler6969

    stifler6969 - 2009-10-12

    Bonjour,

    J'ai vu que tu étais français, donc inutile de parler anglais !

    As-tu changer quelque chose dans la version actuelle du logiciel ? Car maintenant le service va chercher dans C:\Program Files\Java. Je n'y comprends plus rien….

     
  • stifler6969

    stifler6969 - 2009-10-12

    Ouppss ! erreur..

    C'est C:\Program Files (x86)\Java au lieu de C:\Program Files\Java sur mon précédent post

     
  • Mickael Guessant

    Sure, but this is a public forum on which english is the common language :-)

    To be continued on my private address mguessan@free.fr

     
  • stifler6969

    stifler6969 - 2009-10-14

    I have wrote an email yesterday to your mailbox.

    Have got one question :

    - Do you modify your program about service ?

    Thx

     
  • Mickael Guessant

    Nope, I didn't change the service. However, a JSmooth user managed to create new 64bits wrappers that may help you. However, I don't any 64bits windows instance to test those.

    Another path would be to use java service wrapper instead, as described by another user on the mailing list.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

MongoDB Logo MongoDB