Discussion:
Autostart and the apache 500 error - Help needed
AZMel
2008-09-09 02:43:20 UTC
Permalink
Hello All,

I'm at a bit of a loss and I now turn to you for help.

I have an application that works perfectly in dev mode and it
works fine when I manually start /usr/lib/cgi-bin/myapp-autostart.cgi
to run it under apache2. However, if the apache2 starts the
application due to a 502 or 503 error I get a 500 error when I try to
return back a pdf to that was created to the client.

It sounds like permissions to me but I am at a loss as to where to
look. Everything under /var/www/apache2-default is owned by www-
data:www-data and the cgi-bin is owned by root.

No tracebacks are produced so I'm not sure if I have my logging in
prod.cfg set up properly and may need some pointers there as well.

Thanks for you help

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-09 02:53:00 UTC
Permalink
On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> Hello All,
>
> I'm at a bit of a loss and I now turn to you for help.
>
> I have an application that works perfectly in dev mode and it
> works fine when I manually start /usr/lib/cgi-bin/myapp-autostart.cgi

Not sure why you use cgi instead of mod_wsgi, but you could try
starting your app on production server /usr/bin/start-myapp.py
prod.cfg and see if you get an error.

Usually if you get an error running it using prod.cfg configuration.
When you do you can fix it and it should run fine under apache with no
problems.

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 03:08:36 UTC
Permalink
On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > Hello All,
>
> >    I'm at a bit of a loss and I now turn to you for help.
>
> >    I have an application that works perfectly in dev mode and it
> > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> Not sure why you use cgi instead of mod_wsgi, but you could try
> starting your app on production server /usr/bin/start-myapp.py
> prod.cfg and see if you get an error.
>

Last year when I was looking for a way to autostart that was the only
way I could find that worked for me. I will look into mod_wsgi
though. Any recommendations on the best tut's to use?

> Usually if you get an error running it using prod.cfg configuration.
> When you do you can fix it and it should run fine under apache with no
> problems.
>

I copied over my prod.cfg and replaced the logging section with the
logging section from dev.cfg. It all works without error as it did
before.

> Lucas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-09 03:18:15 UTC
Permalink
On Mon, Sep 8, 2008 at 10:08 PM, AZMel <***@gmail.com> wrote:
>
>
>
> On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>> On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>>
>> > Hello All,
>>
>> > I'm at a bit of a loss and I now turn to you for help.
>>
>> > I have an application that works perfectly in dev mode and it
>> > works fine when I manually start /usr/lib/cgi-bin/myapp-autostart.cgi
>>
>> Not sure why you use cgi instead of mod_wsgi, but you could try
>> starting your app on production server /usr/bin/start-myapp.py
>> prod.cfg and see if you get an error.
>>
>
> Last year when I was looking for a way to autostart that was the only
> way I could find that worked for me. I will look into mod_wsgi
> though. Any recommendations on the best tut's to use?

http://lucasmanual.com/mywiki/TurboGears#head-36b7eef1526da4fe58c73738c925f34f6bc93c1d

>
>> Usually if you get an error running it using prod.cfg configuration.
>> When you do you can fix it and it should run fine under apache with no
>> problems.
>>
>
> I copied over my prod.cfg and replaced the logging section with the
> logging section from dev.cfg. It all works without error as it did
> before.

Doesn't the logging in you prod have server.log file already included?

Sorry. This is where my knowledge of deployment of tg in cgi mode
ends. If you switch it over to mod_wsgi with apache2 you will have the
error logs in apache log.

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 03:50:56 UTC
Permalink
On Sep 8, 8:18 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> On Mon, Sep 8, 2008 at 10:08 PM, AZMel <***@gmail.com> wrote:
>
> > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> >> On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> >> > Hello All,
>
> >> >    I'm at a bit of a loss and I now turn to you for help.
>
> >> >    I have an application that works perfectly in dev mode and it
> >> > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> >> Not sure why you use cgi instead of mod_wsgi, but you could try
> >> starting your app on production server /usr/bin/start-myapp.py
> >> prod.cfg and see if you get an error.
>
> > Last year when I was looking for a way to autostart that was the only
> > way I could find that worked for me.  I will look into mod_wsgi
> > though.  Any recommendations on the best tut's to use?
>
> http://lucasmanual.com/mywiki/TurboGears#head-36b7eef1526da4fe58c7373...
>
>
>
> >> Usually if you get an error running it using prod.cfg configuration.
> >> When you do you can fix it and it should run fine under apache with no
> >> problems.
>
> > I copied over my prod.cfg and replaced the logging section with the
> > logging section from dev.cfg.  It all works without error as it did
> > before.
>
> Doesn't the logging in you prod have server.log file already included?
>
It does, but the 500 error never leaves a traceback, server.log entry,
or apache2 error.log entries. This is why I'm at a loss.
> Sorry. This is where my knowledge of deployment of tg in cgi mode
> ends. If you switch it over to mod_wsgi with apache2 you will have the
> error logs in apache log.
>
I will set up a test server with mod_wsgi and see how that goes. If I
can get it working in time I might convert over to it.

Thanks

> Lucas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-09 03:29:00 UTC
Permalink
On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
> On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > Hello All,
>
> > >    I'm at a bit of a loss and I now turn to you for help.
>
> > >    I have an application that works perfectly in dev mode and it
> > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > Not sure why you use cgi instead of mod_wsgi, but you could try
> > starting your app on production server /usr/bin/start-myapp.py
> > prod.cfg and see if you get an error.
>
> Last year when I was looking for a way to autostart that was the only
> way I could find that worked for me.  I will look into mod_wsgi
> though.  Any recommendations on the best tut's to use?

Is the official mod_wsgi documentation not enough?

http://code.google.com/p/modwsgi/wiki/InstallationInstructions
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines

http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears

And much much more at:

http://code.google.com/p/modwsgi/w/list

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 03:54:03 UTC
Permalink
On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
>
>
> > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > Hello All,
>
> > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > >    I have an application that works perfectly in dev mode and it
> > > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > Not sure why you use cgi instead of mod_wsgi, but you could try
> > > starting your app on production server /usr/bin/start-myapp.py
> > > prod.cfg and see if you get an error.
>
> > Last year when I was looking for a way to autostart that was the only
> > way I could find that worked for me.  I will look into mod_wsgi
> > though.  Any recommendations on the best tut's to use?
>
> Is the official mod_wsgi documentation not enough?
>
>  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
>  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
>  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> And much much more at:
>
>  http://code.google.com/p/modwsgi/w/list
>
> Graham

Truthfully, before tonight I never heard of it. I had my stuff
running with a cgi script so I was happy. Now if the TG document page
had mentioned this it would have made life much easier. I'm going to
look into implementing it in the morning. Right now I'm too flustered
with this 500 error that I cannot debug. You might be hearing back
from me for help, maybe not. :-D

Mel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-09 04:29:24 UTC
Permalink
On Sep 9, 1:54 pm, AZMel <***@gmail.com> wrote:
> On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
>
>
> > On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
> > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > > Hello All,
>
> > > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > > >    I have an application that works perfectly in dev mode and it
> > > > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > Not sure why you use cgi instead of mod_wsgi, but you could try
> > > > starting your app on production server /usr/bin/start-myapp.py
> > > > prod.cfg and see if you get an error.
>
> > > Last year when I was looking for a way to autostart that was the only
> > > way I could find that worked for me.  I will look into mod_wsgi
> > > though.  Any recommendations on the best tut's to use?
>
> > Is the official mod_wsgi documentation not enough?
>
> >  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> >  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> >  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > And much much more at:
>
> >  http://code.google.com/p/modwsgi/w/list
>
> > Graham
>
> Truthfully, before tonight I never heard of it.  I had my stuff
> running with a cgi script so I was happy.  Now if the TG document page
> had mentioned this it would have made life much easier.  I'm going to
> look into implementing it in the morning.  Right now I'm too flustered
> with this 500 error that I cannot debug.  You might be hearing back
> from me for help, maybe not.  :-D

The mod_wsgi package is mentioned and directly/indirectly linked off:

http://docs.turbogears.org/1.0/Deployment
http://docs.turbogears.org/2.0/Deployment

I agree though that there are many options listed there and not
obvious why one would use one over another.

Graham


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Christopher Arndt
2008-09-09 11:11:57 UTC
Permalink
Graham Dumpleton schrieb:
> The mod_wsgi package is mentioned and directly/indirectly linked off:
>
> http://docs.turbogears.org/1.0/Deployment
> http://docs.turbogears.org/2.0/Deployment
>
> I agree though that there are many options listed there and not
> obvious why one would use one over another.

I added a note to the first page with a recommendation to use either a
mod_wsgi or a reverse proxy based setup.

Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 14:34:15 UTC
Permalink
On Sep 8, 9:29 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 9, 1:54 pm, AZMel <***@gmail.com> wrote:
>
>
>
> > On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
> > wrote:
>
> > > On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
> > > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > > > Hello All,
>
> > > > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > > > >    I have an application that works perfectly in dev mode and it
> > > > > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > > Not sure why you use cgi instead of mod_wsgi, but you could try
> > > > > starting your app on production server /usr/bin/start-myapp.py
> > > > > prod.cfg and see if you get an error.
>
> > > > Last year when I was looking for a way to autostart that was the only
> > > > way I could find that worked for me.  I will look into mod_wsgi
> > > > though.  Any recommendations on the best tut's to use?
>
> > > Is the official mod_wsgi documentation not enough?
>
> > >  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> > >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> > >  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > > And much much more at:
>
> > >  http://code.google.com/p/modwsgi/w/list
>
> > > Graham
>
> > Truthfully, before tonight I never heard of it.  I had my stuff
> > running with a cgi script so I was happy.  Now if the TG document page
> > had mentioned this it would have made life much easier.  I'm going to
> > look into implementing it in the morning.  Right now I'm too flustered
> > with this 500 error that I cannot debug.  You might be hearing back
> > from me for help, maybe not.  :-D
>
> The mod_wsgi package is mentioned and directly/indirectly linked off:
>
>  http://docs.turbogears.org/1.0/Deployment
>  http://docs.turbogears.org/2.0/Deployment
>
> I agree though that there are many options listed there and not
> obvious why one would use one over another.
>
> Graham

I followed the directions for the 1.0 deployment but get a 404 error.
The path '/' was not found.

[Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
operations
[Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
registration for signal 15 ignored.
[Tue Sep 09 07:15:04 2008] [warn] File "/usr/local/turbogears/myapp/
apache/myapp.wsgi", line 9, in <module>
[Tue Sep 09 07:15:04 2008] [warn] import cherrypy
[Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
<module>
[Tue Sep 09 07:15:04 2008] [warn] import _cpserver
[Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
<module>
[Tue Sep 09 07:15:04 2008] [warn] from cherrypy._cpengine import
Engine, STOPPED, STARTING, STARTED
[Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
<module>
[Tue Sep 09 07:15:04 2008] [warn] signal.signal(signal.SIGTERM,
SIGTERM)
[Tue Sep 09 07:15:06 2008] [error] Identity starting
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.User"
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.Group"
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.Permission"
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.VisitIdentity"
[Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.User"
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.Group"
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.Permission"
[Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
"stumbaugh.model.VisitIdentity"
[Tue Sep 09 07:15:06 2008] [error] - - "GET / HTTP/1.1" 404 714 ""
"Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
0.99+1.00pre12-1.2)"

my wsgi file is the same as the one in the 1.0 deployment doc with the
exception of myapp being used where needed.

I will say the guide was extremely easy to follow. Nice work. Now if
I can get the page to serve.....


Mel



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-09 15:15:50 UTC
Permalink
> I followed the directions for the 1.0 deployment but get a 404 error.
> The path '/' was not found.
>
> [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
> 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> operations
> [Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
> registration for signal 15 ignored.
> [Tue Sep 09 07:15:04 2008] [warn] File "/usr/local/turbogears/myapp/
> apache/myapp.wsgi", line 9, in <module>
> [Tue Sep 09 07:15:04 2008] [warn] import cherrypy
> [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> <module>
> [Tue Sep 09 07:15:04 2008] [warn] import _cpserver
> [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> <module>
> [Tue Sep 09 07:15:04 2008] [warn] from cherrypy._cpengine import
> Engine, STOPPED, STARTING, STARTED
> [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> <module>
> [Tue Sep 09 07:15:04 2008] [warn] signal.signal(signal.SIGTERM,
> SIGTERM)
> [Tue Sep 09 07:15:06 2008] [error] Identity starting
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.User"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Group"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Permission"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.VisitIdentity"
> [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.User"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Group"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Permission"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.VisitIdentity"
> [Tue Sep 09 07:15:06 2008] [error] - - "GET / HTTP/1.1" 404 714 ""
> "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> 0.99+1.00pre12-1.2)"
>
> my wsgi file is the same as the one in the 1.0 deployment doc with the
> exception of myapp being used where needed.
>
> I will say the guide was extremely easy to follow. Nice work. Now if
> I can get the page to serve.....

is you application called myapp? You have to change that to what ever
you app name is.
Did you put it in right folders?
Is the permission set properly?

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 15:53:32 UTC
Permalink
On Sep 9, 8:15 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> > I followed the directions for the 1.0 deployment but get a 404 error.
> > The path '/' was not found.
>
> > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
> > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> > operations
> > [Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
> > registration for signal 15 ignored.
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> > apache/myapp.wsgi", line 9, in <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> > <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> > <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> > Engine, STOPPED, STARTING, STARTED
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> > <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> > SIGTERM)
> > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.User"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Group"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Permission"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.VisitIdentity"
> > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.User"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Group"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Permission"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.VisitIdentity"
> > [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> > 0.99+1.00pre12-1.2)"
>
> > my wsgi file is the same as the one in the 1.0 deployment doc with the
> > exception of myapp being used where needed.
>
> > I will say the guide was extremely easy to follow.  Nice work.  Now if
> > I can get the page to serve.....
>
> is you application called myapp? You have to change that to what ever
> you app name is.
> Did you put it in right folders?
> Is the permission set properly?
>
> Lucas

Everything seems correct in regards to permissions and folders. What
I did figure out is that I can get pages served when I goto
http://192.168.1.9/myapp/myapp rather than http://192.168.1.9/myapp.
However I cannot follow links because that all refer to /myapp. I
know its a configuration issue, just not sure where to look.

Mel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-09 16:05:03 UTC
Permalink
On Tue, Sep 9, 2008 at 10:53 AM, AZMel <***@gmail.com> wrote:
>
>
>
> On Sep 9, 8:15 am, "Lukasz Szybalski" <***@gmail.com> wrote:
>> > I followed the directions for the 1.0 deployment but get a 404 error.
>> > The path '/' was not found.
>>
>> > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
>> > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
>> > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
>> > operations
>> > [Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
>> > registration for signal 15 ignored.
>> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/local/turbogears/myapp/
>> > apache/myapp.wsgi", line 9, in <module>
>> > [Tue Sep 09 07:15:04 2008] [warn] import cherrypy
>> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
>> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
>> > <module>
>> > [Tue Sep 09 07:15:04 2008] [warn] import _cpserver
>> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
>> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
>> > <module>
>> > [Tue Sep 09 07:15:04 2008] [warn] from cherrypy._cpengine import
>> > Engine, STOPPED, STARTING, STARTED
>> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
>> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
>> > <module>
>> > [Tue Sep 09 07:15:04 2008] [warn] signal.signal(signal.SIGTERM,
>> > SIGTERM)
>> > [Tue Sep 09 07:15:06 2008] [error] Identity starting
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.User"
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.Group"
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.Permission"
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.VisitIdentity"
>> > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.User"
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.Group"
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.Permission"
>> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> > "stumbaugh.model.VisitIdentity"
>> > [Tue Sep 09 07:15:06 2008] [error] - - "GET / HTTP/1.1" 404 714 ""
>> > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
>> > 0.99+1.00pre12-1.2)"
>>
>> > my wsgi file is the same as the one in the 1.0 deployment doc with the
>> > exception of myapp being used where needed.
>>
>> > I will say the guide was extremely easy to follow. Nice work. Now if
>> > I can get the page to serve.....
>>
>> is you application called myapp? You have to change that to what ever
>> you app name is.
>> Did you put it in right folders?
>> Is the permission set properly?
>>
>> Lucas
>
> Everything seems correct in regards to permissions and folders. What
> I did figure out is that I can get pages served when I goto
> http://192.168.1.9/myapp/myapp rather than http://192.168.1.9/myapp.
> However I cannot follow links because that all refer to /myapp. I
> know its a configuration issue, just not sure where to look.

Do you want to serve you app in / or /myapp/

Read the myapp.wsgi configuration file which tells you what to comment
and uncomment to get / or /myapp/ as base.
Play around with it and it should work.
Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 20:08:28 UTC
Permalink
On Sep 9, 9:05 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> On Tue, Sep 9, 2008 at 10:53 AM, AZMel <***@gmail.com> wrote:
>
> > On Sep 9, 8:15 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> >> > I followed the directions for the 1.0 deployment but get a 404 error.
> >> > The path '/' was not found.
>
> >> > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> >> > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
> >> > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> >> > operations
> >> > [Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
> >> > registration for signal 15 ignored.
> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> >> > apache/myapp.wsgi", line 9, in <module>
> >> > [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> >> > <module>
> >> > [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> >> > <module>
> >> > [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> >> > Engine, STOPPED, STARTING, STARTED
> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> >> > <module>
> >> > [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> >> > SIGTERM)
> >> > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.User"
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.Group"
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.Permission"
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.VisitIdentity"
> >> > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.User"
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.Group"
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.Permission"
> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> > "stumbaugh.model.VisitIdentity"
> >> > [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> >> > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> >> > 0.99+1.00pre12-1.2)"
>
> >> > my wsgi file is the same as the one in the 1.0 deployment doc with the
> >> > exception of myapp being used where needed.
>
> >> > I will say the guide was extremely easy to follow.  Nice work.  Now if
> >> > I can get the page to serve.....
>
> >> is you application called myapp? You have to change that to what ever
> >> you app name is.
> >> Did you put it in right folders?
> >> Is the permission set properly?
>
> >> Lucas
>
> > Everything seems correct in regards to permissions and folders.  What
> > I did figure out is that I can get pages served when I goto
> >http://192.168.1.9/myapp/myapprather thanhttp://192.168.1.9/myapp.
> > However I cannot follow links because that all refer to /myapp.  I
> > know its a configuration issue, just not sure where to look.
>
> Do you want to serve you app in / or /myapp/
>
> Read the myapp.wsgi configuration file which tells you what to comment
> and uncomment to get / or /myapp/ as base.
> Play around with it and it should work.
> Lucas

Well I have tested both dev and prod extensively and they both work
fine if server.webpath is not set. When I run the app through wsgi
and leave the webpath things go awry where I force the front page to
display but any links (login, subcontrollers,etc) all resolve to
http://192.168.1.9/ and not http://192.168.1.9/myapp/. Also If I
reconfigure to run root mounted I get this error:
[Tue Sep 09 13:01:50 2008] [error] [client 192.168.1.5] mod_wsgi
(pid=5299): Target WSGI script '/usr/local/turbogears/myapp/apache/
myapp.wsgi' cannot be loaded as Python module.
[Tue Sep 09 13:01:50 2008] [error] [client 192.168.1.5] mod_wsgi
(pid=5299): Exception occurred processing WSGI script '/usr/local/
turbogears/myapp/apache/myapp.wsgi'.
[Tue Sep 09 13:01:50 2008] [error] [client 192.168.1.5] Traceback
(most recent call last):
[Tue Sep 09 13:01:50 2008] [error] [client 192.168.1.5] File "/usr/
local/turbogears/myapp/apache/myapp.wsgi", line 30, in <module>
[Tue Sep 09 13:01:50 2008] [error] [client 192.168.1.5]
application = cherrypy._cpwsgi.wsgiAppi
[Tue Sep 09 13:01:50 2008] [error] [client 192.168.1.5]
AttributeError: 'module' object has no attribute 'wsgiAppi'

If I point my browser to 192.168.1.9 I get a directory listing of /var/
www

Are there other server variables that I need to set?

Not sure how to proceed.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-09 21:13:24 UTC
Permalink
On Tue, Sep 9, 2008 at 3:08 PM, AZMel <***@gmail.com> wrote:
>
>
>
> On Sep 9, 9:05 am, "Lukasz Szybalski" <***@gmail.com> wrote:
>> On Tue, Sep 9, 2008 at 10:53 AM, AZMel <***@gmail.com> wrote:
>>
>> > On Sep 9, 8:15 am, "Lukasz Szybalski" <***@gmail.com> wrote:
>> >> > I followed the directions for the 1.0 deployment but get a 404 error.
>> >> > The path '/' was not found.
>>
>> >> > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
>> >> > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
>> >> > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
>> >> > operations
>> >> > [Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
>> >> > registration for signal 15 ignored.
>> >> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/local/turbogears/myapp/
>> >> > apache/myapp.wsgi", line 9, in <module>
>> >> > [Tue Sep 09 07:15:04 2008] [warn] import cherrypy
>> >> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
>> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
>> >> > <module>
>> >> > [Tue Sep 09 07:15:04 2008] [warn] import _cpserver
>> >> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
>> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
>> >> > <module>
>> >> > [Tue Sep 09 07:15:04 2008] [warn] from cherrypy._cpengine import
>> >> > Engine, STOPPED, STARTING, STARTED
>> >> > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
>> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
>> >> > <module>
>> >> > [Tue Sep 09 07:15:04 2008] [warn] signal.signal(signal.SIGTERM,
>> >> > SIGTERM)
>> >> > [Tue Sep 09 07:15:06 2008] [error] Identity starting
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.User"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.Group"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.Permission"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.VisitIdentity"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.User"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.Group"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.Permission"
>> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
>> >> > "stumbaugh.model.VisitIdentity"
>> >> > [Tue Sep 09 07:15:06 2008] [error] - - "GET / HTTP/1.1" 404 714 ""
>> >> > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
>> >> > 0.99+1.00pre12-1.2)"
>>
>> >> > my wsgi file is the same as the one in the 1.0 deployment doc with the
>> >> > exception of myapp being used where needed.
>>
>> >> > I will say the guide was extremely easy to follow. Nice work. Now if
>> >> > I can get the page to serve.....
>>
>> >> is you application called myapp? You have to change that to what ever
>> >> you app name is.
>> >> Did you put it in right folders?
>> >> Is the permission set properly?
>>
>> >> Lucas
>>
>> > Everything seems correct in regards to permissions and folders. What
>> > I did figure out is that I can get pages served when I goto
>> >http://192.168.1.9/myapp/myapprather thanhttp://192.168.1.9/myapp.

I forgot to ask here... is your package called "myapp" and you have a
function in controller.py called "myapp" if yes this will cause
problems. They cannot have the same name.



>> > However I cannot follow links because that all refer to /myapp. I
>> > know its a configuration issue, just not sure where to look.
>>
>> Do you want to serve you app in / or /myapp/
>>
>> Read the myapp.wsgi configuration file which tells you what to comment
>> and uncomment to get / or /myapp/ as base.
>> Play around with it and it should work.
>> Lucas
>
> Well I have tested both dev and prod extensively and they both work
> fine if server.webpath is not set. When I run the app through wsgi
> and leave the webpath things go awry where I force the front page to
> display but any links (login, subcontrollers,etc) all resolve to
> http://192.168.1.9/ and not http://192.168.1.9/myapp/.

There is a similar config variable to server.webpath file in prod.cfg
that needs to be set I think. You would need to search the archives.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 22:51:40 UTC
Permalink
On Sep 9, 2:13 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> On Tue, Sep 9, 2008 at 3:08 PM, AZMel <***@gmail.com> wrote:
>
> > On Sep 9, 9:05 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> >> On Tue, Sep 9, 2008 at 10:53 AM, AZMel <***@gmail.com> wrote:
>
> >> > On Sep 9, 8:15 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> >> >> > I followed the directions for the 1.0 deployment but get a 404 error.
> >> >> > The path '/' was not found.
>
> >> >> > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> >> >> > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_wsgi/
> >> >> > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> >> >> > operations
> >> >> > [Tue Sep 09 07:15:04 2008] [warn] mod_wsgi (pid=31143): Callback
> >> >> > registration for signal 15 ignored.
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> >> >> > apache/myapp.wsgi", line 9, in <module>
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> >> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> >> >> > <module>
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> >> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> >> >> > <module>
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> >> >> > Engine, STOPPED, STARTING, STARTED
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> >> >> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> >> >> > <module>
> >> >> > [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> >> >> > SIGTERM)
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.User"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.Group"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.Permission"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.VisitIdentity"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.User"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.Group"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.Permission"
> >> >> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> >> >> > "stumbaugh.model.VisitIdentity"
> >> >> > [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> >> >> > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> >> >> > 0.99+1.00pre12-1.2)"
>
> >> >> > my wsgi file is the same as the one in the 1.0 deployment doc with the
> >> >> > exception of myapp being used where needed.
>
> >> >> > I will say the guide was extremely easy to follow.  Nice work.  Now if
> >> >> > I can get the page to serve.....
>
> >> >> is you application called myapp? You have to change that to what ever
> >> >> you app name is.
> >> >> Did you put it in right folders?
> >> >> Is the permission set properly?
>
> >> >> Lucas
>
> >> > Everything seems correct in regards to permissions and folders.  What
> >> > I did figure out is that I can get pages served when I goto
> >> >http://192.168.1.9/myapp/myappratherthanhttp://192.168.1.9/myapp.
>
> I forgot to ask here... is your package called "myapp" and you have a
> function in controller.py called "myapp" if yes this will cause
> problems. They cannot have the same name.
>
No, nothing similar. All I have is ReportsController.

> >> > However I cannot follow links because that all refer to /myapp.  I
> >> > know its a configuration issue, just not sure where to look.
>
> >> Do you want to serve you app in / or /myapp/
>
> >> Read the myapp.wsgi configuration file which tells you what to comment
> >> and uncomment to get / or /myapp/ as base.
> >> Play around with it and it should work.
> >> Lucas
>
> > Well I have tested both dev and prod extensively and they both work
> > fine if server.webpath is not set.  When I run the app through wsgi
> > and leave the webpath things go awry where I force the front page to
> > display but any links (login, subcontrollers,etc) all resolve to
> >http://192.168.1.9/and nothttp://192.168.1.9/myapp/.
>
> There is a similar config variable to server.webpath file in prod.cfg
> that needs to be set I think. You would need to search the archives.

I did see a thread between you and Graham back in last part of January
and my symptoms are the same. Out of curiosity I rebuilt the app
using the tgbig template but have the results. I also renamed web
link to webapps so http://192.168.1.9/webapps will get you to the app
but navigating from there brings you to http://192.168.1.9/reports or
http://192.168.1.9/login rather than http://192.168.1.9/webapps/reports
or http://192.168.1.9/webapps/login as would work. What is the magic?

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-09 22:55:24 UTC
Permalink
Post your WSGI script file so we can see it.

Also post the relevant configuration directives from the Apache
configuration file for mod_wsgi setup so can see that as well.

This way we can see exactly what you have done rather than you saying
what you have done. You could have done something trivially wrong for
all we know but you might think it is okay.

Graham

On Sep 10, 12:34 am, AZMel <***@gmail.com> wrote:
> On Sep 8, 9:29 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
>
>
> > On Sep 9, 1:54 pm, AZMel <***@gmail.com> wrote:
>
> > > On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
> > > wrote:
>
> > > > On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
> > > > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > > > > Hello All,
>
> > > > > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > > > > >    I have an application that works perfectly in dev mode and it
> > > > > > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > > > Not sure why you use cgi instead ofmod_wsgi, but you could try
> > > > > > starting your app on production server /usr/bin/start-myapp.py
> > > > > > prod.cfg and see if you get an error.
>
> > > > > Last year when I was looking for a way to autostart that was the only
> > > > > way I could find that worked for me.  I will look intomod_wsgi
> > > > > though.  Any recommendations on the best tut's to use?
>
> > > > Is the officialmod_wsgidocumentation not enough?
>
> > > >  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> > > >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> > > >  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> > > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > > > And much much more at:
>
> > > >  http://code.google.com/p/modwsgi/w/list
>
> > > > Graham
>
> > > Truthfully, before tonight I never heard of it.  I had my stuff
> > > running with a cgi script so I was happy.  Now if the TG document page
> > > had mentioned this it would have made life much easier.  I'm going to
> > > look into implementing it in the morning.  Right now I'm too flustered
> > > with this 500 error that I cannot debug.  You might be hearing back
> > > from me for help, maybe not.  :-D
>
> > Themod_wsgipackage is mentioned and directly/indirectly linked off:
>
> >  http://docs.turbogears.org/1.0/Deployment
> >  http://docs.turbogears.org/2.0/Deployment
>
> > I agree though that there are many options listed there and not
> > obvious why one would use one over another.
>
> > Graham
>
> I followed the directions for the 1.0 deployment but get a 404 error.
> The path '/' was not found.
>
> [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8emod_wsgi/
> 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> operations
> [Tue Sep 09 07:15:04 2008] [warn]mod_wsgi(pid=31143): Callback
> registration for signal 15 ignored.
> [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> apache/myapp.wsgi", line 9, in <module>
> [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> <module>
> [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> <module>
> [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> Engine, STOPPED, STARTING, STARTED
> [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> <module>
> [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> SIGTERM)
> [Tue Sep 09 07:15:06 2008] [error] Identity starting
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.User"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Group"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Permission"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.VisitIdentity"
> [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.User"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Group"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.Permission"
> [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> "stumbaugh.model.VisitIdentity"
> [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> 0.99+1.00pre12-1.2)"
>
> my wsgi file is the same as the one in the 1.0 deployment doc with the
> exception of myapp being used where needed.
>
> I will say the guide was extremely easy to follow.  Nice work.  Now if
> I can get the page to serve.....
>
> Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-09 23:05:05 UTC
Permalink
On Sep 9, 3:55 pm, Graham Dumpleton <***@gmail.com>
wrote:
> Post your WSGI script file so we can see it.
>
> Also post the relevant configuration directives from the Apache
> configuration file for mod_wsgi setup so can see that as well.
>
> This way we can see exactly what you have done rather than you saying
> what you have done. You could have done something trivially wrong for
> all we know but you might think it is okay.
>
> Graham
>
> On Sep 10, 12:34 am, AZMel <***@gmail.com> wrote:
>
> > On Sep 8, 9:29 pm, Graham Dumpleton <***@gmail.com>
> > wrote:
>
> > > On Sep 9, 1:54 pm, AZMel <***@gmail.com> wrote:
>
> > > > On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
> > > > wrote:
>
> > > > > On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
> > > > > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > > > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > > > > > Hello All,
>
> > > > > > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > > > > > >    I have an application that works perfectly in dev mode and it
> > > > > > > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > > > > Not sure why you use cgi instead ofmod_wsgi, but you could try
> > > > > > > starting your app on production server /usr/bin/start-myapp.py
> > > > > > > prod.cfg and see if you get an error.
>
> > > > > > Last year when I was looking for a way to autostart that was the only
> > > > > > way I could find that worked for me.  I will look intomod_wsgi
> > > > > > though.  Any recommendations on the best tut's to use?
>
> > > > > Is the officialmod_wsgidocumentation not enough?
>
> > > > >  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> > > > >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> > > > >  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> > > > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > > > > And much much more at:
>
> > > > >  http://code.google.com/p/modwsgi/w/list
>
> > > > > Graham
>
> > > > Truthfully, before tonight I never heard of it.  I had my stuff
> > > > running with a cgi script so I was happy.  Now if the TG document page
> > > > had mentioned this it would have made life much easier.  I'm going to
> > > > look into implementing it in the morning.  Right now I'm too flustered
> > > > with this 500 error that I cannot debug.  You might be hearing back
> > > > from me for help, maybe not.  :-D
>
> > > Themod_wsgipackage is mentioned and directly/indirectly linked off:
>
> > >  http://docs.turbogears.org/1.0/Deployment
> > >  http://docs.turbogears.org/2.0/Deployment
>
> > > I agree though that there are many options listed there and not
> > > obvious why one would use one over another.
>
> > > Graham
>
> > I followed the directions for the 1.0 deployment but get a 404 error.
> > The path '/' was not found.
>
> > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8emod_wsgi/
> > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> > operations
> > [Tue Sep 09 07:15:04 2008] [warn]mod_wsgi(pid=31143): Callback
> > registration for signal 15 ignored.
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> > apache/myapp.wsgi", line 9, in <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> > <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> > <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> > Engine, STOPPED, STARTING, STARTED
> > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> > <module>
> > [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> > SIGTERM)
> > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.User"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Group"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Permission"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.VisitIdentity"
> > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.User"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Group"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.Permission"
> > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > "stumbaugh.model.VisitIdentity"
> > [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> > 0.99+1.00pre12-1.2)"
>
> > my wsgi file is the same as the one in the 1.0 deployment doc with the
> > exception of myapp being used where needed.
>
> > I will say the guide was extremely easy to follow.  Nice work.  Now if
> > I can get the page to serve.....
>
> > Mel

most current webapps.wsgi

import sys
sys.path.append('/usr/local/turbogears/myclient')
sys.stdout = sys.stderr

import os
#os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myclient'

import atexit
import cherrypy
import cherrypy._cpwsgi
import turbogears

turbogears.update_config(configfile="/usr/local/turbogears/myclient/
prod.cfg", modulename="myclient.config")
turbogears.config.update({'global': {'server.environment':
'production'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': True}})

#For non root mounted app:
turbogears.config.update({'global': {'server.webpath': '/'}})

import myclient.controllers.root
import myclient.controllers.reports

cherrypy.root = myclient.controllers.Root()

if cherrypy.server.state == 0:
atexit.register(cherrypy.server.stop)
cherrypy.server.start(init_only=True, server_class=None)

#For root mounted app
#application = cherrypy._cpwsgi.wsgiAppi

#For none-root mounted app
def application(environ, start_response):
environ['SCRIPT_NAME'] = ''
return cherrypy._cpwsgi.wsgiApp(environ, start_response)


most current apache webapps

Alias /static /usr/local/turbogears/myclient/myclient/static

WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
webapps.wsgi

<Directory /usr/local/turbogears/myclient/apache>
Order deny,allow
Allow from all
</Directory>

I sure hope you spot something I missed. It's driving to drink.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-09 23:39:24 UTC
Permalink
On Sep 10, 9:05 am, AZMel <***@gmail.com> wrote:
> On Sep 9, 3:55 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
>
>
> > Post your WSGI script file so we can see it.
>
> > Also post the relevant configuration directives from the Apache
> > configuration file for mod_wsgi setup so can see that as well.
>
> > This way we can see exactly what you have done rather than you saying
> > what you have done. You could have done something trivially wrong for
> > all we know but you might think it is okay.
>
> > Graham
>
> > On Sep 10, 12:34 am, AZMel <***@gmail.com> wrote:
>
> > > On Sep 8, 9:29 pm, Graham Dumpleton <***@gmail.com>
> > > wrote:
>
> > > > On Sep 9, 1:54 pm, AZMel <***@gmail.com> wrote:
>
> > > > > On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
> > > > > wrote:
>
> > > > > > On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
> > > > > > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > > > > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > > > > > > Hello All,
>
> > > > > > > > > I'm at a bit of a loss and I now turn to you for help.
>
> > > > > > > > > I have an application that works perfectly in dev mode and it
> > > > > > > > > works fine when I manually start /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > > > > > Not sure why you use cgi instead ofmod_wsgi, but you could try
> > > > > > > > starting your app on production server /usr/bin/start-myapp.py
> > > > > > > > prod.cfg and see if you get an error.
>
> > > > > > > Last year when I was looking for a way to autostart that was the only
> > > > > > > way I could find that worked for me. I will look intomod_wsgi
> > > > > > > though. Any recommendations on the best tut's to use?
>
> > > > > > Is the officialmod_wsgidocumentation not enough?
>
> > > > > > http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> > > > > > http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> > > > > > http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> > > > > > http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > > > > > And much much more at:
>
> > > > > > http://code.google.com/p/modwsgi/w/list
>
> > > > > > Graham
>
> > > > > Truthfully, before tonight I never heard of it. I had my stuff
> > > > > running with a cgi script so I was happy. Now if the TG document page
> > > > > had mentioned this it would have made life much easier. I'm going to
> > > > > look into implementing it in the morning. Right now I'm too flustered
> > > > > with this 500 error that I cannot debug. You might be hearing back
> > > > > from me for help, maybe not. :-D
>
> > > > Themod_wsgipackage is mentioned and directly/indirectly linked off:
>
> > > > http://docs.turbogears.org/1.0/Deployment
> > > > http://docs.turbogears.org/2.0/Deployment
>
> > > > I agree though that there are many options listed there and not
> > > > obvious why one would use one over another.
>
> > > > Graham
>
> > > I followed the directions for the 1.0 deployment but get a 404 error.
> > > The path '/' was not found.
>
> > > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> > > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8emod_wsgi/
> > > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> > > operations
> > > [Tue Sep 09 07:15:04 2008] [warn]mod_wsgi(pid=31143): Callback
> > > registration for signal 15 ignored.
> > > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/local/turbogears/myapp/
> > > apache/myapp.wsgi", line 9, in <module>
> > > [Tue Sep 09 07:15:04 2008] [warn] import cherrypy
> > > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
> > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> > > <module>
> > > [Tue Sep 09 07:15:04 2008] [warn] import _cpserver
> > > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
> > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> > > <module>
> > > [Tue Sep 09 07:15:04 2008] [warn] from cherrypy._cpengine import
> > > Engine, STOPPED, STARTING, STARTED
> > > [Tue Sep 09 07:15:04 2008] [warn] File "/usr/lib/python2.5/site-
> > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> > > <module>
> > > [Tue Sep 09 07:15:04 2008] [warn] signal.signal(signal.SIGTERM,
> > > SIGTERM)
> > > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.User"
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.Group"
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.Permission"
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.VisitIdentity"
> > > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.User"
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.Group"
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.Permission"
> > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > "stumbaugh.model.VisitIdentity"
> > > [Tue Sep 09 07:15:06 2008] [error] - - "GET / HTTP/1.1" 404 714 ""
> > > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> > > 0.99+1.00pre12-1.2)"
>
> > > my wsgi file is the same as the one in the 1.0 deployment doc with the
> > > exception of myapp being used where needed.
>
> > > I will say the guide was extremely easy to follow. Nice work. Now if
> > > I can get the page to serve.....
>
> > > Mel
>
> most current webapps.wsgi
>
> import sys
> sys.path.append('/usr/local/turbogears/myclient')
> sys.stdout = sys.stderr
>
> import os
> #os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myclient'
>
> import atexit
> import cherrypy
> import cherrypy._cpwsgi
> import turbogears
>
> turbogears.update_config(configfile="/usr/local/turbogears/myclient/
> prod.cfg", modulename="myclient.config")
> turbogears.config.update({'global': {'server.environment':
> 'production'}})
> turbogears.config.update({'global': {'autoreload.on': False}})
> turbogears.config.update({'global': {'server.log_to_screen': True}})
>
> #For non root mounted app:
> turbogears.config.update({'global': {'server.webpath': '/'}})
>
> import myclient.controllers.root
> import myclient.controllers.reports
>
> cherrypy.root = myclient.controllers.Root()
>
> if cherrypy.server.state == 0:
> atexit.register(cherrypy.server.stop)
> cherrypy.server.start(init_only=True, server_class=None)
>
> #For root mounted app
> #application = cherrypy._cpwsgi.wsgiAppi
>
> #For none-root mounted app
> def application(environ, start_response):
> environ['SCRIPT_NAME'] = ''
> return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> most current apache webapps
>
> Alias /static /usr/local/turbogears/myclient/myclient/static
>
> WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
> webapps.wsgi
>
> <Directory /usr/local/turbogears/myclient/apache>
> Order deny,allow
> Allow from all
> </Directory>
>
> I sure hope you spot something I missed. It's driving to drink.

If you are going to use:

WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
webapps.wsgi

You need to have:

turbogears.config.update({'global': {'server.webpath': '/webapps'}})

If it is instead mounted at root then you shouldn't set server.webpath
(just to be safe).

With those matching, then describe the behaviour you are seeing,
indicating the URL being requested and what URL page is pushing back.

Also indicate whether for code generating problem page, is using url()
function described in:

http://docs.turbogears.org/1.0/GettingStarted/URLs

being used or are you hard coding URLs in the generated pages.

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 00:08:21 UTC
Permalink
On Sep 9, 4:39 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 10, 9:05 am, AZMel <***@gmail.com> wrote:
>
>
>
> > On Sep 9, 3:55 pm, Graham Dumpleton <***@gmail.com>
> > wrote:
>
> > > Post your WSGI script file so we can see it.
>
> > > Also post the relevant configuration directives from the Apache
> > > configuration file for mod_wsgi setup so can see that as well.
>
> > > This way we can see exactly what you have done rather than you saying
> > > what you have done. You could have done something trivially wrong for
> > > all we know but you might think it is okay.
>
> > > Graham
>
> > > On Sep 10, 12:34 am, AZMel <***@gmail.com> wrote:
>
> > > > On Sep 8, 9:29 pm, Graham Dumpleton <***@gmail.com>
> > > > wrote:
>
> > > > > On Sep 9, 1:54 pm, AZMel <***@gmail.com> wrote:
>
> > > > > > On Sep 8, 8:29 pm, Graham Dumpleton <***@gmail.com>
> > > > > > wrote:
>
> > > > > > > On Sep 9, 1:08 pm, AZMel <***@gmail.com> wrote:
>
> > > > > > > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > > > > > > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <***@gmail.com> wrote:
>
> > > > > > > > > > Hello All,
>
> > > > > > > > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > > > > > > > >    I have an application that works perfectly in dev mode and it
> > > > > > > > > > works fine when I manually start  /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > > > > > > Not sure why you use cgi instead ofmod_wsgi, but you could try
> > > > > > > > > starting your app on production server /usr/bin/start-myapp.py
> > > > > > > > > prod.cfg and see if you get an error.
>
> > > > > > > > Last year when I was looking for a way to autostart that was the only
> > > > > > > > way I could find that worked for me.  I will look intomod_wsgi
> > > > > > > > though.  Any recommendations on the best tut's to use?
>
> > > > > > > Is the officialmod_wsgidocumentation not enough?
>
> > > > > > >  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> > > > > > >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> > > > > > >  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> > > > > > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > > > > > > And much much more at:
>
> > > > > > >  http://code.google.com/p/modwsgi/w/list
>
> > > > > > > Graham
>
> > > > > > Truthfully, before tonight I never heard of it.  I had my stuff
> > > > > > running with a cgi script so I was happy.  Now if the TG document page
> > > > > > had mentioned this it would have made life much easier.  I'm going to
> > > > > > look into implementing it in the morning.  Right now I'm too flustered
> > > > > > with this 500 error that I cannot debug.  You might be hearing back
> > > > > > from me for help, maybe not.  :-D
>
> > > > > Themod_wsgipackage is mentioned and directly/indirectly linked off:
>
> > > > >  http://docs.turbogears.org/1.0/Deployment
> > > > >  http://docs.turbogears.org/2.0/Deployment
>
> > > > > I agree though that there are many options listed there and not
> > > > > obvious why one would use one over another.
>
> > > > > Graham
>
> > > > I followed the directions for the 1.0 deployment but get a 404 error.
> > > > The path '/' was not found.
>
> > > > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> > > > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8emod_wsgi/
> > > > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> > > > operations
> > > > [Tue Sep 09 07:15:04 2008] [warn]mod_wsgi(pid=31143): Callback
> > > > registration for signal 15 ignored.
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> > > > apache/myapp.wsgi", line 9, in <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> > > > <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> > > > <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> > > > Engine, STOPPED, STARTING, STARTED
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> > > > <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> > > > SIGTERM)
> > > > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.User"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Group"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Permission"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.VisitIdentity"
> > > > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.User"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Group"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Permission"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.VisitIdentity"
> > > > [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> > > > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> > > > 0.99+1.00pre12-1.2)"
>
> > > > my wsgi file is the same as the one in the 1.0 deployment doc with the
> > > > exception of myapp being used where needed.
>
> > > > I will say the guide was extremely easy to follow.  Nice work.  Now if
> > > > I can get the page to serve.....
>
> > > > Mel
>
> > most current webapps.wsgi
>
> > import sys
> > sys.path.append('/usr/local/turbogears/myclient')
> > sys.stdout = sys.stderr
>
> > import os
> > #os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myclient'
>
> > import atexit
> > import cherrypy
> > import cherrypy._cpwsgi
> > import turbogears
>
> > turbogears.update_config(configfile="/usr/local/turbogears/myclient/
> > prod.cfg", modulename="myclient.config")
> > turbogears.config.update({'global': {'server.environment':
> > 'production'}})
> > turbogears.config.update({'global': {'autoreload.on': False}})
> > turbogears.config.update({'global': {'server.log_to_screen': True}})
>
> > #For non root mounted app:
> > turbogears.config.update({'global': {'server.webpath': '/'}})
>
> > import myclient.controllers.root
> > import myclient.controllers.reports
>
> > cherrypy.root = myclient.controllers.Root()
>
> > if cherrypy.server.state == 0:
> >     atexit.register(cherrypy.server.stop)
> >     cherrypy.server.start(init_only=True, server_class=None)
>
> > #For root mounted app
> > #application = cherrypy._cpwsgi.wsgiAppi
>
> > #For none-root mounted app
> > def application(environ, start_response):
> >     environ['SCRIPT_NAME'] = ''
> >     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> > most current apache webapps
>
> > Alias /static /usr/local/turbogears/myclient/myclient/static
>
> > WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
> > webapps.wsgi
>
> > <Directory /usr/local/turbogears/myclient/apache>
> > Order deny,allow
> > Allow from all
> > </Directory>
>
> > I sure hope you spot something I missed.  It's driving to drink.
>
> If you are going to use:
>
>   WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
> webapps.wsgi
>
> You need to have:
>
>   turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> If it is instead mounted at root then you shouldn't set server.webpath
> (just to be safe).
>
> With those matching, then describe the behaviour you are seeing,
> indicating the URL being requested and what URL page is pushing back.
>
> Also indicate whether for code generating problem page, is using url()
> function described in:
>
>  http://docs.turbogears.org/1.0/GettingStarted/URLs
>
> being used or are you hard coding URLs in the generated pages.
>
> Graham

With /webapps put back into the server.webpath I get the following:

http://192.168.1.9/
This gets redirected to apache2-default/

http://192.168.1.9/webapps/
This comes up with a 404 error. path '/' not found.

http://192.168.1.9/webapps/webapps/
This comes up with the home page but no static content is sent
over. Also tg,url('/') returns /webapps which I would have expected /
webapps/webapps.

Remember that the app was developed with / being returned from
tg.url('/').

There seems to be a missing path somewhere but I don't know where.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 00:29:17 UTC
Permalink
On Sep 10, 10:08 am, AZMel <***@gmail.com> wrote:
> On Sep 9, 4:39 pm, Graham Dumpleton <***@gmail.com>
> > You need to have:
>
> >   turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> > If it is instead mounted at root then you shouldn't set server.webpath
> > (just to be safe).
>
> > With those matching, then describe the behaviour you are seeing,
> > indicating the URL being requested and what URL page is pushing back.
>
> > Also indicate whether for code generating problem page, is using url()
> > function described in:
>
> >  http://docs.turbogears.org/1.0/GettingStarted/URLs
>
> > being used or are you hard coding URLs in the generated pages.
>
> > Graham
>
> With /webapps put back into the server.webpath I get the following:
>
> http://192.168.1.9/
>     This gets redirected to apache2-default/
>
> http://192.168.1.9/webapps/
>     This comes up with a 404 error.  path '/' not found.
>
> http://192.168.1.9/webapps/webapps/
>     This comes up with the home page but no static content is sent
> over.  Also tg,url('/') returns /webapps which I would have expected /
> webapps/webapps.
>
> Remember that the app was developed with / being returned from
> tg.url('/').
>
> There seems to be a missing path somewhere but I don't know where.

This is where my knowledge of CherryPy/TurboGears is a bit lacking,
but from looking at documentation, how is your top level controller
object defined. Ie., what are the names of the exposed methods? Ie.,
what is:

myclient.controllers.Root

defined as?

I would expect to see an index() method. Have you perhaps called it
webapps() instead?

Graham



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 01:02:00 UTC
Permalink
On Sep 10, 10:42 am, AZMel <***@gmail.com> wrote:
> On Sep 9, 5:29 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
>
>
> > On Sep 10, 10:08 am, AZMel <***@gmail.com> wrote:
>
> > > On Sep 9, 4:39 pm, Graham Dumpleton <***@gmail.com>
> > > > You need to have:
>
> > > >   turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> > > > If it is instead mounted at root then you shouldn't set server.webpath
> > > > (just to be safe).
>
> > > > With those matching, then describe the behaviour you are seeing,
> > > > indicating the URL being requested and what URL page is pushing back.
>
> > > > Also indicate whether for code generating problem page, is using url()
> > > > function described in:
>
> > > >  http://docs.turbogears.org/1.0/GettingStarted/URLs
>
> > > > being used or are you hard coding URLs in the generated pages.
>
> > > > Graham
>
> > > With /webapps put back into the server.webpath I get the following:
>
> > >http://192.168.1.9/
> > >     This gets redirected to apache2-default/
>
> > >http://192.168.1.9/webapps/
> > >     This comes up with a 404 error.  path '/' not found.
>
> > >http://192.168.1.9/webapps/webapps/
> > >     This comes up with the home page but no static content is sent
> > > over.  Also tg,url('/') returns /webapps which I would have expected /
> > > webapps/webapps.
>
> > > Remember that the app was developed with / being returned from
> > > tg.url('/').
>
> > > There seems to be a missing path somewhere but I don't know where.
>
> > This is where my knowledge of CherryPy/TurboGears is a bit lacking,
> > but from looking at documentation, how is your top level controller
> > object defined. Ie., what are the names of the exposed methods? Ie.,
> > what is:
>
> >   myclient.controllers.Root
>
> > defined as?
>
> > I would expect to see an index() method. Have you perhaps called it
> > webapps() instead?
>
> > Graham
>
> I switched over to the tgbig template this afternoon to try to get
> different results but they stayed the same.
>
> This is what my controller looks like:
>
> import turbogears as tg
> from turbogears import controllers, expose, flash
> from turbogears import identity, redirect
> from cherrypy import request, response
>
> from myclient.controllers.reports import ReportsController
>
> class Root(controllers.RootController):
>     reports = ReportsController()
>     @expose(template="myclient.templates.welcome")
>     # @identity.require(identity.in_group("admin"))
>     def index(self):
>
> ...etc...
>
> Except for the 500 error, which was the whole basis for this thread to
> begin with, my application was working fine using proxy.  I switched
> over to wsgi this morning to see of there was a difference have have
> not be able to successfully run it that way.  Just to re-iterate,
> everything works as it should when wsgi is removed from the equation,
> but I do need to deploy it so running it manually is out of the
> question.

Stupid question, but do you have any residual mod_rewrite rules in
your Apache configuration somewhere pertaining to when you were trying
to host TG behind Apache?

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 01:34:46 UTC
Permalink
On Sep 10, 11:18 am, AZMel <***@gmail.com> wrote:
> > Stupid question, but do you have any residual mod_rewrite rules in
> > your Apache configuration somewhere pertaining to when you were trying
> > to host TG behind Apache?
>
> > Graham
>
> None.  I had them in a separate file and removed them using
> a2dissite.  I actually thought of that too.
>
> Just in case I am completely reinstalling TG 1.0.5 to see what
> happens.  Not sure of the fix for 1.0.6 is causing my trouble.  Always
> worth a shot.

To be absolutely sure, use first recipe in section:

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Request_and_Response

Namely:

import pprint

class LoggingMiddleware:

def __init__(self, application):
self.__application = application

def __call__(self, environ, start_response):
errors = environ['wsgi.errors']
pprint.pprint(('REQUEST', environ), stream=errors)

def _start_response(status, headers):
pprint.pprint(('RESPONSE', status, headers),
stream=errors)
return start_response(status, headers)

return self.__application(environ, _start_response)

def application(environ, start_response):
environ['SCRIPT_NAME'] = ''
return cherrypy._cpwsgi.wsgiApp(environ, start_response)

application = LoggingMiddleware(application)

Find the request headers from Apache error log and post so can
evaluate whether something is still playing with request information
before it gets to WSGI application.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 02:04:23 UTC
Permalink
Wasn't expecting you to replace all existing contents of WSGI script
file, but merge that with what you had before, as it was wrapping the
TG application.

Anyway, doesn't matter as it shows that SCRIPT_NAME and PATH_INFO are
what I would expect.

Thus, looks to definitely be something happening in TG.

Graham

On Sep 10, 11:51 am, AZMel <***@gmail.com> wrote:
> On Sep 9, 6:34 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
>
>
> > On Sep 10, 11:18 am, AZMel <***@gmail.com> wrote:
>
> > > > Stupid question, but do you have any residual mod_rewrite rules in
> > > > your Apache configuration somewhere pertaining to when you were trying
> > > > to host TG behind Apache?
>
> > > > Graham
>
> > > None.  I had them in a separate file and removed them using
> > > a2dissite.  I actually thought of that too.
>
> > > Just in case I am completely reinstalling TG 1.0.5 to see what
> > > happens.  Not sure of the fix for 1.0.6 is causing my trouble.  Always
> > > worth a shot.
>
> > To be absolutely sure, use first recipe in section:
>
> >  http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Re...
>
> > Namely:
>
> > import pprint
>
> > class LoggingMiddleware:
>
> >     def __init__(self, application):
> >         self.__application = application
>
> >     def __call__(self, environ, start_response):
> >         errors = environ['wsgi.errors']
> >         pprint.pprint(('REQUEST', environ), stream=errors)
>
> >         def _start_response(status, headers):
> >             pprint.pprint(('RESPONSE', status, headers),
> > stream=errors)
> >             return start_response(status, headers)
>
> >         return self.__application(environ, _start_response)
>
> > def application(environ, start_response):
> >     environ['SCRIPT_NAME'] = ''
> >     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> > application = LoggingMiddleware(application)
>
> > Find the request headers from Apache error log and post so can
> > evaluate whether something is still playing with request information
> > before it gets to WSGI application.
>
> > Graham
>
> I replaced my webapps.wsgi with the code you sent.  Here is the
> output:
>
> [Tue Sep 09 18:44:03 2008] [info] [client 192.168.1.121] mod_wsgi
> (pid=15222, process='', application='localhost|/webapps'): Loading
> WSGI script '/usr/local/turbogears/myclient/apache/webapps.wsgi'.
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] ('REQUEST',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> {'DOCUMENT_ROOT': '/var/www/',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'GATEWAY_INTERFACE': 'CGI/1.1',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/
> html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_CONNECTION': 'keep-alive',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_COOKIE': 'tg-visit=3381e270c24faccf8f0ba97f1f33126483c85a2d',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_HOST': '192.168.1.9',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_KEEP_ALIVE': '300',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:
> 1.8.1.16) Gecko/20080702 Firefox/2.0.0.16',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   'PATH': '/
> usr/local/bin:/usr/bin:/bin',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'PATH_INFO': '/',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'PATH_TRANSLATED': '/var/www/',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'QUERY_STRING': '',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'REMOTE_ADDR': '192.168.1.121',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'REMOTE_PORT': '1354',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'REQUEST_METHOD': 'GET',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'REQUEST_URI': '/webapps/',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SCRIPT_FILENAME': '/usr/local/turbogears/myclient/apache/
> webapps.wsgi',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SCRIPT_NAME': '/webapps',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_ADDR': '192.168.1.9',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_ADMIN': '***@localhost',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_NAME': '192.168.1.9',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_PORT': '80',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_PROTOCOL': 'HTTP/1.1',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_SIGNATURE': '<address>Apache/2.2.4 (Ubuntu) mod_python/3.3.1
> Python/2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/
> 0.9.8e mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8 Server at 192.168.1.9
> Port 80</address>\\n',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'SERVER_SOFTWARE': 'Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/
> 2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e
> mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.application_group': 'localhost|/webapps',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.callable_object': 'application',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.listener_host': '',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.listener_port': '80',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.process_group': '',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.reload_mechanism': '0',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'mod_wsgi.script_reloading': '1',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.errors': <mod_wsgi.Log object at 0x8359680>,
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter
> object at 0x83f3a40>,
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.input': <mod_wsgi.Input object at 0x8403688>,
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.multiprocess': True,
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.multithread': False,
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.run_once': False,
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.url_scheme': 'http',
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> 'wsgi.version': (1, 0)})
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=15222): Exception occurred processing WSGI script '/usr/local/
> turbogears/myclient/apache/webapps.wsgi'.
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] Traceback
> (most recent call last):
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> local/turbogears/myclient/apache/webapps.wsgi", line 17, in __call__
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> self.__application(environ, _start_response)
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> local/turbogears/myclient/apache/webapps.wsgi", line 21, in
> application
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> cherrypy._cpwsgi.wsgiApp(environ, start_response)
> [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] NameError:
> global name 'cherrypy' is not defined
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 03:32:09 UTC
Permalink
On Sep 9, 8:22 pm, Graham Dumpleton <***@gmail.com>
wrote:
> BTW, at this point probably suggest you create a fresh TG instance and
> implement very simple hello world by following:
>
>  http://docs.turbogears.org/1.0/GettingStarted/Controller
>
> Mount this at suburl like before and see if that responds to requests
> at correct URLs.
>
> In other words, take your specific application out of the picture and
> ensure that TG doing correct thing for simple application.
>
> Graham
>
> On Sep 10, 12:04 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
> > Wasn't expecting you to replace all existing contents of WSGI script
> > file, but merge that with what you had before, as it was wrapping the
> > TG application.
>
> > Anyway, doesn't matter as it shows that SCRIPT_NAME and PATH_INFO are
> > what I would expect.
>
> > Thus, looks to definitely be something happening in TG.
>
> > Graham
>
> > On Sep 10, 11:51 am, AZMel <***@gmail.com> wrote:
>
> > > On Sep 9, 6:34 pm, Graham Dumpleton <***@gmail.com>
> > > wrote:
>
> > > > On Sep 10, 11:18 am, AZMel <***@gmail.com> wrote:
>
> > > > > > Stupid question, but do you have any residual mod_rewrite rules in
> > > > > > your Apache configuration somewhere pertaining to when you were trying
> > > > > > to host TG behind Apache?
>
> > > > > > Graham
>
> > > > > None.  I had them in a separate file and removed them using
> > > > > a2dissite.  I actually thought of that too.
>
> > > > > Just in case I am completely reinstalling TG 1.0.5 to see what
> > > > > happens.  Not sure of the fix for 1.0.6 is causing my trouble.  Always
> > > > > worth a shot.
>
> > > > To be absolutely sure, use first recipe in section:
>
> > > >  http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Re...
>
> > > > Namely:
>
> > > > import pprint
>
> > > > class LoggingMiddleware:
>
> > > >     def __init__(self, application):
> > > >         self.__application = application
>
> > > >     def __call__(self, environ, start_response):
> > > >         errors = environ['wsgi.errors']
> > > >         pprint.pprint(('REQUEST', environ), stream=errors)
>
> > > >         def _start_response(status, headers):
> > > >             pprint.pprint(('RESPONSE', status, headers),
> > > > stream=errors)
> > > >             return start_response(status, headers)
>
> > > >         return self.__application(environ, _start_response)
>
> > > > def application(environ, start_response):
> > > >     environ['SCRIPT_NAME'] = ''
> > > >     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> > > > application = LoggingMiddleware(application)
>
> > > > Find the request headers from Apache error log and post so can
> > > > evaluate whether something is still playing with request information
> > > > before it gets to WSGI application.
>
> > > > Graham
>
> > > I replaced my webapps.wsgi with the code you sent.  Here is the
> > > output:
>
> > > [Tue Sep 09 18:44:03 2008] [info] [client 192.168.1.121] mod_wsgi
> > > (pid=15222, process='', application='localhost|/webapps'): Loading
> > > WSGI script '/usr/local/turbogears/myclient/apache/webapps.wsgi'.
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] ('REQUEST',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > {'DOCUMENT_ROOT': '/var/www/',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'GATEWAY_INTERFACE': 'CGI/1.1',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/
> > > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_CONNECTION': 'keep-alive',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_COOKIE': 'tg-visit=3381e270c24faccf8f0ba97f1f33126483c85a2d',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_HOST': '192.168.1.9',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_KEEP_ALIVE': '300',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:
> > > 1.8.1.16) Gecko/20080702 Firefox/2.0.0.16',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   'PATH': '/
> > > usr/local/bin:/usr/bin:/bin',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'PATH_INFO': '/',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'PATH_TRANSLATED': '/var/www/',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'QUERY_STRING': '',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'REMOTE_ADDR': '192.168.1.121',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'REMOTE_PORT': '1354',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'REQUEST_METHOD': 'GET',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'REQUEST_URI': '/webapps/',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SCRIPT_FILENAME': '/usr/local/turbogears/myclient/apache/
> > > webapps.wsgi',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SCRIPT_NAME': '/webapps',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_ADDR': '192.168.1.9',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_ADMIN': '***@localhost',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_NAME': '192.168.1.9',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_PORT': '80',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_PROTOCOL': 'HTTP/1.1',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_SIGNATURE': '<address>Apache/2.2.4 (Ubuntu) mod_python/3.3.1
> > > Python/2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/
> > > 0.9.8e mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8 Server at 192.168.1.9
> > > Port 80</address>\\n',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'SERVER_SOFTWARE': 'Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/
> > > 2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e
> > > mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.application_group': 'localhost|/webapps',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.callable_object': 'application',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.listener_host': '',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.listener_port': '80',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.process_group': '',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.reload_mechanism': '0',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'mod_wsgi.script_reloading': '1',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.errors': <mod_wsgi.Log object at 0x8359680>,
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter
> > > object at 0x83f3a40>,
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.input': <mod_wsgi.Input object at 0x8403688>,
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.multiprocess': True,
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.multithread': False,
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.run_once': False,
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.url_scheme': 'http',
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > > 'wsgi.version': (1, 0)})
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] mod_wsgi
> > > (pid=15222): Exception occurred processing WSGI script '/usr/local/
> > > turbogears/myclient/apache/webapps.wsgi'.
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] Traceback
> > > (most recent call last):
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> > > local/turbogears/myclient/apache/webapps.wsgi", line 17, in __call__
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> > > self.__application(environ, _start_response)
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> > > local/turbogears/myclient/apache/webapps.wsgi", line 21, in
> > > application
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> > > cherrypy._cpwsgi.wsgiApp(environ, start_response)
> > > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] NameError:
> > > global name 'cherrypy' is not defined

I've been trying that but now I'm getting these errors no matter what
I do:

[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=5666): Target WSGI script '/usr/local/turbogears/stum/
apache/stum.wsgi' cannot be loaded as Python module.
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=5666): Exception occurred processing WSGI script '/usr
/local/turbogears/stum/apache/stum.wsgi'.

As you can see it is a fresh TG app with nothing added but wsgi won't
load the config file.

This morning I thought this was going to be a drop in the bucket. 15
hours later I'm ready to look for another solution. :-(

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 03:41:13 UTC
Permalink
On Sep 9, 8:36 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 10, 1:32 pm, AZMel <***@gmail.com> wrote:
>
> > I've been trying that but now I'm getting these errors no matter what
> > I do:
>
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> > apache/stum.wsgi' cannot be loaded as Python module.
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > (pid=5666): Exception occurred processing WSGI script '/usr
> > /local/turbogears/stum/apache/stum.wsgi'.
>
> > As you can see it is a fresh TG app with nothing added but wsgi won't
> > load the config file.
>
> But what was the exception traceback which should have followed that
> in the Apache error log file?
>
> Can't debug it if can't see what the actual error was. :-)
>
> Graham

hehe, the same thing that was posted at 6:09 pm.

[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=5666): Target WSGI script '/usr/local/turbogears/stum/
apache/stum.wsgi' cannot be loaded as Python module.
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=5666): Exception occurred processing WSGI script '/usr
/local/turbogears/stum/apache/stum.wsgi'.
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] Traceback
(most recent call last):
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] File "/usr/
local/turbogears/stum/apache/stum.wsgi", line 11, in <m
odule>
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] import
turbogears
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
turbogears/__init__.py", line 5, in <module>
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] from
turbogears import config
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
turbogears/config.py", line 4, in <module>
[Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] from
configobj import ConfigObj

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 14:04:35 UTC
Permalink
On Sep 9, 8:59 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 10, 1:41 pm, AZMel <***@gmail.com> wrote:
>
>
>
> > On Sep 9, 8:36 pm, Graham Dumpleton <***@gmail.com>
> > wrote:
>
> > > On Sep 10, 1:32 pm, AZMel <***@gmail.com> wrote:
>
> > > > I've been trying that but now I'm getting these errors no matter what
> > > > I do:
>
> > > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > > (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> > > > apache/stum.wsgi' cannot be loaded as Python module.
> > > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > > (pid=5666): Exception occurred processing WSGI script '/usr
> > > > /local/turbogears/stum/apache/stum.wsgi'.
>
> > > > As you can see it is a fresh TG app with nothing added but wsgi won't
> > > > load the config file.
>
> > > But what was the exception traceback which should have followed that
> > > in the Apache error log file?
>
> > > Can't debug it if can't see what the actual error was. :-)
>
> > > Graham
>
> > hehe, the same thing that was posted at 6:09 pm.
>
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> > apache/stum.wsgi' cannot be loaded as Python module.
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > (pid=5666): Exception occurred processing WSGI script '/usr
> > /local/turbogears/stum/apache/stum.wsgi'.
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] Traceback
> > (most recent call last):
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> > local/turbogears/stum/apache/stum.wsgi", line 11, in <m
> > odule>
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     import
> > turbogears
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
> > turbogears/__init__.py", line 5, in <module>
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     from
> > turbogears import config
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
> > turbogears/config.py", line 4, in <module>
> > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     from
> > configobj import ConfigObj
>
> Which suggests you might have some sort of Python path conflicts or
> permissions issues going on, or Python installation otherwise broken
> in some way.
>
> How many Python installations do you have on your system? What
> versions and where?
2.3,2.4,2.5 in /usr/lib
>
> Which installed version of Python was mod_wsgi compiled against? Which
> 'python' executable is in your PATH, ie., what does 'which python'
> yield?
>
> Where do you normally install Python packages/modules, ie., which site-
> packages directory, or into account somehow?
>
> How may versions of TurboGears are installed there? Are the files in
> those installations all readable to others, or do they have
> restrictive permissions on them such that not everyone could read
> them? Apache runs as a distinct user and must be able to read them
> somehow.
>
> What is PYTHONPATH set to in your personal environment?
>
/usr/lib/python2.5

> Do you have any Python eggs installed which are in compressed form and
> would thus need to be unpacked via Python egg cache directory? Can you
> clear out any Python egg cache directories you know about?

cleared out ~/.python-eggs and /var/www/.python-eggs
>
> At the start of the WSGI script file, add:
>
>   import sys
>   print >> sys.stderr, sys.path
>

[Wed Sep 10 06:48:23 2008] [info] [client 192.168.1.122] mod_wsgi
(pid=9692, process='', application='localhost|/stum'): Loading WSGI
script '/usr/local/turbogears/stum/apache/stum.wsgi'.
[Wed Sep 10 06:48:23 2008] [error] ['/usr/lib/python2.5/site-packages/
setuptools-0.6c8-py2.5.egg', '/usr/lib/python2.5/site-packages/
Extremes-1.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/usr/lib/
pyt
hon2.5/site-packages/TurboKid-1.0.4-py2.5.egg', '/usr/lib/python2.5/
site-packages/TurboJson-1.1.4-py2.5.egg', '/usr/lib/python2.5/site-
packages/TurboCheetah-1.0-py2.5.egg', '/usr/lib/python2.5/site-
packages/
PasteScript-1.6.3-py2.5.egg', '/usr/lib/python2.5/site-packages/
FormEncode-1.0.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
CherryPy-2.3.0-py2.5.egg', '/usr/lib/python2.5/site-packages/
Cheetah-2.0.1-py2.5
-linux-i686.egg', '/usr/lib/python2.5/site-packages/PasteDeploy-1.3.2-
py2.5.egg', '/usr/lib/python2.5/site-packages/Paste-1.7.1-py2.5.egg',
'/usr/lib/python2.5/site-packages/SQLObject-0.10.2-py2.5.egg', '/us
r/lib/python2.5/site-packages/TurboFancyFlash-0.1a-py2.5.egg', '/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg', '/usr/lib/
python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-
packages', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-
support/p
ython2.5', '/usr/local/turbogears/stum']
[Wed Sep 10 06:48:23 2008] [warn] mod_wsgi (pid=9692): Callback
registration for signal 15 ignored.
[Wed Sep 10 06:48:23 2008] [warn] File "/usr/local/turbogears/stum/
apache/stum.wsgi", line 9, in <module>
[Wed Sep 10 06:48:23 2008] [warn] import cherrypy
[Wed Sep 10 06:48:23 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
<module>
[Wed Sep 10 06:48:23 2008] [warn] import _cpserver
[Wed Sep 10 06:48:23 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
<module>
[Wed Sep 10 06:48:23 2008] [warn] from cherrypy._cpengine import
Engine, STOPPED, STARTING, STARTED
[Wed Sep 10 06:48:23 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
<module>
[Wed Sep 10 06:48:23 2008] [warn] signal.signal(signal.SIGTERM,
SIGTERM)
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] mod_wsgi
(pid=9692): Target WSGI script '/usr/local/turbogears/stum/apache/
stum.wsgi' cannot be loaded as Python module.
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] mod_wsgi
(pid=9692): Exception occurred processing WSGI script '/usr/local/
turbogears/stum/apache/stum.wsgi'.
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] Traceback
(most recent call last):
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] File "/usr/
local/turbogears/stum/apache/stum.wsgi", line 11, in <module>
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] import
turbogears
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
__init__.py", line 5, in <module>
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] from
turbogears import config
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
config.py", line 4, in <module>
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] from
configobj import ConfigObj
[Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] ImportError:
No module named configobj
[Wed Sep 10 06:48:24 2008] [error] [client 192.168.1.122] File does
not exist: /var/www/favicon.ico
[Wed Sep 10 06:48:24 2008] [error] [client 192.168.1.122] File does
not exist: /var/www/favicon.ico

> How are you restarting Apache, are you use 'sudo' or 'su' commands, if
> so what is the full command line you are using?
>
sudo /etc/init.d/apache2 force-reload

> Are you also loading mod_python into Apache at the same time?
>
Yes and these are all the ones I'm loading:
Your choices are: alias auth_basic authn_file authz_default
authz_groupfile authz_host authz_user autoindex cache cgi dir env
headers mime mod_python mod_wsgi negotiation perl php5 proxy_balancer
proxy_connect proxy_html proxy_http proxy rewrite setenvif ssl status
userdir

> There are various things which can cause sys.path weirdness including
> having multiple versions of Python installed, local PYTHONPATH
> settings and ensuring Apache doesn't inherit your personal user
> environment when being started in some way.
>
> You at least thinking about the answers to above questions and
> answering them where appropriate might help to understand how you
> environment is setup.
>
> Otherwise I just don't know at this point. People do not generally
> have the problems you are having, so there is something strange about
> your particular environment.
>
> Graham

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 00:42:29 UTC
Permalink
On Sep 9, 5:29 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 10, 10:08 am, AZMel <***@gmail.com> wrote:
>
>
>
> > On Sep 9, 4:39 pm, Graham Dumpleton <***@gmail.com>
> > > You need to have:
>
> > >   turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> > > If it is instead mounted at root then you shouldn't set server.webpath
> > > (just to be safe).
>
> > > With those matching, then describe the behaviour you are seeing,
> > > indicating the URL being requested and what URL page is pushing back.
>
> > > Also indicate whether for code generating problem page, is using url()
> > > function described in:
>
> > >  http://docs.turbogears.org/1.0/GettingStarted/URLs
>
> > > being used or are you hard coding URLs in the generated pages.
>
> > > Graham
>
> > With /webapps put back into the server.webpath I get the following:
>
> >http://192.168.1.9/
> >     This gets redirected to apache2-default/
>
> >http://192.168.1.9/webapps/
> >     This comes up with a 404 error.  path '/' not found.
>
> >http://192.168.1.9/webapps/webapps/
> >     This comes up with the home page but no static content is sent
> > over.  Also tg,url('/') returns /webapps which I would have expected /
> > webapps/webapps.
>
> > Remember that the app was developed with / being returned from
> > tg.url('/').
>
> > There seems to be a missing path somewhere but I don't know where.
>
> This is where my knowledge of CherryPy/TurboGears is a bit lacking,
> but from looking at documentation, how is your top level controller
> object defined. Ie., what are the names of the exposed methods? Ie.,
> what is:
>
>   myclient.controllers.Root
>
> defined as?
>
> I would expect to see an index() method. Have you perhaps called it
> webapps() instead?
>
> Graham

I switched over to the tgbig template this afternoon to try to get
different results but they stayed the same.

This is what my controller looks like:

import turbogears as tg
from turbogears import controllers, expose, flash
from turbogears import identity, redirect
from cherrypy import request, response

from myclient.controllers.reports import ReportsController

class Root(controllers.RootController):
reports = ReportsController()
@expose(template="myclient.templates.welcome")
# @identity.require(identity.in_group("admin"))
def index(self):


...etc...

Except for the 500 error, which was the whole basis for this thread to
begin with, my application was working fine using proxy. I switched
over to wsgi this morning to see of there was a difference have have
not be able to successfully run it that way. Just to re-iterate,
everything works as it should when wsgi is removed from the equation,
but I do need to deploy it so running it manually is out of the
question.

Thanks for your help and patience.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 01:18:48 UTC
Permalink
On Sep 9, 6:02 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 10, 10:42 am, AZMel <***@gmail.com> wrote:
>
>
>
> > On Sep 9, 5:29 pm, Graham Dumpleton <***@gmail.com>
> > wrote:
>
> > > On Sep 10, 10:08 am, AZMel <***@gmail.com> wrote:
>
> > > > On Sep 9, 4:39 pm, Graham Dumpleton <***@gmail.com>
> > > > > You need to have:
>
> > > > >   turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> > > > > If it is instead mounted at root then you shouldn't set server.webpath
> > > > > (just to be safe).
>
> > > > > With those matching, then describe the behaviour you are seeing,
> > > > > indicating the URL being requested and what URL page is pushing back.
>
> > > > > Also indicate whether for code generating problem page, is using url()
> > > > > function described in:
>
> > > > >  http://docs.turbogears.org/1.0/GettingStarted/URLs
>
> > > > > being used or are you hard coding URLs in the generated pages.
>
> > > > > Graham
>
> > > > With /webapps put back into the server.webpath I get the following:
>
> > > >http://192.168.1.9/
> > > >     This gets redirected to apache2-default/
>
> > > >http://192.168.1.9/webapps/
> > > >     This comes up with a 404 error.  path '/' not found.
>
> > > >http://192.168.1.9/webapps/webapps/
> > > >     This comes up with the home page but no static content is sent
> > > > over.  Also tg,url('/') returns /webapps which I would have expected /
> > > > webapps/webapps.
>
> > > > Remember that the app was developed with / being returned from
> > > > tg.url('/').
>
> > > > There seems to be a missing path somewhere but I don't know where.
>
> > > This is where my knowledge of CherryPy/TurboGears is a bit lacking,
> > > but from looking at documentation, how is your top level controller
> > > object defined. Ie., what are the names of the exposed methods? Ie.,
> > > what is:
>
> > >   myclient.controllers.Root
>
> > > defined as?
>
> > > I would expect to see an index() method. Have you perhaps called it
> > > webapps() instead?
>
> > > Graham
>
> > I switched over to the tgbig template this afternoon to try to get
> > different results but they stayed the same.
>
> > This is what my controller looks like:
>
> > import turbogears as tg
> > from turbogears import controllers, expose, flash
> > from turbogears import identity, redirect
> > from cherrypy import request, response
>
> > from myclient.controllers.reports import ReportsController
>
> > class Root(controllers.RootController):
> >     reports = ReportsController()
> >     @expose(template="myclient.templates.welcome")
> >     # @identity.require(identity.in_group("admin"))
> >     def index(self):
>
> > ...etc...
>
> > Except for the 500 error, which was the whole basis for this thread to
> > begin with, my application was working fine using proxy.  I switched
> > over to wsgi this morning to see of there was a difference have have
> > not be able to successfully run it that way.  Just to re-iterate,
> > everything works as it should when wsgi is removed from the equation,
> > but I do need to deploy it so running it manually is out of the
> > question.
>
> Stupid question, but do you have any residual mod_rewrite rules in
> your Apache configuration somewhere pertaining to when you were trying
> to host TG behind Apache?
>
> Graham

None. I had them in a separate file and removed them using
a2dissite. I actually thought of that too.

Just in case I am completely reinstalling TG 1.0.5 to see what
happens. Not sure of the fix for 1.0.6 is causing my trouble. Always
worth a shot.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 01:51:21 UTC
Permalink
On Sep 9, 6:34 pm, Graham Dumpleton <***@gmail.com>
wrote:
> On Sep 10, 11:18 am, AZMel <***@gmail.com> wrote:
>
> > > Stupid question, but do you have any residual mod_rewrite rules in
> > > your Apache configuration somewhere pertaining to when you were trying
> > > to host TG behind Apache?
>
> > > Graham
>
> > None.  I had them in a separate file and removed them using
> > a2dissite.  I actually thought of that too.
>
> > Just in case I am completely reinstalling TG 1.0.5 to see what
> > happens.  Not sure of the fix for 1.0.6 is causing my trouble.  Always
> > worth a shot.
>
> To be absolutely sure, use first recipe in section:
>
>  http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Re...
>
> Namely:
>
> import pprint
>
> class LoggingMiddleware:
>
>     def __init__(self, application):
>         self.__application = application
>
>     def __call__(self, environ, start_response):
>         errors = environ['wsgi.errors']
>         pprint.pprint(('REQUEST', environ), stream=errors)
>
>         def _start_response(status, headers):
>             pprint.pprint(('RESPONSE', status, headers),
> stream=errors)
>             return start_response(status, headers)
>
>         return self.__application(environ, _start_response)
>
> def application(environ, start_response):
>     environ['SCRIPT_NAME'] = ''
>     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> application = LoggingMiddleware(application)
>
> Find the request headers from Apache error log and post so can
> evaluate whether something is still playing with request information
> before it gets to WSGI application.
>
> Graham

I replaced my webapps.wsgi with the code you sent. Here is the
output:

[Tue Sep 09 18:44:03 2008] [info] [client 192.168.1.121] mod_wsgi
(pid=15222, process='', application='localhost|/webapps'): Loading
WSGI script '/usr/local/turbogears/myclient/apache/webapps.wsgi'.
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] ('REQUEST',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
{'DOCUMENT_ROOT': '/var/www/',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'GATEWAY_INTERFACE': 'CGI/1.1',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_CONNECTION': 'keep-alive',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_COOKIE': 'tg-visit=3381e270c24faccf8f0ba97f1f33126483c85a2d',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_HOST': '192.168.1.9',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_KEEP_ALIVE': '300',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:
1.8.1.16) Gecko/20080702 Firefox/2.0.0.16',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] 'PATH': '/
usr/local/bin:/usr/bin:/bin',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'PATH_INFO': '/',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'PATH_TRANSLATED': '/var/www/',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'QUERY_STRING': '',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'REMOTE_ADDR': '192.168.1.121',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'REMOTE_PORT': '1354',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'REQUEST_METHOD': 'GET',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'REQUEST_URI': '/webapps/',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SCRIPT_FILENAME': '/usr/local/turbogears/myclient/apache/
webapps.wsgi',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SCRIPT_NAME': '/webapps',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_ADDR': '192.168.1.9',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_ADMIN': '***@localhost',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_NAME': '192.168.1.9',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_PORT': '80',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_PROTOCOL': 'HTTP/1.1',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_SIGNATURE': '<address>Apache/2.2.4 (Ubuntu) mod_python/3.3.1
Python/2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/
0.9.8e mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8 Server at 192.168.1.9
Port 80</address>\\n',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'SERVER_SOFTWARE': 'Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/
2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e
mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.application_group': 'localhost|/webapps',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.callable_object': 'application',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.listener_host': '',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.listener_port': '80',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.process_group': '',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.reload_mechanism': '0',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'mod_wsgi.script_reloading': '1',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.errors': <mod_wsgi.Log object at 0x8359680>,
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter
object at 0x83f3a40>,
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.input': <mod_wsgi.Input object at 0x8403688>,
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.multiprocess': True,
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.multithread': False,
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.run_once': False,
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.url_scheme': 'http',
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
'wsgi.version': (1, 0)})
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=15222): Exception occurred processing WSGI script '/usr/local/
turbogears/myclient/apache/webapps.wsgi'.
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] Traceback
(most recent call last):
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] File "/usr/
local/turbogears/myclient/apache/webapps.wsgi", line 17, in __call__
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] return
self.__application(environ, _start_response)
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] File "/usr/
local/turbogears/myclient/apache/webapps.wsgi", line 21, in
application
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] return
cherrypy._cpwsgi.wsgiApp(environ, start_response)
[Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] NameError:
global name 'cherrypy' is not defined


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 03:22:04 UTC
Permalink
BTW, at this point probably suggest you create a fresh TG instance and
implement very simple hello world by following:

http://docs.turbogears.org/1.0/GettingStarted/Controller

Mount this at suburl like before and see if that responds to requests
at correct URLs.

In other words, take your specific application out of the picture and
ensure that TG doing correct thing for simple application.

Graham

On Sep 10, 12:04 pm, Graham Dumpleton <***@gmail.com>
wrote:
> Wasn't expecting you to replace all existing contents of WSGI script
> file, but merge that with what you had before, as it was wrapping the
> TG application.
>
> Anyway, doesn't matter as it shows that SCRIPT_NAME and PATH_INFO are
> what I would expect.
>
> Thus, looks to definitely be something happening in TG.
>
> Graham
>
> On Sep 10, 11:51 am, AZMel <***@gmail.com> wrote:
>
> > On Sep 9, 6:34 pm, Graham Dumpleton <***@gmail.com>
> > wrote:
>
> > > On Sep 10, 11:18 am, AZMel <***@gmail.com> wrote:
>
> > > > > Stupid question, but do you have any residual mod_rewrite rules in
> > > > > your Apache configuration somewhere pertaining to when you were trying
> > > > > to host TG behind Apache?
>
> > > > > Graham
>
> > > > None.  I had them in a separate file and removed them using
> > > > a2dissite.  I actually thought of that too.
>
> > > > Just in case I am completely reinstalling TG 1.0.5 to see what
> > > > happens.  Not sure of the fix for 1.0.6 is causing my trouble.  Always
> > > > worth a shot.
>
> > > To be absolutely sure, use first recipe in section:
>
> > >  http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Re...
>
> > > Namely:
>
> > > import pprint
>
> > > class LoggingMiddleware:
>
> > >     def __init__(self, application):
> > >         self.__application = application
>
> > >     def __call__(self, environ, start_response):
> > >         errors = environ['wsgi.errors']
> > >         pprint.pprint(('REQUEST', environ), stream=errors)
>
> > >         def _start_response(status, headers):
> > >             pprint.pprint(('RESPONSE', status, headers),
> > > stream=errors)
> > >             return start_response(status, headers)
>
> > >         return self.__application(environ, _start_response)
>
> > > def application(environ, start_response):
> > >     environ['SCRIPT_NAME'] = ''
> > >     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> > > application = LoggingMiddleware(application)
>
> > > Find the request headers from Apache error log and post so can
> > > evaluate whether something is still playing with request information
> > > before it gets to WSGI application.
>
> > > Graham
>
> > I replaced my webapps.wsgi with the code you sent.  Here is the
> > output:
>
> > [Tue Sep 09 18:44:03 2008] [info] [client 192.168.1.121] mod_wsgi
> > (pid=15222, process='', application='localhost|/webapps'): Loading
> > WSGI script '/usr/local/turbogears/myclient/apache/webapps.wsgi'.
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] ('REQUEST',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > {'DOCUMENT_ROOT': '/var/www/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'GATEWAY_INTERFACE': 'CGI/1.1',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/
> > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_CONNECTION': 'keep-alive',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_COOKIE': 'tg-visit=3381e270c24faccf8f0ba97f1f33126483c85a2d',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_HOST': '192.168.1.9',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_KEEP_ALIVE': '300',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:
> > 1.8.1.16) Gecko/20080702 Firefox/2.0.0.16',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   'PATH': '/
> > usr/local/bin:/usr/bin:/bin',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'PATH_INFO': '/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'PATH_TRANSLATED': '/var/www/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'QUERY_STRING': '',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REMOTE_ADDR': '192.168.1.121',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REMOTE_PORT': '1354',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REQUEST_METHOD': 'GET',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REQUEST_URI': '/webapps/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SCRIPT_FILENAME': '/usr/local/turbogears/myclient/apache/
> > webapps.wsgi',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SCRIPT_NAME': '/webapps',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_ADDR': '192.168.1.9',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_ADMIN': '***@localhost',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_NAME': '192.168.1.9',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_PORT': '80',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_PROTOCOL': 'HTTP/1.1',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_SIGNATURE': '<address>Apache/2.2.4 (Ubuntu) mod_python/3.3.1
> > Python/2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/
> > 0.9.8e mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8 Server at 192.168.1.9
> > Port 80</address>\\n',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_SOFTWARE': 'Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/
> > 2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e
> > mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.application_group': 'localhost|/webapps',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.callable_object': 'application',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.listener_host': '',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.listener_port': '80',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.process_group': '',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.reload_mechanism': '0',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.script_reloading': '1',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.errors': <mod_wsgi.Log object at 0x8359680>,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter
> > object at 0x83f3a40>,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.input': <mod_wsgi.Input object at 0x8403688>,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.multiprocess': True,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.multithread': False,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.run_once': False,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.url_scheme': 'http',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.version': (1, 0)})
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] mod_wsgi
> > (pid=15222): Exception occurred processing WSGI script '/usr/local/
> > turbogears/myclient/apache/webapps.wsgi'.
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] Traceback
> > (most recent call last):
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> > local/turbogears/myclient/apache/webapps.wsgi", line 17, in __call__
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> > self.__application(environ, _start_response)
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> > local/turbogears/myclient/apache/webapps.wsgi", line 21, in
> > application
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> > cherrypy._cpwsgi.wsgiApp(environ, start_response)
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] NameError:
> > global name 'cherrypy' is not defined
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 03:36:49 UTC
Permalink
On Sep 10, 1:32 pm, AZMel <***@gmail.com> wrote:
> I've been trying that but now I'm getting these errors no matter what
> I do:
>
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> apache/stum.wsgi' cannot be loaded as Python module.
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=5666): Exception occurred processing WSGI script '/usr
> /local/turbogears/stum/apache/stum.wsgi'.
>
> As you can see it is a fresh TG app with nothing added but wsgi won't
> load the config file.

But what was the exception traceback which should have followed that
in the Apache error log file?

Can't debug it if can't see what the actual error was. :-)

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 03:59:22 UTC
Permalink
On Sep 10, 1:41 pm, AZMel <***@gmail.com> wrote:
> On Sep 9, 8:36 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
>
>
> > On Sep 10, 1:32 pm, AZMel <***@gmail.com> wrote:
>
> > > I've been trying that but now I'm getting these errors no matter what
> > > I do:
>
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> > > apache/stum.wsgi' cannot be loaded as Python module.
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > (pid=5666): Exception occurred processing WSGI script '/usr
> > > /local/turbogears/stum/apache/stum.wsgi'.
>
> > > As you can see it is a fresh TG app with nothing added but wsgi won't
> > > load the config file.
>
> > But what was the exception traceback which should have followed that
> > in the Apache error log file?
>
> > Can't debug it if can't see what the actual error was. :-)
>
> > Graham
>
> hehe, the same thing that was posted at 6:09 pm.
>
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> apache/stum.wsgi' cannot be loaded as Python module.
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=5666): Exception occurred processing WSGI script '/usr
> /local/turbogears/stum/apache/stum.wsgi'.
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] Traceback
> (most recent call last):
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> local/turbogears/stum/apache/stum.wsgi", line 11, in <m
> odule>
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     import
> turbogears
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
> turbogears/__init__.py", line 5, in <module>
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     from
> turbogears import config
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
> turbogears/config.py", line 4, in <module>
> [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     from
> configobj import ConfigObj

Which suggests you might have some sort of Python path conflicts or
permissions issues going on, or Python installation otherwise broken
in some way.

How many Python installations do you have on your system? What
versions and where?

Which installed version of Python was mod_wsgi compiled against? Which
'python' executable is in your PATH, ie., what does 'which python'
yield?

Where do you normally install Python packages/modules, ie., which site-
packages directory, or into account somehow?

How may versions of TurboGears are installed there? Are the files in
those installations all readable to others, or do they have
restrictive permissions on them such that not everyone could read
them? Apache runs as a distinct user and must be able to read them
somehow.

What is PYTHONPATH set to in your personal environment?

Do you have any Python eggs installed which are in compressed form and
would thus need to be unpacked via Python egg cache directory? Can you
clear out any Python egg cache directories you know about?

At the start of the WSGI script file, add:

import sys
print >> sys.stderr, sys.path

How are you restarting Apache, are you use 'sudo' or 'su' commands, if
so what is the full command line you are using?

Are you also loading mod_python into Apache at the same time?

There are various things which can cause sys.path weirdness including
having multiple versions of Python installed, local PYTHONPATH
settings and ensuring Apache doesn't inherit your personal user
environment when being started in some way.

You at least thinking about the answers to above questions and
answering them where appropriate might help to understand how you
environment is setup.

Otherwise I just don't know at this point. People do not generally
have the problems you are having, so there is something strange about
your particular environment.

Graham



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-10 13:41:03 UTC
Permalink
> How many Python installations do you have on your system? What
> versions and where?
>
> Which installed version of Python was mod_wsgi compiled against? Which
> 'python' executable is in your PATH, ie., what does 'which python'
> yield?
>
> Where do you normally install Python packages/modules, ie., which site-
> packages directory, or into account somehow?
>
> How may versions of TurboGears are installed there? Are the files in
> those installations all readable to others, or do they have
> restrictive permissions on them such that not everyone could read
> them? Apache runs as a distinct user and must be able to read them
> somehow.
>
> What is PYTHONPATH set to in your personal environment?
>
> Do you have any Python eggs installed which are in compressed form and
> would thus need to be unpacked via Python egg cache directory? Can you
> clear out any Python egg cache directories you know about?
>
> At the start of the WSGI script file, add:
>
> import sys
> print >> sys.stderr, sys.path
>
> How are you restarting Apache, are you use 'sudo' or 'su' commands, if
> so what is the full command line you are using?
>
> Are you also loading mod_python into Apache at the same time?
>
> There are various things which can cause sys.path weirdness including
> having multiple versions of Python installed, local PYTHONPATH
> settings and ensuring Apache doesn't inherit your personal user
> environment when being started in some way.
>
> You at least thinking about the answers to above questions and
> answering them where appropriate might help to understand how you
> environment is setup.
>

These are all the questions I guess we should have asked at the
beginning. I'll add it to troubleshooting section. Thanks.
Lucas


> Otherwise I just don't know at this point. People do not generally
> have the problems you are having, so there is something strange about
> your particular environment.
>
> Graham
>
>
>
> >
>



--
OpenOffice and Python
http://lucasmanual.com/mywiki/OpenOffice
Commercial Grade Backup with Bacula
http://lucasmanual.com/mywiki/Bacula

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 15:09:24 UTC
Permalink
On Sep 10, 7:04 am, AZMel <***@gmail.com> wrote:
> On Sep 9, 8:59 pm, Graham Dumpleton <***@gmail.com>
> wrote:
>
> > On Sep 10, 1:41 pm, AZMel <***@gmail.com> wrote:
>
> > > On Sep 9, 8:36 pm, Graham Dumpleton <***@gmail.com>
> > > wrote:
>
> > > > On Sep 10, 1:32 pm, AZMel <***@gmail.com> wrote:
>
> > > > > I've been trying that but now I'm getting these errors no matter what
> > > > > I do:
>
> > > > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > > > (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> > > > > apache/stum.wsgi' cannot be loaded as Python module.
> > > > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > > > (pid=5666): Exception occurred processing WSGI script '/usr
> > > > > /local/turbogears/stum/apache/stum.wsgi'.
>
> > > > > As you can see it is a fresh TG app with nothing added but wsgi won't
> > > > > load the config file.
>
> > > > But what was the exception traceback which should have followed that
> > > > in the Apache error log file?
>
> > > > Can't debug it if can't see what the actual error was. :-)
>
> > > > Graham
>
> > > hehe, the same thing that was posted at 6:09 pm.
>
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > (pid=5666): Target WSGI script '/usr/local/turbogears/stum/
> > > apache/stum.wsgi' cannot be loaded as Python module.
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] mod_wsgi
> > > (pid=5666): Exception occurred processing WSGI script '/usr
> > > /local/turbogears/stum/apache/stum.wsgi'.
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121] Traceback
> > > (most recent call last):
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> > > local/turbogears/stum/apache/stum.wsgi", line 11, in <m
> > > odule>
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     import
> > > turbogears
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> > > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
> > > turbogears/__init__.py", line 5, in <module>
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     from
> > > turbogears import config
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]   File "/usr/
> > > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/
> > > turbogears/config.py", line 4, in <module>
> > > [Tue Sep 09 20:26:23 2008] [error] [client 192.168.1.121]     from
> > > configobj import ConfigObj
>
> > Which suggests you might have some sort of Python path conflicts or
> > permissions issues going on, or Python installation otherwise broken
> > in some way.
>
> > How many Python installations do you have on your system? What
> > versions and where?
>
> 2.3,2.4,2.5 in /usr/lib
>
>
>
> > Which installed version of Python was mod_wsgi compiled against? Which
> > 'python' executable is in your PATH, ie., what does 'which python'
> > yield?
>
> > Where do you normally install Python packages/modules, ie., which site-
> > packages directory, or into account somehow?
>
> > How may versions of TurboGears are installed there? Are the files in
> > those installations all readable to others, or do they have
> > restrictive permissions on them such that not everyone could read
> > them? Apache runs as a distinct user and must be able to read them
> > somehow.
>
> > What is PYTHONPATH set to in your personal environment?
>
> /usr/lib/python2.5
>
> > Do you have any Python eggs installed which are in compressed form and
> > would thus need to be unpacked via Python egg cache directory? Can you
> > clear out any Python egg cache directories you know about?
>
> cleared out ~/.python-eggs and /var/www/.python-eggs
>
>
>
> > At the start of the WSGI script file, add:
>
> >   import sys
> >   print >> sys.stderr, sys.path
>
> [Wed Sep 10 06:48:23 2008] [info] [client 192.168.1.122] mod_wsgi
> (pid=9692, process='', application='localhost|/stum'): Loading WSGI
> script '/usr/local/turbogears/stum/apache/stum.wsgi'.
> [Wed Sep 10 06:48:23 2008] [error] ['/usr/lib/python2.5/site-packages/
> setuptools-0.6c8-py2.5.egg', '/usr/lib/python2.5/site-packages/
> Extremes-1.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/usr/lib/
> pyt
> hon2.5/site-packages/TurboKid-1.0.4-py2.5.egg', '/usr/lib/python2.5/
> site-packages/TurboJson-1.1.4-py2.5.egg', '/usr/lib/python2.5/site-
> packages/TurboCheetah-1.0-py2.5.egg', '/usr/lib/python2.5/site-
> packages/
> PasteScript-1.6.3-py2.5.egg', '/usr/lib/python2.5/site-packages/
> FormEncode-1.0.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
> CherryPy-2.3.0-py2.5.egg', '/usr/lib/python2.5/site-packages/
> Cheetah-2.0.1-py2.5
> -linux-i686.egg', '/usr/lib/python2.5/site-packages/PasteDeploy-1.3.2-
> py2.5.egg', '/usr/lib/python2.5/site-packages/Paste-1.7.1-py2.5.egg',
> '/usr/lib/python2.5/site-packages/SQLObject-0.10.2-py2.5.egg', '/us
> r/lib/python2.5/site-packages/TurboFancyFlash-0.1a-py2.5.egg', '/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg', '/usr/lib/
> python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
> '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
> local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-
> packages', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-
> support/p
> ython2.5', '/usr/local/turbogears/stum']
> [Wed Sep 10 06:48:23 2008] [warn] mod_wsgi (pid=9692): Callback
> registration for signal 15 ignored.
> [Wed Sep 10 06:48:23 2008] [warn]   File "/usr/local/turbogears/stum/
> apache/stum.wsgi", line 9, in <module>
> [Wed Sep 10 06:48:23 2008] [warn]     import cherrypy
> [Wed Sep 10 06:48:23 2008] [warn]   File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> <module>
> [Wed Sep 10 06:48:23 2008] [warn]     import _cpserver
> [Wed Sep 10 06:48:23 2008] [warn]   File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> <module>
> [Wed Sep 10 06:48:23 2008] [warn]     from cherrypy._cpengine import
> Engine, STOPPED, STARTING, STARTED
> [Wed Sep 10 06:48:23 2008] [warn]   File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> <module>
> [Wed Sep 10 06:48:23 2008] [warn]     signal.signal(signal.SIGTERM,
> SIGTERM)
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] mod_wsgi
> (pid=9692): Target WSGI script '/usr/local/turbogears/stum/apache/
> stum.wsgi' cannot be loaded as Python module.
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] mod_wsgi
> (pid=9692): Exception occurred processing WSGI script '/usr/local/
> turbogears/stum/apache/stum.wsgi'.
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] Traceback
> (most recent call last):
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122]   File "/usr/
> local/turbogears/stum/apache/stum.wsgi", line 11, in <module>
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122]     import
> turbogears
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122]   File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> __init__.py", line 5, in <module>
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122]     from
> turbogears import config
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122]   File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> config.py", line 4, in <module>
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122]     from
> configobj import ConfigObj
> [Wed Sep 10 06:48:23 2008] [error] [client 192.168.1.122] ImportError:
> No module named configobj
> [Wed Sep 10 06:48:24 2008] [error] [client 192.168.1.122] File does
> not exist: /var/www/favicon.ico
> [Wed Sep 10 06:48:24 2008] [error] [client 192.168.1.122] File does
> not exist: /var/www/favicon.ico
>
> > How are you restarting Apache, are you use 'sudo' or 'su' commands, if
> > so what is the full command line you are using?
>
> sudo /etc/init.d/apache2 force-reload
>
> > Are you also loading mod_python into Apache at the same time?
>
> Yes and these are all the ones I'm loading:
> Your choices are: alias auth_basic authn_file authz_default
> authz_groupfile authz_host authz_user autoindex cache cgi dir env
> headers mime mod_python mod_wsgi negotiation perl php5 proxy_balancer
> proxy_connect proxy_html proxy_http proxy rewrite setenvif ssl status
> userdir
>
> > There are various things which can cause sys.path weirdness including
> > having multiple versions of Python installed, local PYTHONPATH
> > settings and ensuring Apache doesn't inherit your personal user
> > environment when being started in some way.
>
> > You at least thinking about the answers to above questions and
> > answering them where appropriate might help to understand how you
> > environment is setup.
>
> > Otherwise I just don't know at this point. People do not generally
> > have the problems you are having, so there is something strange about
> > your particular environment.
>
> > Graham
>
> Mel

