|
From: Victor P. <ope...@ha...> - 2001-12-07 22:51:38
|
Hello, So here's what happened. I've been working on a package, and decided to install classifieds for some example code. Now, I can't work with OI at all! All I get is an "internal server error," and my error log is filled with the message you see in the subject. I tried putting PerlModule OpenInteract inside httpd.conf, for the hell of it, but then it died on some method in OpenInteract::Request. I also tried removing the classified package, but that didn't fix anything. Has anyone else had this prob? I am running Apache 1.3.22 with mod_perl 1.26. Restarting the server doesn't help... I turned on DEBUG, and I can see all the stuff happening in &Apache::Startup::initialize(), but none of the child_init() stuff ever gets executed, judging by the absnce of DEBUG messages in the log. Any ideas? Please? Thanks. -Victor ---- "Tatarsky, of course, hated most of the manifestations of Soviet power, but he still couldn't understand why it was worth exchanging an evil empire for an evil banana republic" --Viktor Pelevin, Generation P. |
|
From: Magnus E. <ma...@he...> - 2002-03-08 09:10:34
|
Hi! Thanks for a promising system ;-) I have some problems getting it to work though, I get the error in the subject. I read Victor Piterbarg's mail about it, but my conf/package_repository.perl file is pretty large any other ideas? :-) MVH/Best regards -- Magnus Espeland ma...@in... |
|
From: Chris W. <ch...@cw...> - 2002-03-08 12:55:45
|
On Fri, 2002-03-08 at 04:10, Magnus Espeland wrote: > Thanks for a promising system ;-) > > I have some problems getting it to work though, I get the error in the > subject. I read Victor Piterbarg's mail about it, but my > conf/package_repository.perl file is pretty large First, look at your error log ($WEBSITE_DIR/logs/error_log_modperl, by default) and see if anything jumps out at you there. One debugging tip is to set DEBUG to a positive value in OpenInteract::ApacheStartup. When you start Apache you should get some useful feedback letting you know what's up. If the output of either of these seems fishy but doesn't make sense to you, forward it to the list if it's fairly small, or me if it's large. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Magnus E. <ma...@he...> - 2002-03-08 21:49:19
|
On 8 Mar 2002, Chris Winters wrote: > First, look at your error log ($WEBSITE_DIR/logs/error_log_modperl, by > default) and see if anything jumps out at you there. That's where I found the error ;-) > One debugging tip is to set DEBUG to a positive value in > OpenInteract::ApacheStartup. When you start Apache you should get some > useful feedback letting you know what's up. Ahh, seems like Apache/Session/Generate/ModUniqueId.pm didn't compile when I used CPAN to install everything.. weird.. I fixed the compile error, and CPAN could install it. Now I get a new error though :( The browser get this: Can't locate object method "throw" via package "OITest::ErrorObject" at /usr/lib/perl5/site_perl/5.005/OpenInteract/Error.pm line 94. and in the error log for the mod_perl server: Found item: Apache::DBI::db --EXITED WITH ERROR from main handler eval block Error: 0 Any tips? I'm idling on #openinteract at both slashnet and irc.openprojects.net, would be cool to see you there ;-) MVH/Best regards -- Magnus Espeland ma...@in... |
|
From: Chris W. <ch...@cw...> - 2002-03-09 19:41:51
|
On Fri, 2002-03-08 at 16:49, Magnus Espeland wrote: > On 8 Mar 2002, Chris Winters wrote: > > > First, look at your error log ($WEBSITE_DIR/logs/error_log_modperl, by > > default) and see if anything jumps out at you there. > > That's where I found the error ;-) Of course :-) I wasn't sure if that was echoed to the browser or not. > Ahh, seems like Apache/Session/Generate/ModUniqueId.pm didn't compile when > I used CPAN to install everything.. weird.. I fixed the compile error, and > CPAN could install it. Now I get a new error though :( > > The browser get this: > > Can't locate object method "throw" via package "OITest::ErrorObject" > at /usr/lib/perl5/site_perl/5.005/OpenInteract/Error.pm line 94. > > and in the error log for the mod_perl server: > > Found item: Apache::DBI::db > --EXITED WITH ERROR from main handler eval block > Error: 0 So the main Apache handler is executing check_database() but not getting any further... The error you're getting comes when the SPOPS error object hasn't been created properly. I suspect that it might be on server startup that this happens. What do you see in your main Apache server error log? That is, not the one that's the virtual host. On my system I have: /home/httpd/website/logs/error_log_modperl -- vhost errors /usr/local/apache/logs/error_log_modperl -- server errors Normally you'll see something like the startup messages: [Sun Mar 3 13:17:12 2002] [info] created shared memory segment #45187096 [Sun Mar 3 13:17:12 2002] [notice] Apache/1.3.20 (Unix) mod_perl/1.26 configured -- resuming normal operations [Sun Mar 3 13:17:12 2002] [info] Server built: Nov 14 2001 22:57:31 But this is where errors that get generated during server startup AND child initialization (when the SPOPS classes get created) get put. Hope this helps, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Magnus E. <ma...@he...> - 2002-03-11 19:16:02
|
Hi! I finally figured out what was wrong, thanks to your tips :-) My problem was that I'm using Trustix (the redhat based distribution with focus on security), for the first time in a year and a half, and had forgotten how secure it really is.. problem was that both cpan and oi_manage ran with a umask of 077. Took me a while to figure out that cpan didn't change the umask. But now everything is working! I have a little wish list though ;-) - Could you make oi_manage change it's umask when we run it? Maybe it's best to make it an option? - ApacheStartup.pm or Startup.pm creates tmplib, it should check it's uid/gid and umask. My apache runs as uid/gid=httpd but the tmplib dir shows up with 700 root.root, and that doesn't work very well ;-) I just hacked the module to change umask one line before it creates the directory, but I reckon it should be done elsewhere and a little more though-thru... - Could you make oi_manage understand relative --website_dir (like --website_dir=.)? Bugs: - Typo at line 15 in event-1.20/struct/event.sql (varchar not varcar) Again, thanks for a great system!! :-) Cheers! Magnus Espeland On 9 Mar 2002, Chris Winters wrote: > On Fri, 2002-03-08 at 16:49, Magnus Espeland wrote: > > On 8 Mar 2002, Chris Winters wrote: > > > > > First, look at your error log ($WEBSITE_DIR/logs/error_log_modperl, by > > > default) and see if anything jumps out at you there. > > > > That's where I found the error ;-) > > Of course :-) I wasn't sure if that was echoed to the browser or not. > > > Ahh, seems like Apache/Session/Generate/ModUniqueId.pm didn't compile when > > I used CPAN to install everything.. weird.. I fixed the compile error, and > > CPAN could install it. Now I get a new error though :( > > > > The browser get this: > > > > Can't locate object method "throw" via package "OITest::ErrorObject" > > at /usr/lib/perl5/site_perl/5.005/OpenInteract/Error.pm line 94. > > > > and in the error log for the mod_perl server: > > > > Found item: Apache::DBI::db > > --EXITED WITH ERROR from main handler eval block > > Error: 0 > > So the main Apache handler is executing check_database() but not getting > any further... > > The error you're getting comes when the SPOPS error object hasn't been > created properly. I suspect that it might be on server startup that this > happens. > > What do you see in your main Apache server error log? That is, not the > one that's the virtual host. On my system I have: > > /home/httpd/website/logs/error_log_modperl -- vhost errors > /usr/local/apache/logs/error_log_modperl -- server errors > > Normally you'll see something like the startup messages: > > [Sun Mar 3 13:17:12 2002] [info] created shared memory segment > #45187096 > [Sun Mar 3 13:17:12 2002] [notice] Apache/1.3.20 (Unix) mod_perl/1.26 > configured -- resuming normal operations > [Sun Mar 3 13:17:12 2002] [info] Server built: Nov 14 2001 22:57:31 > > But this is where errors that get generated during server startup AND > child initialization (when the SPOPS classes get created) get put. > > Hope this helps, > > Chris > > MVH/Best regards -- Magnus Espeland ma...@in... geek:m.e. |
|
From: Chris W. <ch...@cw...> - 2002-03-12 04:27:29
|
On Mon, 2002-03-11 at 14:15, Magnus Espeland wrote: > I finally figured out what was wrong, thanks to your tips :-) > > My problem was that I'm using Trustix (the redhat based distribution with > focus on security), for the first time in a year and a half, and had > forgotten how secure it really is.. problem was that both cpan and > oi_manage ran with a umask of 077. Took me a while to figure out that cpan > didn't change the umask. > > But now everything is working! > I have a little wish list though ;-) > - Could you make oi_manage change it's umask when we run it? Maybe it's > best to make it an option? Ah, I'll bet that was fun to debug! Maybe it would be a good idea instead to create wrappers on your system that do something like: -----/usr/local/bin/cpan----- #!/bin/sh umask 022 perl -MCPAN -e shell ---------- (rename oi_manage to oi_manage.pl) -----/usr/local/bin/oi_manage----- #!/bin/sh umask 022 perl /usr/local/bin/oi_manage $* ---------- Since this is the first time this has popped up, I'd rather not put this sort of stuff (security) into OI if I can help it. > - ApacheStartup.pm or Startup.pm creates tmplib, it should check it's > uid/gid and umask. My apache runs as uid/gid=httpd but the tmplib dir > shows up with 700 root.root, and that doesn't work very well ;-) I just > hacked the module to change umask one line before it creates the > directory, but I reckon it should be done elsewhere and a little more > though-thru... Excellent point. I'll check that and ensure that the umask allows at least read access by everyone. > - Could you make oi_manage understand relative --website_dir (like > --website_dir=.)? That's a good idea. I'll put this down to check as well. > Bugs: > - Typo at line 15 in event-1.20/struct/event.sql (varchar not varcar) Fixed in CVS! Thanks. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Chris W. <ch...@cw...> - 2001-12-07 23:17:13
|
* Victor Piterbarg (ope...@ha...) [011207 18:02]: > Hello, > > So here's what happened. I've been working on a package, and decided to > install classifieds for some example code. Now, I can't work with OI at all! > All I get is an "internal server error," and my error log is filled with the > message you see in the subject. > > I tried putting > > PerlModule OpenInteract > > inside httpd.conf, for the hell of it, but then it died on some method in > OpenInteract::Request. I also tried removing the classified package, but > that didn't fix anything. Has anyone else had this prob? I am running Apache > 1.3.22 with mod_perl 1.26. > Restarting the server doesn't help... > > I turned on DEBUG, and I can see all the stuff happening in > &Apache::Startup::initialize(), but none of the child_init() stuff ever gets > executed, judging by the absnce of DEBUG messages in the log. This happens when the initialization process doesn't run properly. What OS and perl version are you running on? And what version of OpenInteract::ApacheStartup are you using (just copy/paste the $Id...$ line toward the top of the file)? Thanks, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Victor P. <ope...@ha...> - 2001-12-07 23:48:46
|
Hello,
Upon further investigation, I found that nothing was getting copied to
/tmplib, and then I looked at $website_dir/conf/package_repository.perl only
to find that all that was left of it was:
$data = {
'META_INF' => {
'base_dir' => '/usr/local/www/nasa'
}
};
Somehow all the contents of it disappeared. I swear I didn't touch it. I am
betting that this is what's causing all my probs...Anyway, I am going to try
an repair my package_repo and see if that does it.
My perl is 5.6.1 and ApacheStartup is 1.21 2001/11/28 05:51:32 (cutting
edge).
-Victor
> -----Original Message-----
> From: Chris Winters [mailto:ch...@cw...]
> Sent: Friday, December 07, 2001 3:38 PM
> To: Victor Piterbarg
> Cc: oi-help
> Subject: Re: [Openinteract-help] Undefined subroutine
> &OpenInteract::handler called.
>
>
> * Victor Piterbarg (ope...@ha...) [011207 18:02]:
> > Hello,
> >
> > So here's what happened. I've been working on a package, and decided to
> > install classifieds for some example code. Now, I can't work
> with OI at all!
> > All I get is an "internal server error," and my error log is
> filled with the
> > message you see in the subject.
> >
> > I tried putting
> >
> > PerlModule OpenInteract
> >
> > inside httpd.conf, for the hell of it, but then it died on some
> method in
> > OpenInteract::Request. I also tried removing the classified package, but
> > that didn't fix anything. Has anyone else had this prob? I am
> running Apache
> > 1.3.22 with mod_perl 1.26.
> > Restarting the server doesn't help...
> >
> > I turned on DEBUG, and I can see all the stuff happening in
> > &Apache::Startup::initialize(), but none of the child_init()
> stuff ever gets
> > executed, judging by the absnce of DEBUG messages in the log.
>
> This happens when the initialization process doesn't run
> properly. What OS and perl version are you running on? And what
> version of OpenInteract::ApacheStartup are you using (just copy/paste
> the $Id...$ line toward the top of the file)?
>
> Thanks,
>
> Chris
>
> --
> Chris Winters (ch...@cw...)
> Building enterprise-capable snack solutions since 1988.
>
|
|
From: Chris W. <ch...@cw...> - 2001-12-07 23:55:37
|
* Victor Piterbarg (ope...@ha...) [011207 18:58]:
> Hello,
>
> Upon further investigation, I found that nothing was getting copied to
> /tmplib, and then I looked at $website_dir/conf/package_repository.perl only
> to find that all that was left of it was:
>
> $data = {
> 'META_INF' => {
> 'base_dir' => '/usr/local/www/nasa'
> }
> };
>
> Somehow all the contents of it disappeared. I swear I didn't touch
> it. I am betting that this is what's causing all my probs...Anyway,
> I am going to try an repair my package_repo and see if that does it.
> My perl is 5.6.1 and ApacheStartup is 1.21 2001/11/28 05:51:32
> (cutting edge).
Yow! This happened to me once before, but I couldn't figure out
why. (Inspiring, I know.) There might be a .backup file in the same
directory -- I modified the SPOPS::HashFile class to always create a
backup file for just this reason.
There must be something going wrong during the package install process
to make this happen. I'll try to figure this out in the near future...
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|