Unable to restart Web2py on Mac

359 views
Skip to first unread message

pbreit

unread,
Feb 17, 2011, 4:10:21 PM2/17/11
to web...@googlegroups.com
Did anyone figure out how to stop and start Web2py from the console on a Mac? When I do it, it doesn't work when it starts back up. It stalls when it opens up the browser window and tries to go to my home page. I remember some discussion about processes not shutting down quickly or at all. Is there any solution?

I end up having to quit and restart web2py.app every time.

Jonathan Lundell

unread,
Feb 17, 2011, 4:16:44 PM2/17/11
to web...@googlegroups.com
How are you starting it?

pbreit

unread,
Feb 17, 2011, 5:21:49 PM2/17/11
to web...@googlegroups.com
The "stop server" and "start server" buttons on the Tcl console app.

Jonathan Lundell

unread,
Feb 17, 2011, 5:30:15 PM2/17/11
to web...@googlegroups.com
On Feb 17, 2011, at 2:21 PM, pbreit wrote:
> The "stop server" and "start server" buttons on the Tcl console app.

FWIW, I've been running web2py from a Terminal shell prompt quite a bit, and starting/stopping works fine (with the source release, or a trunk clone).

You might try comparing the output of ps before and after stopping the server (or use Activity Monitor).

Marin Pranjic

unread,
Feb 17, 2011, 7:30:29 PM2/17/11
to web...@googlegroups.com
Restarting web server does not restart web2py, i think.
Not sure if it should restart it or not, but... same here

pbreit

unread,
Feb 17, 2011, 7:38:16 PM2/17/11
to web...@googlegroups.com
Oh, I see. So there's not much of a reason to use the "stop/start server" buttons? Maybe a "restart web2py" button on the console would be nice.

Jonathan Lundell

unread,
Feb 17, 2011, 7:40:15 PM2/17/11
to web...@googlegroups.com
On Feb 17, 2011, at 1:10 PM, pbreit wrote:
> Did anyone figure out how to stop and start Web2py from the console on a Mac? When I do it, it doesn't work when it starts back up. It stalls when it opens up the browser window and tries to go to my home page. I remember some discussion about processes not shutting down quickly or at all. Is there any solution?
>
> I end up having to quit and restart web2py.app every time.

I looked at this very briefly (1.92.1).

The first server-start via the Tcl interface works normally.

A stop and then another start yields this cli message:

ERROR:Rocket.Errors.Port8000:Socket 127.0.0.1:8000 in use by other process and it won't share.
please visit:
http://127.0.0.1:8000
starting browser...
WARNING:Rocket.Errors.Port8000:Listener started when not ready.


Another stop and start works OK.

So the stop call isn't really stopping everything. No idea why.

Jonathan Lundell

unread,
Feb 17, 2011, 7:42:07 PM2/17/11
to web...@googlegroups.com
On Feb 17, 2011, at 4:30 PM, Marin Pranjic wrote:
Restarting web server does not restart web2py, i think.
Not sure if it should restart it or not, but... same here

You're right, it doesn't. And it doesn't even properly stop the web server, it appears.

My advice: start & stop web2py from the cli, and don't bother with Tcl.

Massimo Di Pierro

unread,
Feb 17, 2011, 11:35:40 PM2/17/11
to web2py-users
this used to work. One of the rocket updates must broken it.

mart

unread,
Feb 18, 2011, 2:02:46 AM2/18/11
to web2py-users
May or may not be related, but I don't see any difference with before
in that I get that problem all the time. I found that it is related to
another application that won't play nice and share (like the exception
message says).

In my case, if I happen to have Aptana running before I launch web2py,
then i will not be able to run web2py (this happens all the time). If
I launch web2py while Aptana is shutdown, then there are no problems,
ever it seems. I only have that problem with Aptana and nothing else.

Anyways, have you tried shutting down every other application (and
check 'force quit' too and shutdown any non-macos applications)? And
if you find that the problem goes away, then it becomes easy to fix.

Thanks,
Mat :)

On Feb 17, 11:35 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:

Massimo Di Pierro

unread,
Feb 18, 2011, 9:49:51 AM2/18/11
to web2py-users
Do we know this works on windows? I do not have windows to try it.

Jonathan Lundell

unread,
Feb 18, 2011, 10:23:16 AM2/18/11
to web...@googlegroups.com
On Feb 18, 2011, at 6:49 AM, Massimo Di Pierro wrote:
>
> Do we know this works on windows? I do not have windows to try it.

