Re: [Lazarus] LazDaemon
On 24 July 2014 16:37, Michael Van Canneyt mich...@freepascal.org wrote: On Thu, 24 Jul 2014, Juha Manninen wrote: I think the LazDaemon package is broken at least on Windows. Can someone else start a Windows service made with it? I cannot. When I find some time, I will have a look at it. I have successfully installed this program on windows, but it was a windows 2000. Maybe the permissions setup has changed in windows, this is always a possibility. LOL Michael. -- -- Frank Church === http://devblog.brahmancreations.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On 07/25/2014 11:56 PM, Graeme Geldenhuys wrote: Further comments on this. You should be able to debug the startup code by using the same trick I use for debugging CGI applications. Sounds like doable but feels like a nasty workaround. If this method indeed is necessary due to the technical environment, maybe Lazarus could somehow be enhanced in order to automate the process (similar to remote debugging). -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Thu, 24 Jul 2014, Juha Manninen wrote: On Thu, Jul 24, 2014 at 4:10 PM, Virgo Pärna virgo.pa...@mail.ee wrote: You are running that cleandir.exe -i form cmd Window? Did you start cmd with Run as Administrator? Yes. Actally the service version is cleandirs.exe (with s). There is also a cmd line program cleandir.exe. I created a Windows service just resently with Lazarus and it works. Strange. I believe it is a permissions problem but I have no idea how to fix it. I will use now the FPC daemon class, it works. Out of curiosity: which class is that ? Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Fri, Jul 25, 2014 at 9:05 AM, Michael Van Canneyt mich...@freepascal.org wrote: I will use now the FPC daemon class, it works. Out of curiosity: which class is that ? I mean the TCustomDaemon and TCustomDaemonMapper descendants as explained in your PDF, without using LazDaemon package. LazDaemon uses the same classes internally yet it does not work. Yes, it is strange. Now, does anybody know how to debug Windows services? Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On 2014-07-25 07:18, Juha Manninen wrote: Now, does anybody know how to debug Windows services? tiOPF's tiLog.pas unit (and friends: tiLogToFile etc) works very well. It can be used independently with any project. The FPC dbugintf unit should also work, but has some issues (sometimes missing events). Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Fri, 25 Jul 2014, Juha Manninen wrote: On Fri, Jul 25, 2014 at 9:05 AM, Michael Van Canneyt mich...@freepascal.org wrote: I will use now the FPC daemon class, it works. Out of curiosity: which class is that ? I mean the TCustomDaemon and TCustomDaemonMapper descendants as explained in your PDF, without using LazDaemon package. LazDaemon uses the same classes internally yet it does not work. Yes, it is strange. Now, does anybody know how to debug Windows services? You can only do it by attaching to an external process. Start the service, and attach the debugger to it. That obviously means that you will miss the startup code. It's what I hate about windows services :( Usually I make the program twice: once as a normal program (to debug) and once as a service. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Fri, 25 Jul 2014 09:18:01 +0300, Juha Manninen juha.mannine...@gmail.com wrote: On Fri, Jul 25, 2014 at 9:05 AM, Michael Van Canneyt mich...@freepascal.org wrote: I will use now the FPC daemon class, it works. Out of curiosity: which class is that ? I mean the TCustomDaemon and TCustomDaemonMapper descendants as explained in your PDF, without using LazDaemon package. LazDaemon uses the same classes internally yet it does not work. Yes, it is strange. Now that I think of it, I actually did not use LazDaemon. It was brookframework daemon, that used TCustomDaemonApplication and TCustomDaemonMapper. But lazarus daemon also inherits from TCustomDaemonApplication. -- Virgo Pärna virgo.pa...@mail.ee -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Fri, Jul 25, 2014 at 09:18:01AM +0300, Juha Manninen wrote: Now, does anybody know how to debug Windows services? Under Delphi GUI or gdb console Attach the debugger to the running process. I don't know how to do from the Lazarus IDE. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Fri, 25 Jul 2014, Marco van de Voort wrote: On Fri, Jul 25, 2014 at 09:18:01AM +0300, Juha Manninen wrote: Now, does anybody know how to debug Windows services? Under Delphi GUI or gdb console Attach the debugger to the running process. I don't know how to do from the Lazarus IDE. Same. Attach to Program in the Run menu (at least on linux). Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Friday, July 25, 2014, Marco van de Voort mar...@stack.nl wrote: Under Delphi GUI or gdb console Attach the debugger to the running process. I don't know how to do from the Lazarus IDE. There is such option in Lazarus Run menu but it gives an error when connecting to a running service. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
Am 25.07.2014 14:13 schrieb Juha Manninen juha.mannine...@gmail.com: On Friday, July 25, 2014, Marco van de Voort mar...@stack.nl wrote: Under Delphi GUI or gdb console Attach the debugger to the running process. I don't know how to do from the Lazarus IDE. There is such option in Lazarus Run menu but it gives an error when connecting to a running service. If the service is running as Admin then the IDE needs to be started as Admin as well. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On 2014-07-25 07:27, Michael Van Canneyt wrote: Usually I make the program twice: once as a normal program (to debug) and once as a service. I thought that was normal programming practice. :) I've always done it like that (Windows and *nix). I think I learned that from Delphi 4 or 5 days. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Thu, 24 Jul 2014 15:06:53 +0300, Juha Manninen juha.mannine...@gmail.com wrote: I think the LazDaemon package is broken at least on Windows. Can someone else start a Windows service made with it? I cannot. There is an example project C:\SW\lazarus_gitsvn\examples\cleandir\cleandirs.lpi that uses it. Trying to install it (cleandirs.exe -i with admin rights) fails. Same thing with any other project. You are running that cleandir.exe -i form cmd Window? Did you start cmd with Run as Administrator? I created a Windows service just resently with Lazarus and it works. -- Virgo Pärna virgo.pa...@mail.ee -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Thu, 24 Jul 2014, Juha Manninen wrote: I think the LazDaemon package is broken at least on Windows. Can someone else start a Windows service made with it? I cannot. There is an example project C:\SW\lazarus_gitsvn\examples\cleandir\cleandirs.lpi that uses it. Trying to install it (cleandirs.exe -i with admin rights) fails. Same thing with any other project. The log says: Failed to start service manager: Palveluprosessi ei voi muodostaa yhteyttä palveluvalvontaan. The latter sentence means something like: Service process cannot connect to service manager. That is usually a permissions problem. I am able to install a Windows service made without LazDaemon following the instructions given in Michaël Van Canneyt's document : http://www.turbog.com/wp-content/uploads/2012/04/daemons.pdf Michaël is also the author of LazDaemon package. Could he maybe take a look at it? There is a bug report but it lists other problems, not the complete failure when trying to install. http://bugs.freepascal.org/view.php?id=24067 I am using Windows 7, FPC 2.6.4 and Lazarus trunk. When I find some time, I will have a look at it. I have successfully installed this program on windows, but it was a windows 2000. Maybe the permissions setup has changed in windows, this is always a possibility. Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazDaemon
On Thu, Jul 24, 2014 at 4:10 PM, Virgo Pärna virgo.pa...@mail.ee wrote: You are running that cleandir.exe -i form cmd Window? Did you start cmd with Run as Administrator? Yes. Actally the service version is cleandirs.exe (with s). There is also a cmd line program cleandir.exe. I created a Windows service just resently with Lazarus and it works. Strange. I believe it is a permissions problem but I have no idea how to fix it. I will use now the FPC daemon class, it works. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazdaemon and Fedora 17
On Sunday 11 of November 2012 05:35:25 Andrew Brunner wrote: Does anyone have any experience with Fedora 17 and daemons? Under Debian, I use a script and start-stop-daemon to load my FPC/Lazarus Daemon. Under Fedora, there is no such start-stop-daemon command. Has anyone had any success or experience with the new service system? Fedora 17 uses systemd. Start scripts are in /lib/systemd directory and subdirs. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazdaemon and Fedora 17
Em 11-11-2012 06:04, zeljko escreveu: On Sunday 11 of November 2012 05:35:25 Andrew Brunner wrote: Does anyone have any experience with Fedora 17 and daemons? Under Debian, I use a script and start-stop-daemon to load my FPC/Lazarus Daemon. Under Fedora, there is no such start-stop-daemon command. Has anyone had any success or experience with the new service system? Fedora 17 uses systemd. Start scripts are in /lib/systemd directory and subdirs. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus This page can be helpful: http://fedoraproject.org/wiki/Systemd Brian -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazdaemon problem on Ubuntu x64
On Mon, Apr 19, 2010 at 2:28 AM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Check Package / Package graph. Is the package lazdaemon shown as installed? That was the first thing I checked. It showed installed. Maybe you start the wrong lazarus binary? How did you install lazarus, what version? Nope. I export svn/trunk to seperate Lazarus folder and make clean all -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus