Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

One information source not starting up properly

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


oli at thepcspy

Oct 8, 2009, 8:33 AM

Post #1 of 20 (889 views)
Permalink
One information source not starting up properly

I've got a django information source that just refuses to load via Cherokee.
It loads fine if I type the exact command into the terminal (and pages are
accessible through Cherokee if it's running). It's very odd.

Connection: /websites/mysite-co-uk/sock
Interpreter: /websites/mysite-co-uk/manage.py runfcgi
workdir=/websites/mysite-co-uk/ maxspare=3 method=threaded protocol=scgi
socket=sock pidfile=pid

The server is running as the same user I log in as. I'm using similar
commands for other django websites (just changing the paths). Any idea's why
it's not launching?

If you don't know what it might be exactly, is there any way I can get a
look at what's exploding?


taher at unixwars

Oct 8, 2009, 8:39 AM

Post #2 of 20 (852 views)
Permalink
Re: One information source not starting up properly [In reply to]

You could always launch cherokee-admin with the --debug parameter. Maybe
you'll see something there.

Oli Warner wrote:
> I've got a django information source that just refuses to load via
> Cherokee. It loads fine if I type the exact command into the terminal
> (and pages are accessible through Cherokee if it's running). It's very
> odd.
>
> Connection: /websites/mysite-co-uk/sock
> Interpreter: /websites/mysite-co-uk/manage.py runfcgi
> workdir=/websites/mysite-co-uk/ maxspare=3 method=threaded
> protocol=scgi socket=sock pidfile=pid
>
> The server is running as the same user I log in as. I'm using similar
> commands for other django websites (just changing the paths). Any
> idea's why it's not launching?
>
> If you don't know what it might be exactly, is there any way I can get
> a look at what's exploding?

--
taher [at] unixwars
http://unixwars.com/

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


oli at thepcspy

Oct 8, 2009, 8:48 AM

Post #3 of 20 (851 views)
Permalink
Re: One information source not starting up properly [In reply to]

Not seeing anything.. at all. Just to confirm, I'm running: sudo
cherokee-admin -b -u --debug

On Thu, Oct 8, 2009 at 4:39 PM, Taher Shihadeh <taher [at] unixwars> wrote:

> You could always launch cherokee-admin with the --debug parameter. Maybe
> you'll see something there.
>
>
> Oli Warner wrote:
>
>> I've got a django information source that just refuses to load via
>> Cherokee. It loads fine if I type the exact command into the terminal (and
>> pages are accessible through Cherokee if it's running). It's very odd.
>>
>> Connection: /websites/mysite-co-uk/sock
>> Interpreter: /websites/mysite-co-uk/manage.py runfcgi
>> workdir=/websites/mysite-co-uk/ maxspare=3 method=threaded protocol=scgi
>> socket=sock pidfile=pid
>>
>> The server is running as the same user I log in as. I'm using similar
>> commands for other django websites (just changing the paths). Any idea's why
>> it's not launching?
>>
>> If you don't know what it might be exactly, is there any way I can get a
>> look at what's exploding?
>>
>
> --
> taher [at] unixwars
> http://unixwars.com/
>
>


stefan at konink

Oct 8, 2009, 8:53 AM

Post #4 of 20 (855 views)
Permalink
Re: One information source not starting up properly [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Oli Warner schreef:
> I've got a django information source that just refuses to load via
> Cherokee. It loads fine if I type the exact command into the terminal
> (and pages are accessible through Cherokee if it's running). It's very odd.

Start cherokee-worker manually. And see if you get any console errors.
Alternatively use the trace functionality.


Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkrOCvYACgkQYH1+F2Rqwn2JIwCfSvk0YlfQUrJLnEg0XQ8eY+Dk
DA0AnjxGVeKlQgvH3b3cay4EzTngehmR
=KoQ2
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


oli at thepcspy

Oct 8, 2009, 12:38 PM

Post #5 of 20 (847 views)
Permalink
Re: One information source not starting up properly [In reply to]

Hmm reply-to-all wasn't working. Make sure you reply to the list people!

For the group, here's what I accidentally just sent to Christopher:

Right I created a script, based on the one above. It means my interpreters
are now just: /websites/launch <website-name> <thread-count>
For posterity, I'll include that at the bottom of this email.

Much nicer and it works for all my other django sites... But not this one
still! Same gig as before, if I launch it with this new script, cherokee
finds it. If I let it try to launch itself, it fails all over the place.

@Stefan: How do you mean trace? I ran cherokee-worker from a terminal and it
didn't display errors. Do I need to enable something else?

Here's my new launch file if anybody wants it:

#!/bin/sh

BASE=/websites
APP="$BASE/$1"

PIDFILE="$APP/pid"
SOCKET="$APP/sock"


if [ -f $PIDFILE ]; then
kill `cat -- $PIDFILE`
rm -f -- $PIDFILE
fi
if [ -f $SOCKET ]; then
rm -f -- $SOCKET
fi

cd $APP


/usr/bin/python2.6 manage.py runfcgi \
protocol=scgi \
method=threaded \
workdir=$APP \
socket=$SOCKET \
pidfile=$PIDFILE \
maxspare=$2


taher at unixwars

Oct 9, 2009, 2:02 AM

Post #6 of 20 (842 views)
Permalink
Re: One information source not starting up properly [In reply to]

Oli Warner wrote:
> Much nicer and it works for all my other django sites... But not this
> one still! Same gig as before, if I launch it with this new script,
> cherokee finds it. If I let it try to launch itself, it fails all over
> the place.
>
> @Stefan: How do you mean trace? I ran cherokee-worker from a terminal
> and it didn't display errors. Do I need to enable something else?
Hi Oli.
Look for the CHEROKEE_TRACE environment variable [1] and how to use it.

[1] http://www.cherokee-project.com/doc/dev_debug.html

Regards,
Taher

--
taher [at] unixwars
http://unixwars.com/

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


oli at thepcspy

Oct 9, 2009, 2:55 AM

Post #7 of 20 (844 views)
Permalink
Re: One information source not starting up properly [In reply to]

>
> Look for the CHEROKEE_TRACE environment variable [1] and how to use it.
>

uk ~: sudo CHEROKEE_TRACE="all" /usr/sbin/cherokee-worker
[09/09/2009 10:38:45.053] (error) spawner.c:86 - Could initialize SHM
'/cherokee-spawner-13038': No such file or directory
Cherokee Web Server 0.99.24 (Sep 1 2009): Listening on port ALL:80, TLS
disabled, IPv6 disabled, using epoll, 4096 fds system limit, max. 2041
connections, 5 threads, 408 connections per thread, standard scheduling
policy, tracing 'all'

And that's it. No more output. I'm using the Ubuntu PPA . I assume if
tracing wasn't compiled in, it error out.


stefan at konink

Oct 9, 2009, 3:56 AM

Post #8 of 20 (842 views)
Permalink
Re: One information source not starting up properly [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Oli Warner schreef:
> Look for the CHEROKEE_TRACE environment variable [1] and how to use it.
>
>
> uk ~: sudo CHEROKEE_TRACE="all" /usr/sbin/cherokee-worker
> [09/09/2009 10:38:45.053] (error) spawner.c:86 - Could initialize SHM
> '/cherokee-spawner-13038': No such file or directory
> Cherokee Web Server 0.99.24 (Sep 1 2009): Listening on port ALL:80, TLS
> disabled, IPv6 disabled, using epoll, 4096 fds system limit, max. 2041
> connections, 5 threads, 408 connections per thread, standard scheduling
> policy, tracing 'all'
>
> And that's it. No more output. I'm using the Ubuntu PPA . I assume if
> tracing wasn't compiled in, it error out.

Did you actually access anything using that source?


Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkrPFs0ACgkQYH1+F2Rqwn1tOwCfQD4z8C7JWgXuidVff5WchUF6
GD0An2AdnecrxcBi+aVy9HSS3eIj0brs
=lhRM
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aperez at skarcha

Oct 9, 2009, 4:16 AM

Post #9 of 20 (852 views)
Permalink
Re: One information source not starting up properly [In reply to]

Hello,

On Thu, Oct 8, 2009 at 5:33 PM, Oli Warner <oli [at] thepcspy> wrote:

> I've got a django information source that just refuses to load via Cherokee.
> It loads fine if I type the exact command into the terminal (and pages are
> accessible through Cherokee if it's running). It's very odd.
>
> Connection: /websites/mysite-co-uk/sock
> Interpreter: /websites/mysite-co-uk/manage.py runfcgi
> workdir=/websites/mysite-co-uk/ maxspare=3 method=threaded protocol=scgi
> socket=sock pidfile=pid
>
> The server is running as the same user I log in as. I'm using similar
> commands for other django websites (just changing the paths). Any idea's why
> it's not launching?

Mmmmm... Maybe I'm saying something stupid but... are you sure that
"manage.py" has the executable bit set?


--
Saludos:
Antonio Pérez
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


oli at thepcspy

Oct 9, 2009, 4:57 AM

Post #10 of 20 (842 views)
Permalink
Re: One information source not starting up properly [In reply to]

>
> Mmmmm... Maybe I'm saying something stupid but... are you sure that
> "manage.py" has the executable bit set?
>

Not stupid; any suggestions are worth checking!

But yeah, it's executable. It also runs fine if I launch it directly (as the
same user as the cherokee-worker thread is running)


oli at thepcspy

Oct 9, 2009, 5:00 AM

Post #11 of 20 (842 views)
Permalink
Re: One information source not starting up properly [In reply to]

>
> Did you actually access anything using that source?
>

Yeah. I shut down cherokee (stop /etc/init.d/cherokee stop) and then ran
cherokee-worker with tracing.

All my sites were available (well with the exception of this problem one)
but nothing came from the trace. Does it trace to file? I thought it
outputted to terminal?


taher at shihadeh

Oct 9, 2009, 5:12 AM

Post #12 of 20 (843 views)
Permalink
Re: One information source not starting up properly [In reply to]

I don't think that's stupid. Some of our wizards prepende 'python' to
the interpreter line, just for safety.
I've also seen a lot of Python scripts not beginning with the usual
'#!/usr/bin/env python' (instead they call a python binary on a
not_so_portable path). If Oli is using different platforms maybe this
could be the issue.

Antonio Pérez wrote:
> Hello,
>
> On Thu, Oct 8, 2009 at 5:33 PM, Oli Warner <oli [at] thepcspy> wrote:
>
>
>> I've got a django information source that just refuses to load via Cherokee.
>> It loads fine if I type the exact command into the terminal (and pages are
>> accessible through Cherokee if it's running). It's very odd.
>>
>> Connection: /websites/mysite-co-uk/sock
>> Interpreter: /websites/mysite-co-uk/manage.py runfcgi
>> workdir=/websites/mysite-co-uk/ maxspare=3 method=threaded protocol=scgi
>> socket=sock pidfile=pid
>>
>> The server is running as the same user I log in as. I'm using similar
>> commands for other django websites (just changing the paths). Any idea's why
>> it's not launching?
>>
>
> Mmmmm... Maybe I'm saying something stupid but... are you sure that
> "manage.py" has the executable bit set?
>
--
taher [at] shihadeh
http://unixwars.com/

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


stefan at konink

Oct 9, 2009, 5:16 AM

Post #13 of 20 (841 views)
Permalink
Re: One information source not starting up properly [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Oli Warner schreef:
> Did you actually access anything using that source?
>
>
> Yeah. I shut down cherokee (stop /etc/init.d/cherokee stop) and then ran
> cherokee-worker with tracing.

An then you went to the website?

> All my sites were available (well with the exception of this problem
> one) but nothing came from the trace. Does it trace to file? I thought
> it outputted to terminal?

The trace is to the terminal (if compiled with tracing).


Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkrPKboACgkQYH1+F2Rqwn0O7QCeM7WyYe2QdKNFr6+H67puJP4N
fD8AoI45+KRB51KinBgpcXxNJf49zrs0
=+/JP
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aperez at skarcha

Oct 9, 2009, 5:34 AM

Post #14 of 20 (841 views)
Permalink
Re: One information source not starting up properly [In reply to]

Hello,

2009/10/9 Taher Shihadeh <taher [at] shihadeh>:

> I don't think that's stupid. Some of our wizards prepende 'python' to the
> interpreter line, just for safety.
> I've also seen a lot of Python scripts not beginning with the usual
> '#!/usr/bin/env python' (instead they call a python binary on a
> not_so_portable path). If Oli is using different platforms maybe this could
> be the issue.

Yes, my bet was the executable bit unset or the missing of
"#!/usr/bin/env python" line, because it doesn't make sense that other
scripts work only changing the paths... "manage.py" in the problematic
path should be different to the others.

DISCLAIMER: I don't know nothing about Django... O:)


--
Saludos:
Antonio Pérez
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


oli at thepcspy

Oct 9, 2009, 5:36 AM

Post #15 of 20 (841 views)
Permalink
Re: One information source not starting up properly [In reply to]

Django creates the manage.py file when you create the project. The content
is the same across all my projects (inc working ones).


oli at thepcspy

Oct 9, 2009, 5:38 AM

Post #16 of 20 (842 views)
Permalink
Re: One information source not starting up properly [In reply to]

>
> An then you went to the website?
>

Yeah. I tried other working django sites. This broken site while broken and
this site when I ran the fcgi manually. All were as expected
(working-broken-working) but nothing was outputted as trace.


> The trace is to the terminal (if compiled with tracing).
>

Indeed.

I didn't compile this so I don't know if tracing is enabled. If it's not,
perhaps cherokee aught to explode if you try and trace (instead of saying
it's tracing when it's not).


taher at unixwars

Oct 9, 2009, 6:02 AM

Post #17 of 20 (846 views)
Permalink
Re: One information source not starting up properly [In reply to]

Hi Oli

Oli Warner wrote:
>
> The trace is to the terminal (if compiled with tracing).
>
>
> Indeed.
>
> I didn't compile this so I don't know if tracing is enabled. If it's
> not, perhaps cherokee aught to explode if you try and trace (instead
> of saying it's tracing when it's not).

I disagree with the exploding parte ;)

You can check if it was compiled with tracing with the '-i' parameter.

# cherokee -i
Compilation
Version: 0.99.25b3685
Compiled on: Oct 7 2009 20:45:46
Arguments to configure: '--prefix=/usr' '--sysconfdir=/etc'
'--localstatedir=/var' '--enable-beta' '--enable-trace'
'--enable-static-module=all'


Cheers

--
taher [at] unixwars
http://unixwars.com/

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


oli at thepcspy

Oct 9, 2009, 6:33 AM

Post #18 of 20 (841 views)
Permalink
Re: One information source not starting up properly [In reply to]

Thanks Taher. It doesn't look like mine has tracing.

uk /websites: cherokee -i
Compilation
Version: 0.99.24
Compiled on: Sep 1 2009 11:44:13
Arguments to configure: '--host=x86_64-linux-gnu'
'--build=x86_64-linux-gnu' '--enable-os-string=Ubuntu' '--enable-pthreads'
'--prefix=/usr' '--localstatedir=/var' '--mandir=${prefix}/share/man'
'--infodir=${prefix}/share/info' '--sysconfdir=/etc'
'--docdir=/usr/share/doc/cherokee-doc' '--with-wwwroot=/var/www'
'--with-included-gettext' 'build_alias=x86_64-linux-gnu'
'host_alias=x86_64-linux-gnu' 'CFLAGS=-Wall -g -O2'
'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='

Installation
Deps dir: /usr/share/cherokee/deps
Data dir: /usr/share/cherokee
Icons dir: /usr/share/cherokee/icons
Themes dir: /usr/share/cherokee/themes
Plug-in dir: /usr/lib/cherokee

Plug-ins
Built-in:

Support
IPv6: yes
Pthreads: yes
Tracing: no
sendfile(): yes
syslog(): yes
Polling methods: select poll epoll

But no, perhaps exploding would be a little dramatic but it should let you
know if it can't trace rather than saying it's tracing.


oli at thepcspy

Oct 9, 2009, 7:54 AM

Post #19 of 20 (841 views)
Permalink
Re: One information source not starting up properly [In reply to]

Well I thought I had tested, but:

My site, as broken, lives in a directory like this:
/websites/mydomain-co-uk

I just copied it to:
/websites/mydomaincouk

And fixed up the cherokee settings to match and it WORKS! Woo!

So there's a bug in cherokee's mapping. I suspect it's misinterpreting the
socket location (which also had the dashes in).


taher at unixwars

Oct 9, 2009, 8:13 AM

Post #20 of 20 (842 views)
Permalink
Re: One information source not starting up properly [In reply to]

Great to know it is solved.
Could you log a bug for this so we don't forget to check it out?

Thanks ;)

Oli Warner wrote:
> Well I thought I had tested, but:
>
> My site, as broken, lives in a directory like this:
> /websites/mydomain-co-uk
>
> I just copied it to:
> /websites/mydomaincouk
>
> And fixed up the cherokee settings to match and it WORKS! Woo!
>
> So there's a bug in cherokee's mapping. I suspect it's misinterpreting
> the socket location (which also had the dashes in).

--
taher [at] unixwars
http://unixwars.com/

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.