Ok, I completed removed Turbogears from /usr/lib/python2.5/site-
packages and easy_install.pth. Then I reinstalled it with a fresh
tgsetup.py script.
Purged Apache2, config files, and modules. Then I reinstalled it.
I went through Lucas's wiki on installing wsgi to a brand new TG app
that works perfectly when manually started.

Apache2 has these moduels loaded:

alias auth_basic authn_file authz_default authz_groupfile authz_host
authz_user autoindex cgid dir env mime mod_wsgi negotiation setenvif
status

And the problem still exists:

[Wed Sep 10 08:08:01 2008] [error] ['/usr/lib/python2.5/site-packages/
setuptools-0.6c8-py2.5.egg', '/usr/lib/python2.5/site-packages/
Extremes-1.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
TurboGears-1.0.
6-py2.5.egg', '/usr/lib/python2.5/site-packages/TurboKid-1.0.4-
py2.5.egg', '/usr/lib/python2.5/site-packages/TurboJson-1.1.4-
py2.5.egg', '/usr/lib/python2.5/site-packages/TurboCheetah-1.0-
py2.5.egg', '/usr/l
ib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg', '/usr/lib/
python2.5/site-packages/FormEncode-1.0.1-py2.5.egg', '/usr/lib/
python2.5/site-packages/CherryPy-2.3.0-py2.5.egg', '/usr/lib/python2.5/
site-p
ackages/kid-0.9.6-py2.5.egg', '/usr/lib/python2.5/site-packages/
Cheetah-2.0.1-py2.5-linux-i686.egg', '/usr/lib/python2.5/site-packages/
PasteDeploy-1.3.2-py2.5.egg', '/usr/lib/python2.5/site-packages/
Paste-1.
7.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/usr/lib/
python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
local
/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5', '/usr/local/turbogears/stum', '/
usr/local/turbogears/stum']
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
(pid=15076): Target WSGI script '/usr/local/turbogears/stum/apache/
stum.wsgi' cannot be loaded as Python module.
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
(pid=15076): Exception occurred processing WSGI script '/usr/local/
turbogears/stum/apache/stum.wsgi'.
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] Traceback
(most recent call last):
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] File "/usr/
local/turbogears/stum/apache/stum.wsgi", line 11, in <module>
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] import
turbogears
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
__init__.py", line 5, in <module>
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] from
turbogears import config
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
config.py", line 4, in <module>
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] from
configobj import ConfigObj
[Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] ImportError:
No module named configobj
[Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
not exist: /var/www/favicon.ico
[Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
not exist: /var/www/favicon.ico


Mel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-10 15:51:03 UTC
Permalink
> Ok, I completed removed Turbogears from /usr/lib/python2.5/site-
> packages and easy_install.pth. Then I reinstalled it with a fresh
> tgsetup.py script.
> Purged Apache2, config files, and modules. Then I reinstalled it.
> I went through Lucas's wiki on installing wsgi to a brand new TG app
> that works perfectly when manually started.
>
> Apache2 has these moduels loaded:
>
> alias auth_basic authn_file authz_default authz_groupfile authz_host
> authz_user autoindex cgid dir env mime mod_wsgi negotiation setenvif
> status
>
> And the problem still exists:
>
> [Wed Sep 10 08:08:01 2008] [error] ['/usr/lib/python2.5/site-packages/
> setuptools-0.6c8-py2.5.egg', '/usr/lib/python2.5/site-packages/
> Extremes-1.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
> TurboGears-1.0.
> 6-py2.5.egg', '/usr/lib/python2.5/site-packages/TurboKid-1.0.4-
> py2.5.egg', '/usr/lib/python2.5/site-packages/TurboJson-1.1.4-
> py2.5.egg', '/usr/lib/python2.5/site-packages/TurboCheetah-1.0-
> py2.5.egg', '/usr/l
> ib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg', '/usr/lib/
> python2.5/site-packages/FormEncode-1.0.1-py2.5.egg', '/usr/lib/
> python2.5/site-packages/CherryPy-2.3.0-py2.5.egg', '/usr/lib/python2.5/
> site-p
> ackages/kid-0.9.6-py2.5.egg', '/usr/lib/python2.5/site-packages/
> Cheetah-2.0.1-py2.5-linux-i686.egg', '/usr/lib/python2.5/site-packages/
> PasteDeploy-1.3.2-py2.5.egg', '/usr/lib/python2.5/site-packages/
> Paste-1.
> 7.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/usr/lib/
> python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
> '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
> local
> /lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL',
> '/var/lib/python-support/python2.5', '/usr/local/turbogears/stum', '/
> usr/local/turbogears/stum']
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
> (pid=15076): Target WSGI script '/usr/local/turbogears/stum/apache/
> stum.wsgi' cannot be loaded as Python module.
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
> (pid=15076): Exception occurred processing WSGI script '/usr/local/
> turbogears/stum/apache/stum.wsgi'.
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] Traceback
> (most recent call last):
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] File "/usr/
> local/turbogears/stum/apache/stum.wsgi", line 11, in <module>
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] import
> turbogears
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> __init__.py", line 5, in <module>
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] from
> turbogears import config
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> config.py", line 4, in <module>
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] from
> configobj import ConfigObj
> [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] ImportError:
> No module named configobj
> [Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
> not exist: /var/www/favicon.ico
> [Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
> not exist: /var/www/favicon.ico

Can you uncomment this line in your wsgi file and change the name to your app:

import os
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myfirstapp'

make sure its own by root user +group need to be able to write
make sure /usr/local/turbogears/stum is owner by www-data user + group
need to be able to write

Then if that fails open python
and start typing exact same lines as wsgi file has.

import .....


then try what your error log is doing.
from turbogears import config
then
from configobj import ConfigObj
..etc...


Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 16:59:28 UTC
Permalink
On Sep 10, 8:51 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> > Ok, I completed removed Turbogears from /usr/lib/python2.5/site-
> > packages and easy_install.pth.  Then I reinstalled it with a fresh
> > tgsetup.py script.
> > Purged Apache2, config files, and modules. Then I reinstalled it.
> > I went through Lucas's wiki on installing wsgi to a brand new TG app
> > that works perfectly when manually started.
>
> > Apache2 has these moduels loaded:
>
> > alias auth_basic authn_file authz_default authz_groupfile authz_host
> > authz_user autoindex cgid dir env mime mod_wsgi negotiation setenvif
> > status
>
> > And the problem still exists:
>
> > [Wed Sep 10 08:08:01 2008] [error] ['/usr/lib/python2.5/site-packages/
> > setuptools-0.6c8-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > Extremes-1.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > TurboGears-1.0.
> > 6-py2.5.egg', '/usr/lib/python2.5/site-packages/TurboKid-1.0.4-
> > py2.5.egg', '/usr/lib/python2.5/site-packages/TurboJson-1.1.4-
> > py2.5.egg', '/usr/lib/python2.5/site-packages/TurboCheetah-1.0-
> > py2.5.egg', '/usr/l
> > ib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg', '/usr/lib/
> > python2.5/site-packages/FormEncode-1.0.1-py2.5.egg', '/usr/lib/
> > python2.5/site-packages/CherryPy-2.3.0-py2.5.egg', '/usr/lib/python2.5/
> > site-p
> > ackages/kid-0.9.6-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > Cheetah-2.0.1-py2.5-linux-i686.egg', '/usr/lib/python2.5/site-packages/
> > PasteDeploy-1.3.2-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > Paste-1.
> > 7.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/usr/lib/
> > python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
> > '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
> > local
> > /lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL',
> > '/var/lib/python-support/python2.5', '/usr/local/turbogears/stum', '/
> > usr/local/turbogears/stum']
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
> > (pid=15076): Target WSGI script '/usr/local/turbogears/stum/apache/
> > stum.wsgi' cannot be loaded as Python module.
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
> > (pid=15076): Exception occurred processing WSGI script '/usr/local/
> > turbogears/stum/apache/stum.wsgi'.
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] Traceback
> > (most recent call last):
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]   File "/usr/
> > local/turbogears/stum/apache/stum.wsgi", line 11, in <module>
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]     import
> > turbogears
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]   File "/usr/
> > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> > __init__.py", line 5, in <module>
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]     from
> > turbogears import config
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]   File "/usr/
> > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> > config.py", line 4, in <module>
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]     from
> > configobj import ConfigObj
> > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] ImportError:
> > No module named configobj
> > [Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
> > not exist: /var/www/favicon.ico
> > [Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
> > not exist: /var/www/favicon.ico
>
> Can you uncomment this line in your wsgi file and change the name to your app:
>
> import os
> os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myfirstapp'
>
> make sure its own by root user +group need to be able to write
> make sure /usr/local/turbogears/stum is owner by www-data user + group
> need to be able to write
>
> Then if that fails open python
> and start typing exact same lines as wsgi file has.
>
> import .....
>
> then try what your error log is doing.
> from turbogears import config
> then
> from configobj import ConfigObj
> ..etc...
>
> Lucas

Thanks, that made me wake up a bit. I had to do an easy_install on
configobj, and eventually kid, formencode, sqlobject, and
turbofancyflash. Now it back to where the links don't work. Apache
shows:

[Wed Sep 10 09:54:57 2008] [error] [client 192.168.1.124] File does
not exist: /var/www/reports, referer: http://192.168.1.9/myclient

How do I get /var/www/reports to become http://192.168.1.9/myclient/reports?
Then we might have a winner.

Mel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 19:13:21 UTC
Permalink
On Sep 10, 9:59 am, AZMel <***@gmail.com> wrote:
> On Sep 10, 8:51 am, "Lukasz Szybalski" <***@gmail.com> wrote:
>
>
>
> > > Ok, I completed removed Turbogears from /usr/lib/python2.5/site-
> > > packages and easy_install.pth.  Then I reinstalled it with a fresh
> > > tgsetup.py script.
> > > Purged Apache2, config files, and modules. Then I reinstalled it.
> > > I went through Lucas's wiki on installing wsgi to a brand new TG app
> > > that works perfectly when manually started.
>
> > > Apache2 has these moduels loaded:
>
> > > alias auth_basic authn_file authz_default authz_groupfile authz_host
> > > authz_user autoindex cgid dir env mime mod_wsgi negotiation setenvif
> > > status
>
> > > And the problem still exists:
>
> > > [Wed Sep 10 08:08:01 2008] [error] ['/usr/lib/python2.5/site-packages/
> > > setuptools-0.6c8-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > > Extremes-1.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > > TurboGears-1.0.
> > > 6-py2.5.egg', '/usr/lib/python2.5/site-packages/TurboKid-1.0.4-
> > > py2.5.egg', '/usr/lib/python2.5/site-packages/TurboJson-1.1.4-
> > > py2.5.egg', '/usr/lib/python2.5/site-packages/TurboCheetah-1.0-
> > > py2.5.egg', '/usr/l
> > > ib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg', '/usr/lib/
> > > python2.5/site-packages/FormEncode-1.0.1-py2.5.egg', '/usr/lib/
> > > python2.5/site-packages/CherryPy-2.3.0-py2.5.egg', '/usr/lib/python2.5/
> > > site-p
> > > ackages/kid-0.9.6-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > > Cheetah-2.0.1-py2.5-linux-i686.egg', '/usr/lib/python2.5/site-packages/
> > > PasteDeploy-1.3.2-py2.5.egg', '/usr/lib/python2.5/site-packages/
> > > Paste-1.
> > > 7.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/usr/lib/
> > > python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
> > > '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
> > > local
> > > /lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL',
> > > '/var/lib/python-support/python2.5', '/usr/local/turbogears/stum', '/
> > > usr/local/turbogears/stum']
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
> > > (pid=15076): Target WSGI script '/usr/local/turbogears/stum/apache/
> > > stum.wsgi' cannot be loaded as Python module.
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] mod_wsgi
> > > (pid=15076): Exception occurred processing WSGI script '/usr/local/
> > > turbogears/stum/apache/stum.wsgi'.
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] Traceback
> > > (most recent call last):
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]   File "/usr/
> > > local/turbogears/stum/apache/stum.wsgi", line 11, in <module>
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]     import
> > > turbogears
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]   File "/usr/
> > > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> > > __init__.py", line 5, in <module>
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]     from
> > > turbogears import config
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]   File "/usr/
> > > lib/python2.5/site-packages/TurboGears-1.0.6-py2.5.egg/turbogears/
> > > config.py", line 4, in <module>
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124]     from
> > > configobj import ConfigObj
> > > [Wed Sep 10 08:08:01 2008] [error] [client 192.168.1.124] ImportError:
> > > No module named configobj
> > > [Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
> > > not exist: /var/www/favicon.ico
> > > [Wed Sep 10 08:08:02 2008] [error] [client 192.168.1.124] File does
> > > not exist: /var/www/favicon.ico
>
> > Can you uncomment this line in your wsgi file and change the name to your app:
>
> > import os
> > os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myfirstapp'
>
> > make sure its own by root user +group need to be able to write
> > make sure /usr/local/turbogears/stum is owner by www-data user + group
> > need to be able to write
>
> > Then if that fails open python
> > and start typing exact same lines as wsgi file has.
>
> > import .....
>
> > then try what your error log is doing.
> > from turbogears import config
> > then
> > from configobj import ConfigObj
> > ..etc...
>
> > Lucas
>
> Thanks,  that made me wake up a bit.  I had to do an easy_install on
> configobj, and eventually kid, formencode, sqlobject, and
> turbofancyflash.  Now it back to where the links don't work.  Apache
> shows:
>
> [Wed Sep 10 09:54:57 2008] [error] [client 192.168.1.124] File does
> not exist: /var/www/reports, referer:http://192.168.1.9/myclient
>
> How do I get /var/www/reports to becomehttp://192.168.1.9/myclient/reports?
> Then we might have a winner.
>
> Mel

Ok, we are almost there.

I found a type in the myfirstapp.wsgi script provided in the wiki.

#For root mounted app
#application = cherrypy._cpwsgi.wsgiAppi

should be

#For root mounted app
#application = cherrypy._cpwsgi.wsgiApp

Once I enabled that and disabled the lines as instructed my web site
came up and I was able to fully navigate it.

However, when I try run my reports, which passes a pdf back to the
client, I get a 500 error. We have come full circle but now I am
running wsgi as was requested. And yes, there are no tracebacks in
the apache error.log

Now maybe we can move on and fix the 500 error since wsgi is now
working.

Thanks,
Mel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-10 19:21:40 UTC
Permalink
> Ok, we are almost there.
>
> I found a type in the myfirstapp.wsgi script provided in the wiki.
>
> #For root mounted app
> #application = cherrypy._cpwsgi.wsgiAppi
>

fixed.

> should be
>
> #For root mounted app
> #application = cherrypy._cpwsgi.wsgiApp
>
> Once I enabled that and disabled the lines as instructed my web site
> came up and I was able to fully navigate it.
>
> However, when I try run my reports, which passes a pdf back to the
> client, I get a 500 error. We have come full circle but now I am
> running wsgi as was requested. And yes, there are no tracebacks in
> the apache error.log
>
> Now maybe we can move on and fix the 500 error since wsgi is now
> working.


In the instruction I had disabled the server.log. IF you did too then
re enable it, and make sure it has a full path

args="('/usr/local/..morepath....server.log',)
(restart apache)

and check if you get the error there.

If not then how are you generating the reports? Is that a tg app that
sends it back or you are just passing a url to a file?

if not working still


stop apache and run

start-myapp prod.cfg
and see if you get the error. Check the logs.

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 19:44:59 UTC
Permalink
On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> > Ok, we are almost there.
>
> > I found a type in the myfirstapp.wsgi script provided in the wiki.
>
> > #For root mounted app
> > #application = cherrypy._cpwsgi.wsgiAppi
>
> fixed.
>
> > should be
>
> > #For root mounted app
> > #application = cherrypy._cpwsgi.wsgiApp
>
> > Once I enabled that and disabled the lines as instructed my web site
> > came up and I was able to fully navigate it.
>
> > However, when I try run my reports, which passes a pdf back to the
> > client, I get a 500 error.  We have come full circle but now I am
> > running wsgi as was requested.  And yes, there are no tracebacks in
> > the apache error.log
>
> > Now maybe we can move on and fix the 500 error since wsgi is now
> > working.
>
> In the instruction I had disabled the server.log. IF you did too then
> re enable it, and make sure it has a full path
>
> args="('/usr/local/..morepath....server.log',)
> (restart apache)
>
> and check if you get the error there.
>
> If not then how are you generating the reports? Is that a tg app that
> sends it back or you are just passing a url to a file?
>
> if not working still
>
> stop apache and run
>
> start-myapp prod.cfg
> and see if you get the error. Check the logs.
>
> Lucas

Nothing in the log except this:

- mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
"http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
(Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
irefox/2.0.0.16"

Otherwise it works fine if I use start-myapp prod.cfg

This part of the code is creating a pdf report using reportlab and
using StringIO to buffer the report before sending it to the client
with an application/pdf header. I don't think its making it into the
actual code though because all the log.debug() logic is being
skipped. Going to try opening an empty template first then move on
from there. Let you know whats up when I know more.

Mel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 23:45:54 UTC
Permalink
On Sep 10, 12:44 pm, AZMel <***@gmail.com> wrote:
> On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
>
>
> > > Ok, we are almost there.
>
> > > I found a type in the myfirstapp.wsgi script provided in the wiki.
>
> > > #For root mounted app
> > > #application = cherrypy._cpwsgi.wsgiAppi
>
> > fixed.
>
> > > should be
>
> > > #For root mounted app
> > > #application = cherrypy._cpwsgi.wsgiApp
>
> > > Once I enabled that and disabled the lines as instructed my web site
> > > came up and I was able to fully navigate it.
>
> > > However, when I try run my reports, which passes a pdf back to the
> > > client, I get a 500 error.  We have come full circle but now I am
> > > running wsgi as was requested.  And yes, there are no tracebacks in
> > > the apache error.log
>
> > > Now maybe we can move on and fix the 500 error since wsgi is now
> > > working.
>
> > In the instruction I had disabled the server.log. IF you did too then
> > re enable it, and make sure it has a full path
>
> > args="('/usr/local/..morepath....server.log',)
> > (restart apache)
>
> > and check if you get the error there.
>
> > If not then how are you generating the reports? Is that a tg app that
> > sends it back or you are just passing a url to a file?
>
> > if not working still
>
> > stop apache and run
>
> > start-myapp prod.cfg
> > and see if you get the error. Check the logs.
>
> > Lucas
>
> Nothing in the log except this:
>
>  - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
> irefox/2.0.0.16"
>
> Otherwise it works fine if I use start-myapp prod.cfg
>
> This part of the code is creating a pdf report using reportlab and
> using StringIO to buffer the report before sending it to the client
> with an application/pdf header.  I don't think its making it into the
> actual code though because all the log.debug() logic is being
> skipped.  Going to try opening an empty template first then move on
> from there.  Let you know whats up when I know more.
>
> Mel

The only thing I can see with now is that in my templates are not
processing javascript.

This is what I get when I look at the generated source:

<link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
type="text/css" rel="stylesheet">
<link media="all" href="/tg_widgets/turbogears.widgets/calendar/
calendar-system.css" type="text/css" rel="stylesheet">
<script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
javascript"></script>
<script src="/tg_widgets/jslibs/javascript/events.js" type="text/
javascript"></script>
<script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
type="text/javascript"></script>
<script type="text/javascript">write_stylesheet();</script>
<script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
type="text/javascript"></script>
<script src="/tg_widgets/turbogears.widgets/calendar/calendar-
setup.js" type="text/javascript"></script>
<script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
en.js" charset="utf-8" type="text/javascript"></script>
<title>Bid vs Job Detail</title>
<script src="/tg_js/MochiKit.js" type="text/javascript"></script>
<script type="text/javascript">


This is in the error.log

[Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
not exist: /var/www/tg_widgets, referer: http://192.168.1.
9/myclient/reports/BidVSJobDetailInfo

CSS and images are working fine:

- - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
- - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
"http://192.168.1.9/myclient/static/css/style.css"
"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
20080702 Firefox/2.0.0.16"

Is there a variable I need to set?

Mel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-11 13:44:52 UTC
Permalink
On Wed, Sep 10, 2008 at 6:45 PM, AZMel <***@gmail.com> wrote:
>
>
>
> On Sep 10, 12:44 pm, AZMel <***@gmail.com> wrote:
>> On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>>
>>
>>
>> > > Ok, we are almost there.
>>
>> > > I found a type in the myfirstapp.wsgi script provided in the wiki.
>>
>> > > #For root mounted app
>> > > #application = cherrypy._cpwsgi.wsgiAppi
>>
>> > fixed.
>>
>> > > should be
>>
>> > > #For root mounted app
>> > > #application = cherrypy._cpwsgi.wsgiApp
>>
>> > > Once I enabled that and disabled the lines as instructed my web site
>> > > came up and I was able to fully navigate it.
>>
>> > > However, when I try run my reports, which passes a pdf back to the
>> > > client, I get a 500 error. We have come full circle but now I am
>> > > running wsgi as was requested. And yes, there are no tracebacks in
>> > > the apache error.log
>>
>> > > Now maybe we can move on and fix the 500 error since wsgi is now
>> > > working.
>>
>> > In the instruction I had disabled the server.log. IF you did too then
>> > re enable it, and make sure it has a full path
>>
>> > args="('/usr/local/..morepath....server.log',)
>> > (restart apache)
>>
>> > and check if you get the error there.
>>
>> > If not then how are you generating the reports? Is that a tg app that
>> > sends it back or you are just passing a url to a file?
>>
>> > if not working still
>>
>> > stop apache and run
>>
>> > start-myapp prod.cfg
>> > and see if you get the error. Check the logs.
>>
>> > Lucas
>>
>> Nothing in the log except this:
>>
>> - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
>> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
>> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
>> irefox/2.0.0.16"
>>
>> Otherwise it works fine if I use start-myapp prod.cfg
>>
>> This part of the code is creating a pdf report using reportlab and
>> using StringIO to buffer the report before sending it to the client
>> with an application/pdf header. I don't think its making it into the
>> actual code though because all the log.debug() logic is being
>> skipped. Going to try opening an empty template first then move on
>> from there. Let you know whats up when I know more.
>>
>> Mel
>
> The only thing I can see with now is that in my templates are not
> processing javascript.
>
> This is what I get when I look at the generated source:
>
> <link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
> type="text/css" rel="stylesheet">
> <link media="all" href="/tg_widgets/turbogears.widgets/calendar/
> calendar-system.css" type="text/css" rel="stylesheet">
> <script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
> javascript"></script>
> <script src="/tg_widgets/jslibs/javascript/events.js" type="text/
> javascript"></script>
> <script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
> type="text/javascript"></script>
> <script type="text/javascript">write_stylesheet();</script>
> <script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
> type="text/javascript"></script>
> <script src="/tg_widgets/turbogears.widgets/calendar/calendar-
> setup.js" type="text/javascript"></script>
> <script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
> en.js" charset="utf-8" type="text/javascript"></script>
> <title>Bid vs Job Detail</title>
> <script src="/tg_js/MochiKit.js" type="text/javascript"></script>
> <script type="text/javascript">
>
>
> This is in the error.log
>
> [Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
> not exist: /var/www/tg_widgets, referer: http://192.168.1.
> 9/myclient/reports/BidVSJobDetailInfo
>
> CSS and images are working fine:
>
> - - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
> 192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
> 5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
> - - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
> "http://192.168.1.9/myclient/static/css/style.css"
> "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
> 20080702 Firefox/2.0.0.16"
>
> Is there a variable I need to set?

Can you access you java script code? If not have you setup an alias?

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-11 14:17:06 UTC
Permalink
On Sep 11, 6:44 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> On Wed, Sep 10, 2008 at 6:45 PM, AZMel <***@gmail.com> wrote:
>
> > On Sep 10, 12:44 pm, AZMel <***@gmail.com> wrote:
> >> On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> >> > > Ok, we are almost there.
>
> >> > > I found a type in the myfirstapp.wsgi script provided in the wiki.
>
> >> > > #For root mounted app
> >> > > #application = cherrypy._cpwsgi.wsgiAppi
>
> >> > fixed.
>
> >> > > should be
>
> >> > > #For root mounted app
> >> > > #application = cherrypy._cpwsgi.wsgiApp
>
> >> > > Once I enabled that and disabled the lines as instructed my web site
> >> > > came up and I was able to fully navigate it.
>
> >> > > However, when I try run my reports, which passes a pdf back to the
> >> > > client, I get a 500 error.  We have come full circle but now I am
> >> > > running wsgi as was requested.  And yes, there are no tracebacks in
> >> > > the apache error.log
>
> >> > > Now maybe we can move on and fix the 500 error since wsgi is now
> >> > > working.
>
> >> > In the instruction I had disabled the server.log. IF you did too then
> >> > re enable it, and make sure it has a full path
>
> >> > args="('/usr/local/..morepath....server.log',)
> >> > (restart apache)
>
> >> > and check if you get the error there.
>
> >> > If not then how are you generating the reports? Is that a tg app that
> >> > sends it back or you are just passing a url to a file?
>
> >> > if not working still
>
> >> > stop apache and run
>
> >> > start-myapp prod.cfg
> >> > and see if you get the error. Check the logs.
>
> >> > Lucas
>
> >> Nothing in the log except this:
>
> >>  - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
> >> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
> >> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
> >> irefox/2.0.0.16"
>
> >> Otherwise it works fine if I use start-myapp prod.cfg
>
> >> This part of the code is creating a pdf report using reportlab and
> >> using StringIO to buffer the report before sending it to the client
> >> with an application/pdf header.  I don't think its making it into the
> >> actual code though because all the log.debug() logic is being
> >> skipped.  Going to try opening an empty template first then move on
> >> from there.  Let you know whats up when I know more.
>
> >> Mel
>
> > The only thing I can see with now is that in my templates are not
> > processing javascript.
>
> > This is what I get when I look at the generated source:
>
> > <link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
> > type="text/css" rel="stylesheet">
> > <link media="all" href="/tg_widgets/turbogears.widgets/calendar/
> > calendar-system.css" type="text/css" rel="stylesheet">
> > <script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
> > javascript"></script>
> > <script src="/tg_widgets/jslibs/javascript/events.js" type="text/
> > javascript"></script>
> > <script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
> > type="text/javascript"></script>
> > <script type="text/javascript">write_stylesheet();</script>
> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
> > type="text/javascript"></script>
> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar-
> > setup.js" type="text/javascript"></script>
> > <script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
> > en.js" charset="utf-8" type="text/javascript"></script>
> > <title>Bid vs Job Detail</title>
> > <script src="/tg_js/MochiKit.js" type="text/javascript"></script>
> > <script type="text/javascript">
>
> > This is in the error.log
>
> > [Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
> > not exist: /var/www/tg_widgets, referer:http://192.168.1.
> > 9/myclient/reports/BidVSJobDetailInfo
>
> > CSS and images are working fine:
>
> >  - - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
> > 192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
> >  5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
> >  - - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
> > "http://192.168.1.9/myclient/static/css/style.css"
> > "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
> > 20080702 Firefox/2.0.0.16"
>
> > Is there a variable I need to set?
>
> Can you access you java script code? If not have you setup an alias?
>
> Lucas

I can access my own JS code but not the ones for TG, nor the widgets.

The only alias I have is

Alias /static /usr/local/turbogears/myclient/myclient/static.

Do I need to set up alias for TG's stuff as well? Do I have to set
them up like this:

Alias /tg_js /usr/lib/python2.5/site-packages/TurboGears-1.0.6-
py2.5.egg/turbogears/static/js?

If so, then do I need to change all the .kid templates and what about
widgets?

I may have missed something. Do I have to do something to the code
besides just copying it from development directory to deployment or do
I just use the code straight up?

Thanks,

Mel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-11 14:25:59 UTC
Permalink
On Thu, Sep 11, 2008 at 9:17 AM, AZMel <***@gmail.com> wrote:
>
>
>
> On Sep 11, 6:44 am, "Lukasz Szybalski" <***@gmail.com> wrote:
>> On Wed, Sep 10, 2008 at 6:45 PM, AZMel <***@gmail.com> wrote:
>>
>> > On Sep 10, 12:44 pm, AZMel <***@gmail.com> wrote:
>> >> On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>>
>> >> > > Ok, we are almost there.
>>
>> >> > > I found a type in the myfirstapp.wsgi script provided in the wiki.
>>
>> >> > > #For root mounted app
>> >> > > #application = cherrypy._cpwsgi.wsgiAppi
>>
>> >> > fixed.
>>
>> >> > > should be
>>
>> >> > > #For root mounted app
>> >> > > #application = cherrypy._cpwsgi.wsgiApp
>>
>> >> > > Once I enabled that and disabled the lines as instructed my web site
>> >> > > came up and I was able to fully navigate it.
>>
>> >> > > However, when I try run my reports, which passes a pdf back to the
>> >> > > client, I get a 500 error. We have come full circle but now I am
>> >> > > running wsgi as was requested. And yes, there are no tracebacks in
>> >> > > the apache error.log
>>
>> >> > > Now maybe we can move on and fix the 500 error since wsgi is now
>> >> > > working.
>>
>> >> > In the instruction I had disabled the server.log. IF you did too then
>> >> > re enable it, and make sure it has a full path
>>
>> >> > args="('/usr/local/..morepath....server.log',)
>> >> > (restart apache)
>>
>> >> > and check if you get the error there.
>>
>> >> > If not then how are you generating the reports? Is that a tg app that
>> >> > sends it back or you are just passing a url to a file?
>>
>> >> > if not working still
>>
>> >> > stop apache and run
>>
>> >> > start-myapp prod.cfg
>> >> > and see if you get the error. Check the logs.
>>
>> >> > Lucas
>>
>> >> Nothing in the log except this:
>>
>> >> - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
>> >> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
>> >> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
>> >> irefox/2.0.0.16"
>>
>> >> Otherwise it works fine if I use start-myapp prod.cfg
>>
>> >> This part of the code is creating a pdf report using reportlab and
>> >> using StringIO to buffer the report before sending it to the client
>> >> with an application/pdf header. I don't think its making it into the
>> >> actual code though because all the log.debug() logic is being
>> >> skipped. Going to try opening an empty template first then move on
>> >> from there. Let you know whats up when I know more.
>>
>> >> Mel
>>
>> > The only thing I can see with now is that in my templates are not
>> > processing javascript.
>>
>> > This is what I get when I look at the generated source:
>>
>> > <link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
>> > type="text/css" rel="stylesheet">
>> > <link media="all" href="/tg_widgets/turbogears.widgets/calendar/
>> > calendar-system.css" type="text/css" rel="stylesheet">
>> > <script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
>> > javascript"></script>
>> > <script src="/tg_widgets/jslibs/javascript/events.js" type="text/
>> > javascript"></script>
>> > <script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
>> > type="text/javascript"></script>
>> > <script type="text/javascript">write_stylesheet();</script>
>> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
>> > type="text/javascript"></script>
>> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar-
>> > setup.js" type="text/javascript"></script>
>> > <script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
>> > en.js" charset="utf-8" type="text/javascript"></script>
>> > <title>Bid vs Job Detail</title>
>> > <script src="/tg_js/MochiKit.js" type="text/javascript"></script>
>> > <script type="text/javascript">
>>
>> > This is in the error.log
>>
>> > [Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
>> > not exist: /var/www/tg_widgets, referer:http://192.168.1.
>> > 9/myclient/reports/BidVSJobDetailInfo
>>
>> > CSS and images are working fine:
>>
>> > - - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
>> > 192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
>> > 5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
>> > - - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
>> > "http://192.168.1.9/myclient/static/css/style.css"
>> > "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
>> > 20080702 Firefox/2.0.0.16"
>>
>> > Is there a variable I need to set?
>>
>> Can you access you java script code? If not have you setup an alias?
>>
>> Lucas
>
> I can access my own JS code but not the ones for TG, nor the widgets.
>
> The only alias I have is
>
> Alias /static /usr/local/turbogears/myclient/myclient/static.

That is all you need.

what I ment is you go to http://localhost/myclient/.......somefile.js
can you access it through here. Read the source of html, find the
link to java source file and see if you can access it.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-11 14:37:44 UTC
Permalink
On Sep 11, 7:25 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> On Thu, Sep 11, 2008 at 9:17 AM, AZMel <***@gmail.com> wrote:
>
> > On Sep 11, 6:44 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> >> On Wed, Sep 10, 2008 at 6:45 PM, AZMel <***@gmail.com> wrote:
>
> >> > On Sep 10, 12:44 pm, AZMel <***@gmail.com> wrote:
> >> >> On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> >> >> > > Ok, we are almost there.
>
> >> >> > > I found a type in the myfirstapp.wsgi script provided in the wiki.
>
> >> >> > > #For root mounted app
> >> >> > > #application = cherrypy._cpwsgi.wsgiAppi
>
> >> >> > fixed.
>
> >> >> > > should be
>
> >> >> > > #For root mounted app
> >> >> > > #application = cherrypy._cpwsgi.wsgiApp
>
> >> >> > > Once I enabled that and disabled the lines as instructed my web site
> >> >> > > came up and I was able to fully navigate it.
>
> >> >> > > However, when I try run my reports, which passes a pdf back to the
> >> >> > > client, I get a 500 error.  We have come full circle but now I am
> >> >> > > running wsgi as was requested.  And yes, there are no tracebacks in
> >> >> > > the apache error.log
>
> >> >> > > Now maybe we can move on and fix the 500 error since wsgi is now
> >> >> > > working.
>
> >> >> > In the instruction I had disabled the server.log. IF you did too then
> >> >> > re enable it, and make sure it has a full path
>
> >> >> > args="('/usr/local/..morepath....server.log',)
> >> >> > (restart apache)
>
> >> >> > and check if you get the error there.
>
> >> >> > If not then how are you generating the reports? Is that a tg app that
> >> >> > sends it back or you are just passing a url to a file?
>
> >> >> > if not working still
>
> >> >> > stop apache and run
>
> >> >> > start-myapp prod.cfg
> >> >> > and see if you get the error. Check the logs.
>
> >> >> > Lucas
>
> >> >> Nothing in the log except this:
>
> >> >>  - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
> >> >> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
> >> >> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
> >> >> irefox/2.0.0.16"
>
> >> >> Otherwise it works fine if I use start-myapp prod.cfg
>
> >> >> This part of the code is creating a pdf report using reportlab and
> >> >> using StringIO to buffer the report before sending it to the client
> >> >> with an application/pdf header.  I don't think its making it into the
> >> >> actual code though because all the log.debug() logic is being
> >> >> skipped.  Going to try opening an empty template first then move on
> >> >> from there.  Let you know whats up when I know more.
>
> >> >> Mel
>
> >> > The only thing I can see with now is that in my templates are not
> >> > processing javascript.
>
> >> > This is what I get when I look at the generated source:
>
> >> > <link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
> >> > type="text/css" rel="stylesheet">
> >> > <link media="all" href="/tg_widgets/turbogears.widgets/calendar/
> >> > calendar-system.css" type="text/css" rel="stylesheet">
> >> > <script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
> >> > javascript"></script>
> >> > <script src="/tg_widgets/jslibs/javascript/events.js" type="text/
> >> > javascript"></script>
> >> > <script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
> >> > type="text/javascript"></script>
> >> > <script type="text/javascript">write_stylesheet();</script>
> >> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
> >> > type="text/javascript"></script>
> >> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar-
> >> > setup.js" type="text/javascript"></script>
> >> > <script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
> >> > en.js" charset="utf-8" type="text/javascript"></script>
> >> > <title>Bid vs Job Detail</title>
> >> > <script src="/tg_js/MochiKit.js" type="text/javascript"></script>
> >> > <script type="text/javascript">
>
> >> > This is in the error.log
>
> >> > [Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
> >> > not exist: /var/www/tg_widgets, referer:http://192.168.1.
> >> > 9/myclient/reports/BidVSJobDetailInfo
>
> >> > CSS and images are working fine:
>
> >> >  - - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
> >> > 192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
> >> >  5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
> >> >  - - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
> >> > "http://192.168.1.9/myclient/static/css/style.css"
> >> > "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
> >> > 20080702 Firefox/2.0.0.16"
>
> >> > Is there a variable I need to set?
>
> >> Can you access you java script code? If not have you setup an alias?
>
> >> Lucas
>
> > I can access my own JS code but not the ones for TG, nor the widgets.
>
> > The only alias I have is
>
> > Alias /static /usr/local/turbogears/myclient/myclient/static.
>
> That is all you need.
>
> what I ment is you go tohttp://localhost/myclient/.......somefile.js
>  can you access it through here. Read the source of html, find the
> link to java source file and see if you can access it.

if I go to http://192.168.1.9/static/javascript/formatting.js I get
code displayed in the browser but not if I go to http://192.168.1.9/myclient/formatting.js
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-11 21:09:51 UTC
Permalink
On Sep 11, 7:37 am, AZMel <***@gmail.com> wrote:
> On Sep 11, 7:25 am, "Lukasz Szybalski" <***@gmail.com> wrote:
>
>
>
> > On Thu, Sep 11, 2008 at 9:17 AM, AZMel <***@gmail.com> wrote:
>
> > > On Sep 11, 6:44 am, "Lukasz Szybalski" <***@gmail.com> wrote:
> > >> On Wed, Sep 10, 2008 at 6:45 PM, AZMel <***@gmail.com> wrote:
>
> > >> > On Sep 10, 12:44 pm, AZMel <***@gmail.com> wrote:
> > >> >> On Sep 10, 12:21 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
> > >> >> > > Ok, we are almost there.
>
> > >> >> > > I found a type in the myfirstapp.wsgiscript provided in the wiki.
>
> > >> >> > > #For root mounted app
> > >> >> > > #application = cherrypy._cpwsgi.wsgiAppi
>
> > >> >> > fixed.
>
> > >> >> > > should be
>
> > >> >> > > #For root mounted app
> > >> >> > > #application = cherrypy._cpwsgi.wsgiApp
>
> > >> >> > > Once I enabled that and disabled the lines as instructed my web site
> > >> >> > > came up and I was able to fully navigate it.
>
> > >> >> > > However, when I try run my reports, which passes a pdf back to the
> > >> >> > > client, I get a 500 error.  We have come full circle but now I am
> > >> >> > > runningwsgias was requested.  And yes, there are no tracebacks in
> > >> >> > > the apache error.log
>
> > >> >> > > Now maybe we can move on and fix the 500 error sincewsgiis now
> > >> >> > > working.
>
> > >> >> > In the instruction I had disabled the server.log. IF you did too then
> > >> >> > re enable it, and make sure it has a full path
>
> > >> >> > args="('/usr/local/..morepath....server.log',)
> > >> >> > (restart apache)
>
> > >> >> > and check if you get the error there.
>
> > >> >> > If not then how are you generating the reports? Is that a tg app that
> > >> >> > sends it back or you are just passing a url to a file?
>
> > >> >> > if not working still
>
> > >> >> > stop apache and run
>
> > >> >> > start-myapp prod.cfg
> > >> >> > and see if you get the error. Check the logs.
>
> > >> >> > Lucas
>
> > >> >> Nothing in the log except this:
>
> > >> >>  - mel "POST /myclient/reports/BidVSJobDetailReport HTTP/1.1" 500 791
> > >> >> "http://192.168.1.9/myclient/reports/BidVSJobDetailInfo" "Mozilla/5.0
> > >> >> (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/20080702 F
> > >> >> irefox/2.0.0.16"
>
> > >> >> Otherwise it works fine if I use start-myapp prod.cfg
>
> > >> >> This part of the code is creating a pdf report using reportlab and
> > >> >> using StringIO to buffer the report before sending it to the client
> > >> >> with an application/pdf header.  I don't think its making it into the
> > >> >> actual code though because all the log.debug() logic is being
> > >> >> skipped.  Going to try opening an empty template first then move on
> > >> >> from there.  Let you know whats up when I know more.
>
> > >> >> Mel
>
> > >> > The only thing I can see with now is that in my templates are not
> > >> > processing javascript.
>
> > >> > This is what I get when I look at the generated source:
>
> > >> > <link media="screen" href="/tg_widgets/fancyflash/css/fancyflash.css"
> > >> > type="text/css" rel="stylesheet">
> > >> > <link media="all" href="/tg_widgets/turbogears.widgets/calendar/
> > >> > calendar-system.css" type="text/css" rel="stylesheet">
> > >> > <script src="/tg_widgets/jslibs/javascript/MochiKit.js" type="text/
> > >> > javascript"></script>
> > >> > <script src="/tg_widgets/jslibs/javascript/events.js" type="text/
> > >> > javascript"></script>
> > >> > <script src="/tg_widgets/fancyflash/javascript/fancyflash.js"
> > >> > type="text/javascript"></script>
> > >> > <script type="text/javascript">write_stylesheet();</script>
> > >> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar.js"
> > >> > type="text/javascript"></script>
> > >> > <script src="/tg_widgets/turbogears.widgets/calendar/calendar-
> > >> > setup.js" type="text/javascript"></script>
> > >> > <script src="/tg_widgets/turbogears.widgets/calendar/lang/calendar-
> > >> > en.js" charset="utf-8" type="text/javascript"></script>
> > >> > <title>Bid vs Job Detail</title>
> > >> > <script src="/tg_js/MochiKit.js" type="text/javascript"></script>
> > >> > <script type="text/javascript">
>
> > >> > This is in the error.log
>
> > >> > [Wed Sep 10 16:37:09 2008] [error] [client 192.168.1.124] File does
> > >> > not exist: /var/www/tg_widgets, referer:http://192.168.1.
> > >> > 9/myclient/reports/BidVSJobDetailInfo
>
> > >> > CSS and images are working fine:
>
> > >> >  - - "GET /myclient/static/css/style.css HTTP/1.1" 304 - "http://
> > >> > 192.168.1.9/myclient/" "Mozilla/5.0 (Windows; U; Windows NT
> > >> >  5.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"
> > >> >  - - "GET /myclient/static/images/WebBanner.png HTTP/1.1" 304 -
> > >> > "http://192.168.1.9/myclient/static/css/style.css"
> > >> > "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.16) Gecko/
> > >> > 20080702 Firefox/2.0.0.16"
>
> > >> > Is there a variable I need to set?
>
> > >> Can you access you java script code? If not have you setup an alias?
>
> > >> Lucas
>
> > > I can access my own JS code but not the ones for TG, nor the widgets.
>
> > > The only alias I have is
>
> > > Alias /static /usr/local/turbogears/myclient/myclient/static.
>
> > That is all you need.
>
> > what I ment is you go tohttp://localhost/myclient/.......somefile.js
> >  can you access it through here. Read the source of html, find the
> > link to java source file and see if you can access it.
>
> if I go tohttp://192.168.1.9/static/javascript/formatting.jsI get
> code displayed in the browser but not if I go tohttp://192.168.1.9/myclient/formatting.js

I think this discussion is closed.

I was able to track down the root of the 500 error but I needed to use
log.error() in my code to see it since it was not trappable or
traceable. There is another thread I opened on this matter in regards
to locale.currency() which was the finale culprit. I did however get
my site moved over from proxy to wsgi and I definitely like that setup
better though I am having problems with tg_js and tg_widgets being
handled correctly. The too has a discussion opened call "Apache
unable to see tg_widget and tg_js".

If you went through this entire discussion I hope some of it is
helpful.

Thanks to Lucas and Graham for their help up to this point.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-10 00:46:26 UTC
Permalink
> http://192.168.1.9/webapps/webapps/
> This comes up with the home page but no static content is sent
> over. Also tg,url('/') returns /webapps which I would have expected /
> webapps/webapps.
>
> Remember that the app was developed with / being returned from
> tg.url('/').
>


So is your application root mounted "/" or is it not /webapps?
If you have an def index() function do you want it to:

localhost/index or do you want it to be localhost/webapps/index ??

#For non root mounted app:
turbogears.config.update({'global': {'server.webpath': '/webapps'}})

then your app should be accessible through localhost/webapps/index

I see your controller has reports = ReportsController() this means
your application will be accessable through
localhost/webapps/reports/

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 01:09:24 UTC
Permalink
On Sep 9, 5:46 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> >http://192.168.1.9/webapps/webapps/
> >    This comes up with the home page but no static content is sent
> > over.  Also tg,url('/') returns /webapps which I would have expected /
> > webapps/webapps.
>
> > Remember that the app was developed with / being returned from
> > tg.url('/').
>
> So is your application root mounted  "/" or is it not /webapps?
> If you have an def index() function do you want it to:
>
> localhost/index or do you want it to be localhost/webapps/index ??
>
> #For non root mounted app:
> turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> then your app should be accessible through localhost/webapps/index
>
> I see your controller has reports = ReportsController() this means
> your application will be accessable through
> localhost/webapps/reports/
>
> Lucas

Whatever works. Does not have to be root, in fact I would prefer to
access it through http://192.168.1.9/webapps that way I can put other
apps on the same server.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Lukasz Szybalski
2008-09-10 01:17:01 UTC
Permalink
On Tue, Sep 9, 2008 at 8:09 PM, AZMel <***@gmail.com> wrote:
>
>
>
> On Sep 9, 5:46 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>> >http://192.168.1.9/webapps/webapps/
>> > This comes up with the home page but no static content is sent
>> > over. Also tg,url('/') returns /webapps which I would have expected /
>> > webapps/webapps.
>>
>> > Remember that the app was developed with / being returned from
>> > tg.url('/').
>>
>> So is your application root mounted "/" or is it not /webapps?
>> If you have an def index() function do you want it to:
>>
>> localhost/index or do you want it to be localhost/webapps/index ??
>>
>> #For non root mounted app:
>> turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>>
>> then your app should be accessible through localhost/webapps/index
>>
>> I see your controller has reports = ReportsController() this means
>> your application will be accessable through
>> localhost/webapps/reports/
>>
>> Lucas
>
> Whatever works. Does not have to be root, in fact I would prefer to
> access it through http://192.168.1.9/webapps that way I can put other
> apps on the same server.
>

Well,
You have to play around with it. You either skipped a step or have
something misconfiguration. I have used these instructions for 4
deployments, copy and paste and they worked each time.

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Dumpleton
2008-09-10 02:06:41 UTC
Permalink
No, signal handler warnings are not relevant.

They are just warnings where mod_wsgi protects itself from CherryPy
trying to override signal handlers when it should not be. Later
versions of CherryPy support notion of being embedded within another
web server and so when configured properly CherryPy doesn't do what it
is doing.

Graham

AZMel wrote:
> On Sep 9, 6:09�pm, AZMel <***@gmail.com> wrote:
> > On Sep 9, 5:46�pm, "Lukasz Szybalski" <***@gmail.com> wrote:
> >
> >
> >
> > > >http://192.168.1.9/webapps/webapps/
> > > > � �This comes up with the home page but no static content is sent
> > > > over. �Also tg,url('/') returns /webapps which I would have expected /
> > > > webapps/webapps.
> >
> > > > Remember that the app was developed with / being returned from
> > > > tg.url('/').
> >
> > > So is your application root mounted �"/" or is it not /webapps?
> > > If you have an def index() function do you want it to:
> >
> > > localhost/index or do you want it to be localhost/webapps/index ??
> >
> > > #For non root mounted app:
> > > turbogears.config.update({'global': {'server.webpath': '/webapps'}})
> >
> > > then your app should be accessible through localhost/webapps/index
> >
> > > I see your controller has reports = ReportsController() this means
> > > your application will be accessable through
> > > localhost/webapps/reports/
> >
> > > Lucas
> >
> > Whatever works. �Does not have to be root, in fact I would prefer to
> > access it throughhttp://192.168.1.9/webappsthat way I can put other
> > apps on the same server.
> >
> > Mel
>
> Is this of any interest?
>
> [Tue Sep 09 18:31:07 2008] [warn] mod_wsgi (pid=14636): Callback
> registration for signal 15 ignored.
> [Tue Sep 09 18:31:07 2008] [warn] File "/usr/local/turbogears/
> myclient/apache/webapps.wsgi", line 9, in <module>
> [Tue Sep 09 18:31:07 2008] [warn] import cherrypy
> [Tue Sep 09 18:31:07 2008] [warn] File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", lin
> e 20, in <module>
> [Tue Sep 09 18:31:07 2008] [warn] import _cpserver
> [Tue Sep 09 18:31:07 2008] [warn] File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", li
> ne 10, in <module>
> [Tue Sep 09 18:31:07 2008] [warn] from cherrypy._cpengine import
> Engine, STOPPED, STARTING, STARTED
> [Tue Sep 09 18:31:07 2008] [warn] File "/usr/lib/python2.5/site-
> packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", li
> ne 25, in <module>
> [Tue Sep 09 18:31:07 2008] [warn] signal.signal(signal.SIGTERM,
> SIGTERM)
> [Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=14636): Target WSGI script '/usr/local/turbogears/myclient/apache/
> webapps.wsgi' cannot be loaded as Python module.
> [Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] mod_wsgi
> (pid=14636): Exception occurred processing WSGI script '/us
> r/local/turbogears/myclient/apache/webapps.wsgi'.
> [Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] Traceback
> (most recent call last):
> [Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] File "/usr/
> local/turbogears/myclient/apache/webapps.wsgi", line 1
> 1, in <module>
> [Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] import
> turbogears
> [Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] File "/usr/
> lib/python2.5/site-packages/TurboGears-1.0.5-py2.5.egg/
> turbogears/__init__.py", line 5, in <module>
>
> I also tried rebuilding mod_wsgi with no change.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
AZMel
2008-09-10 01:35:13 UTC
Permalink
On Sep 9, 6:09 pm, AZMel <***@gmail.com> wrote:
> On Sep 9, 5:46 pm, "Lukasz Szybalski" <***@gmail.com> wrote:
>
>
>
> > >http://192.168.1.9/webapps/webapps/
> > >    This comes up with the home page but no static content is sent
> > > over.  Also tg,url('/') returns /webapps which I would have expected /
> > > webapps/webapps.
>
> > > Remember that the app was developed with / being returned from
> > > tg.url('/').
>
> > So is your application root mounted  "/" or is it not /webapps?
> > If you have an def index() function do you want it to:
>
> > localhost/index or do you want it to be localhost/webapps/index ??
>
> > #For non root mounted app:
> > turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> > then your app should be accessible through localhost/webapps/index
>
> > I see your controller has reports = ReportsController() this means
> > your application will be accessable through
> > localhost/webapps/reports/
>
> > Lucas
>
> Whatever works.  Does not have to be root, in fact I would prefer to
> access it throughhttp://192.168.1.9/webappsthat way I can put other
> apps on the same server.
>
> Mel

Is this of any interest?

[Tue Sep 09 18:31:07 2008] [warn] mod_wsgi (pid=14636): Callback
registration for signal 15 ignored.
[Tue Sep 09 18:31:07 2008] [warn] File "/usr/local/turbogears/
myclient/apache/webapps.wsgi", line 9, in <module>
[Tue Sep 09 18:31:07 2008] [warn] import cherrypy
[Tue Sep 09 18:31:07 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", lin
e 20, in <module>
[Tue Sep 09 18:31:07 2008] [warn] import _cpserver
[Tue Sep 09 18:31:07 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", li
ne 10, in <module>
[Tue Sep 09 18:31:07 2008] [warn] from cherrypy._cpengine import
Engine, STOPPED, STARTING, STARTED
[Tue Sep 09 18:31:07 2008] [warn] File "/usr/lib/python2.5/site-
packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", li
ne 25, in <module>
[Tue Sep 09 18:31:07 2008] [warn] signal.signal(signal.SIGTERM,
SIGTERM)
[Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=14636): Target WSGI script '/usr/local/turbogears/myclient/apache/
webapps.wsgi' cannot be loaded as Python module.
[Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] mod_wsgi
(pid=14636): Exception occurred processing WSGI script '/us
r/local/turbogears/myclient/apache/webapps.wsgi'.
[Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] Traceback
(most recent call last):
[Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] File "/usr/
local/turbogears/myclient/apache/webapps.wsgi", line 1
1, in <module>
[Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] import
turbogears
[Tue Sep 09 18:31:07 2008] [error] [client 192.168.1.121] File "/usr/
lib/python2.5/site-packages/TurboGears-1.0.5-py2.5.egg/
turbogears/__init__.py", line 5, in <module>

I also tried rebuilding mod_wsgi with no change.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to turbogears+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Loading...