2. In addition to the base install, you will need to install the following packages with cygwin:
* Admin -> cygrunsrv
* Interpreters -> Perl
3. (Optional) Move your existing POPFile-installation so that it resides in c:/cygwin/usr/local/popfile instead of c:\program files\popfile.
4. Open a cygwin prompt. Type the following and press enter:
cygrunsrv -I popfile -p /usr/local/popfile/popfile.pl -o
5. Start the service by typing the following:
cygrunsrv -S popfile
Some differences from when you run it with WPerl.exe:
* Error messages are directed to c:/cygwin/var/log/popfile.log
* When running under cygwin, memory usage is reduced about 50% compared to wperl.exe, and there is a significant speedup in filtering as well
* You will not get the trayicon.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to run popfile this way but I'm getting the following error when I try to start the service:
*********************************
$ cygrunsrv -S popfile
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service has not been started.
*********************************
cygrunsrv registered the service with Windows successfully but it's just not starting. The following message is displayed in the Event Viewer:
**************************************
The description for Event ID ( 0 ) in Source ( popfile ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: popfile : PID 940 : starting service `popfile' failed: execv: 2, No such file or directory.
**************************************
Sorry for the length...any help or suggestions on how to resolve this would be greatly appreciated :)
thanks,
dan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-07-10
I have the same problem posted by damorg.
I can add the following, hoping I can help to find out whats wrong:
if from cygwin bas I type the following:
-------------------------------------
$ cd /
$ perl /cygdrive/c/programmi/popfile/popfile.pl
-------------------------------------
I get:
-------------------------------------
POPFile Engine v0.19.0 loading
Initializing...
{interface:}
Can't call method "load_configuration" on an undefined value at /cygdrive/c/prog
rammi/popfile/popfile.pl line 331.
{proxy:}
-------------------------------------
If, instead of the above, I write:
-------------------------------------
$ cd /cygdrive/c/programmi/popfile/
$ perl popfile.pl
I had the same "Can't call method "load_configuration" on an undefined value at /cygdrive/c/prog
rammi/popfile/popfile.pl line 331." message in my popfile.log and when I manually tried to start it from bash.
I'm not expert but it does seem to be some kind of odd path-type problem. I found numerous references to somewhat similar issues with perl but nothing that directly addressed this popfile issue.
I had some time to play around with this today and I got it working with cygrunsrv as follows:
first, make sure any previously-installed "popfile" services from earlier attempts are removed:
$ cygrunsrv -R popfile
then, re-install a new popfile service using cygrunsrv's "-c" to specify a working directory from which the service will run:
$ cygrunsrv -I popfile -c "/cygdrive/c/Program Files/POPFile/" -p "/cygdrive/c/Program Files/POPFile/popfile.pl" -o
then, start the service:
$ cygrunsrv -S popfile
That did the trick and popfile was running. Also, the service started as expected when I rebooted Windows.
One thing that was interesting:
I notice relatively little change resource-wise running popfile via the usual popfile background shortcut vs. as a service with cygrunsrv:
wperl.exe starts at ~9700K and
perl.exe starts at ~9200K
oh well :)
Let me know whether or not you're able to get it going.
Dan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-07-11
Thank both Dan and Scott for your helpful support :)
Now ,using the -c switich, it works well!
In my PC the memory used now is about one half of the value allocated previously by wperl.exe :
cygwin+perl.exe : 9700 kb
wperl.exe : 18000 kb
thank you again, only now I'm realizing that a request for support is OT in this forum, sorry for this
Scerbanenco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will attempt to maybe do it on a more clean install of cygwin but I don't know. This was from the install location and from the original location.
While this was going on, I noted a perl.exe file in the popfile install directory and tried that and it worked so I don't know if I was supposed to use that one but the perl.exe and perl5.8.2.exe that was supplied with cygwin did not work giving the above error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are running under cygwin, you should be installing the cross platform version of POPFile, not the win version.
Sounds like you are using pieces of win perl and cygwin perl, and that's causing you all sorts of grief. I suggest you blow away your POPFile install and start fresh with the cross platform package.
Scott
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So much for that one. I still fail every time when it goes to launch as a service. For now, it will only load manually for some reason or another. I will attempt with a clean set. Default packages + perl and cygrunsrv only.
*******************************************************************************************
The description for Event ID ( 0 ) in Source ( popfile ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: popfile : PID 2520 : starting service `popfile' failed: execv: 255, error 255.
*******************************************************************************************
That is the error I keep getting in the event viewer.
*******************************************************************************************
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service has not been started.
*******************************************************************************************
That is what I get in cygwin when I try to start the service manually.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks scott. I will give that a try. I won't blow away my old installation because of the fact that I do already have it trained. I will however install the new version into a directory that can be easily retrieved by cygwin (no spaces!). Also I was able to get popfile to work manually using an older version of perl for cygwin. However when I tried to start the service, it would start then silently fail. The popfile.log file just stayed read-only in windows with no process actually locking it as far as I could tell. Also, no info was put into the log file. When it was started manually using the cygwin command line, it was able to start without issue and stayed running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following files will retain your 'data' for POPFile.
1) popfile.cfg
2) stopwords
3) entire messages folder
4) entire corpus folder and subfolders
You need to blow away everything else and get a clean cross platform installation so you eliminate the issue of mixing activestate perl stuff with cygwin stuff.
Scott
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, now I have done that. I downloaded the multi-platform install and loaded a fresh copy of cygwin. Just the default packages plus the latest version of perl and cygrunsrv. Here is what I get when I try to run it. Any thoughts?
Loading...
{core: config logger mq}
Can't locate BerkeleyDB.pm in @INC (@INC contains: /usr/lib/perl5/5.8.2/cygwin-t
hread-multi-64int /usr/lib/perl5/5.8.2 /usr/lib/perl5/site_perl/5.8.2/cygwin-thr
ead-multi-64int /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl .) at Cl
assifier/Bayes.pm line 51.
BEGIN failed--compilation aborted at Classifier/Bayes.pm line 51.
Compilation failed in require at POPFile/Loader.pm line 356.
{classifier:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what cygwin packages do i need to build the berkeleydb perl extension? I got everything setup for that and the cygwin section of that howto seems to be missing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed make, gcc, binutils, db4.1, and libdb4.1 packages and then try to do install BerkeleyDB but when I do that, it fails miserably. It gets to compiling the BerkeleyDB perl module and then just spits out a ton of errors. The first line has long since scrolled past the screen when it gets done. It just complains mostly that db is undefined and I think it has something to do with that it couldn't find the db library earlier on. If you have an already compiled version of the BerkeleyDB perl module and instructions on installing it, that could be helpful here.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We better take this to the Help Forum, this conversation is going on far longer than I thought it would. The HOWTO's are for documenting known solutions.
Scott
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
here is a working way to use XP + cygwin + a win version of popfile (0.20.1)
(u should think about install cross platform version rather, cuz it seems is
consume less memory)
################################################
# in one directory (/home/Admin/ for me or /usr/smthgelse for you)
# let's do an symlink to reduce pathname length
ln -s /cygdrive/c/Program Files/POPFile/ popfile
cd popfile
# then install the service (you have to change paths and descriptions as needed for you)
Signals TERM QUIT STOP INT do not work when trying to stop the service with
cygrunsrv -E popfile
cygrunsrv: Error stopping a service: QueryServiceStatus: Win32 error 1053
so I use a "-s KILL" at installation but it's not the nice way to stop it
(may corrupt corpus), does someone know what signal I should use to end it
in the same way that http://127.0.0.1:8080/shutdown does ?
if there is no way yet, it could be find to do as stop_pf.exe when sending a signal (USR1) to the service.
stop it with web ui
################################################
POPFile Engine v0.20.1 stopping
A fairly easy way of running POPFile as a service is to use cygwin.
1. Download and install Cygwin from http://www.cygwin.com
2. In addition to the base install, you will need to install the following packages with cygwin:
* Admin -> cygrunsrv
* Interpreters -> Perl
3. (Optional) Move your existing POPFile-installation so that it resides in c:/cygwin/usr/local/popfile instead of c:\program files\popfile.
4. Open a cygwin prompt. Type the following and press enter:
cygrunsrv -I popfile -p /usr/local/popfile/popfile.pl -o
5. Start the service by typing the following:
cygrunsrv -S popfile
Some differences from when you run it with WPerl.exe:
* Error messages are directed to c:/cygwin/var/log/popfile.log
* When running under cygwin, memory usage is reduced about 50% compared to wperl.exe, and there is a significant speedup in filtering as well
* You will not get the trayicon.
Thanks for posting this.
I'd like to run popfile this way but I'm getting the following error when I try to start the service:
*********************************
$ cygrunsrv -S popfile
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service has not been started.
*********************************
cygrunsrv registered the service with Windows successfully but it's just not starting. The following message is displayed in the Event Viewer:
**************************************
The description for Event ID ( 0 ) in Source ( popfile ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: popfile : PID 940 : starting service `popfile' failed: execv: 2, No such file or directory.
**************************************
Sorry for the length...any help or suggestions on how to resolve this would be greatly appreciated :)
thanks,
dan
I have the same problem posted by damorg.
I can add the following, hoping I can help to find out whats wrong:
if from cygwin bas I type the following:
-------------------------------------
$ cd /
$ perl /cygdrive/c/programmi/popfile/popfile.pl
-------------------------------------
I get:
-------------------------------------
POPFile Engine v0.19.0 loading
Loading...
{core:}
{classifier:}
{interface:}
{proxy:}
POPFile Engine v0.19.0 starting
Initializing...
{interface:}
Can't call method "load_configuration" on an undefined value at /cygdrive/c/prog
rammi/popfile/popfile.pl line 331.
{proxy:}
-------------------------------------
If, instead of the above, I write:
-------------------------------------
$ cd /cygdrive/c/programmi/popfile/
$ perl popfile.pl
POPFile Engine v0.19.0 loading
Loading...
{core: config logger}
{classifier: bayes}
{interface: html}
{proxy: pop3}
POPFile Engine v0.19.0 starting
Initializing...
{proxy: pop3}
{interface: html}
{classifier: bayes}
{core: config logger}
Starting...
{proxy: pop3}
{interface: html}
{classifier: bayes2003/7/10 11:27:38 1176:
[snip..]
POPFile Engine v0.19.0 running
-------------------------------------
Everything runs well!
It seems, to my unskilled eyes, a path related problem.
Thank you for you attention, and for the effort you put in developing this smart and powerful application
Scerbanenco
>It seems, to my unskilled eyes, a path related problem.
POPFile must be run from it's installation directory. That's how it locates all of the modules stored in subdirs.
Scott
scerbanenco--Thanks for posting!
I had the same "Can't call method "load_configuration" on an undefined value at /cygdrive/c/prog
rammi/popfile/popfile.pl line 331." message in my popfile.log and when I manually tried to start it from bash.
I'm not expert but it does seem to be some kind of odd path-type problem. I found numerous references to somewhat similar issues with perl but nothing that directly addressed this popfile issue.
I had some time to play around with this today and I got it working with cygrunsrv as follows:
first, make sure any previously-installed "popfile" services from earlier attempts are removed:
$ cygrunsrv -R popfile
then, re-install a new popfile service using cygrunsrv's "-c" to specify a working directory from which the service will run:
$ cygrunsrv -I popfile -c "/cygdrive/c/Program Files/POPFile/" -p "/cygdrive/c/Program Files/POPFile/popfile.pl" -o
then, start the service:
$ cygrunsrv -S popfile
That did the trick and popfile was running. Also, the service started as expected when I rebooted Windows.
One thing that was interesting:
I notice relatively little change resource-wise running popfile via the usual popfile background shortcut vs. as a service with cygrunsrv:
wperl.exe starts at ~9700K and
perl.exe starts at ~9200K
oh well :)
Let me know whether or not you're able to get it going.
Dan
Thank both Dan and Scott for your helpful support :)
Now ,using the -c switich, it works well!
In my PC the memory used now is about one half of the value allocated previously by wperl.exe :
cygwin+perl.exe : 9700 kb
wperl.exe : 18000 kb
thank you again, only now I'm realizing that a request for support is OT in this forum, sorry for this
Scerbanenco
I am trying to do this but I keep getting the following:
POPFile Engine loading
Loading...
{core: config logger mq}
Segmentation fault (core dumped)
I will attempt to maybe do it on a more clean install of cygwin but I don't know. This was from the install location and from the original location.
While this was going on, I noted a perl.exe file in the popfile install directory and tried that and it worked so I don't know if I was supposed to use that one but the perl.exe and perl5.8.2.exe that was supplied with cygwin did not work giving the above error.
If you are running under cygwin, you should be installing the cross platform version of POPFile, not the win version.
Sounds like you are using pieces of win perl and cygwin perl, and that's causing you all sorts of grief. I suggest you blow away your POPFile install and start fresh with the cross platform package.
Scott
So much for that one. I still fail every time when it goes to launch as a service. For now, it will only load manually for some reason or another. I will attempt with a clean set. Default packages + perl and cygrunsrv only.
*******************************************************************************************
The description for Event ID ( 0 ) in Source ( popfile ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: popfile : PID 2520 : starting service `popfile' failed: execv: 255, error 255.
*******************************************************************************************
That is the error I keep getting in the event viewer.
*******************************************************************************************
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service has not been started.
*******************************************************************************************
That is what I get in cygwin when I try to start the service manually.
Thanks scott. I will give that a try. I won't blow away my old installation because of the fact that I do already have it trained. I will however install the new version into a directory that can be easily retrieved by cygwin (no spaces!). Also I was able to get popfile to work manually using an older version of perl for cygwin. However when I tried to start the service, it would start then silently fail. The popfile.log file just stayed read-only in windows with no process actually locking it as far as I could tell. Also, no info was put into the log file. When it was started manually using the cygwin command line, it was able to start without issue and stayed running.
The following files will retain your 'data' for POPFile.
1) popfile.cfg
2) stopwords
3) entire messages folder
4) entire corpus folder and subfolders
You need to blow away everything else and get a clean cross platform installation so you eliminate the issue of mixing activestate perl stuff with cygwin stuff.
Scott
Okay, now I have done that. I downloaded the multi-platform install and loaded a fresh copy of cygwin. Just the default packages plus the latest version of perl and cygrunsrv. Here is what I get when I try to run it. Any thoughts?
Shinji@shinji-winxp /usr/local
$ cd popfile
Shinji@shinji-winxp /usr/local/popfile
$ perl popfile.pl
POPFile Engine loading
Loading...
{core: config logger mq}
Can't locate BerkeleyDB.pm in @INC (@INC contains: /usr/lib/perl5/5.8.2/cygwin-t
hread-multi-64int /usr/lib/perl5/5.8.2 /usr/lib/perl5/site_perl/5.8.2/cygwin-thr
ead-multi-64int /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl .) at Cl
assifier/Bayes.pm line 51.
BEGIN failed--compilation aborted at Classifier/Bayes.pm line 51.
Compilation failed in require at POPFile/Loader.pm line 356.
{classifier:
You need to install the BerkeleyDB libraries (cygwin setup program) then you need to install the Perl module, see the Wiki...
http://popfile.sourceforge.net/cgi-bin/wiki.pl?HowTos/CrossPlatformInstall
Scott
what cygwin packages do i need to build the berkeleydb perl extension? I got everything setup for that and the cygwin section of that howto seems to be missing.
I installed make, gcc, binutils, db4.1, and libdb4.1 packages and then try to do install BerkeleyDB but when I do that, it fails miserably. It gets to compiling the BerkeleyDB perl module and then just spits out a ton of errors. The first line has long since scrolled past the screen when it gets done. It just complains mostly that db is undefined and I think it has something to do with that it couldn't find the db library earlier on. If you have an already compiled version of the BerkeleyDB perl module and instructions on installing it, that could be helpful here.
We better take this to the Help Forum, this conversation is going on far longer than I thought it would. The HOWTO's are for documenting known solutions.
Scott
here is a working way to use XP + cygwin + a win version of popfile (0.20.1)
(u should think about install cross platform version rather, cuz it seems is
consume less memory)
################################################
# in one directory (/home/Admin/ for me or /usr/smthgelse for you)
# let's do an symlink to reduce pathname length
ln -s /cygdrive/c/Program Files/POPFile/ popfile
cd popfile
# then install the service (you have to change paths and descriptions as needed for you)
cygrunsrv -I popfile \ -d 'CygWIN PopFile' \ -p /home/Admin/popfile/perl.exe \ -c /home/Admin/popfile/ \ -a popfile.pl \ -f 'Octopuss roxxor (or whatever desc u want ;)' \ -o \ -s KILL
# check the status of the service
cygrunsrv -Q popfile
# simultaneusly show modifications appended to log file
tail -f /var/log/PopFile.log&
# Start Service
cygrunsrv -S popfile
# check the status of the service
cygrunsrv -Q popfile
################################################
The log file gives me :
POPFile Engine loading
Loading...
{core: windows}
{core: config logger mq}
{classifier: bayes}
{interface: html}
{proxy: pop3}
POPFile Engine v0.20.1 starting
Initializing...
{core: mq windows config logger}
{interface: html}
{classifier: bayes}
{proxy: pop3}
Starting...
{core: mq windows config logger}
{interface: html}
{classifier: bayes}
{proxy: pop3}
POPFile Engine v0.20.1 running
################################################
Signals TERM QUIT STOP INT do not work when trying to stop the service with
cygrunsrv -E popfile
cygrunsrv: Error stopping a service: QueryServiceStatus: Win32 error 1053
so I use a "-s KILL" at installation but it's not the nice way to stop it
(may corrupt corpus), does someone know what signal I should use to end it
in the same way that http://127.0.0.1:8080/shutdown does ?
if there is no way yet, it could be find to do as stop_pf.exe when sending a signal (USR1) to the service.
stop it with web ui
################################################
POPFile Engine v0.20.1 stopping
Stopping...
{core: mq windows config logger}
{interface: html}
{classifier: bayes}
{proxy: pop3}
POPFile Engine v0.20.1 terminated
################################################
ps: sorry for the bad english :-P