I do not.

My guess is that it's related to the Rocket stop method. The first stop isn't effective, and something about the second start, or its associated stop, or its page load, fixes the problem, so that the second stop and third start work OK.

The message sequence is a little strange:

ERROR:Rocket.Errors.Port8000:Socket 127.0.0.1:8000 in use by other process and it won't share.
please visit:
http://127.0.0.1:8000
starting browser...
WARNING:Rocket.Errors.Port8000:Listener started when not ready.

The WARNING is a consequence of the ERROR, I think. But why isn't .stop killing the listener?

Martin raises an interesting question, though: what's the reason for bothering to stop and start Rocket from the Tcl interface? It's sometimes useful to restart web2py, but that's not what happens here. Sure, it'd be nice if the stop function worked, but even if it did, it's probably not doing what the user expects.

Brian Meents

unread,
Feb 18, 2011, 10:37:37 AM2/18/11
to web...@googlegroups.com
I ran a test on my system (unfortunately I'm in a Windows world...) and it seems to be doing something similar, albeit without any error messages.  When I start web2py, then start the web server, all is fine.  Stopping the web serverfrom Tcl doesn't result in any error (or any message for that matter.)  When I try to access the website in this state, the browser will just sit there with a "waiting for response..."  I can restart from Tcl and it will start just fine upon browser refresh.  The "waiting for response..." doesn't turn into an error message (using Chrome) until I shut down the whole thing.

Yarin

unread,
May 6, 2012, 10:28:30 AM5/6/12
to web...@googlegroups.com
This is still broken:

I'm running web2py with the built-in Rocket server locally on my Mac. When I click the "stop server" button on the server window, and then click "start server" to restart, I get the following:

ERROR:Rocket.Errors.Port8000:Socket 127.0.0.1:8000 in use by other process and it won't share.
please visit:
starting browser...
WARNING:Rocket.Errors.Port8000:Listener started when not ready.

The only way I can get past that is to quit Python.

Is there a way to restart web2py from the command line without having to quit python each time?

howesc

unread,
May 6, 2012, 7:17:53 PM5/6/12
to web...@googlegroups.com
you may dislike my answer....but i have a shell script that passes the parms to web2py that i want.  i launch it via terminal, and i ctrl-c to kill and then restart.  i find that much faster than waiting for the tcl window to load (and i can share the script with my coding team and we don't have to ask what our settings are when debugging things).

so i have no real answer about the tcl interface.  sorry about that.

cfh

Annet

unread,
May 7, 2012, 1:03:20 AM5/7/12
to web...@googlegroups.com
I had the same problem in October 2010:

https://groups.google.com/forum/?fromgroups#!searchin/web2py/annet$20other$20process/web2py/Zc53Lx85g50/P1CJjLFJuUcJ

Back then it was qualified as an OS X weirdness ;-)


Regards,

Annet

Yarin

unread,
May 8, 2012, 8:19:18 AM5/8/12
to web...@googlegroups.com
Thanks Annet- Looks like this is what we're dealing with

Massimo Di Pierro

unread,
May 9, 2012, 12:57:23 AM5/9/12
to web...@googlegroups.com
can you please open a googlecode issue?

Annet

unread,
May 9, 2012, 1:07:53 AM5/9/12
to web...@googlegroups.com

Jonathan Lundell

unread,
Mar 6, 2013, 9:22:06 PM3/6/13
to web...@googlegroups.com
On 6 Mar 2013, at 4:44 PM, theoffi...@gmail.com wrote:
my web2py died in my raspberry pi yesterday when i was following through the "killer web development" tutorial... somewhere regarding the selenium. the server webpage did not show anything. i panicked and removed the whole web2py folder. 
then i downloaded the source code and run python 2.6 web2py.py
now i can't use my public IP to start server. same rocket.errors.port8000:socket 10.0.0.189:8000 in use by other process and it wont share. but the local IP works fine. However i cant access the server from another computer. 
so how should i solve the problem?? there isn't any solutions in this discussion?
please help. thank you.



Have you rebooted?

The Organisation of Secret Shoppers

unread,
Mar 7, 2013, 4:07:01 AM3/7/13
to web...@googlegroups.com
Hello, thanks for the reply. i've changed the IP to static and reinstall web2py, without reboot. Now it seems to work. :)
however i still cannot get selenium to work :( any clues?


--
 
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages