Nagare IDE - cannot run. new developments?

35 views
Skip to first unread message

Terrence Brannon

unread,
Nov 27, 2012, 2:27:45 PM11/27/12
to nagare...@googlegroups.com
# Cannot Run

After typing `pip install nagare.ide`, the IDE is successfully installed.

However, typing `nagare-admin serve -reload ide` I get this error

Traceback (most recent call last):
File "/home/schemelab/prg/nagare/home/bin/nagare-admin", line 8, in <module>
load_entry_point('nagare==0.4.1', 'console_scripts', 'nagare-admin')()
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/admin/main.py", line 73, in main
command.run(parser, options, args) # Run the command
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/admin/serve.py", line 218, in run
(cfgfile, app, dist, aconf) = util.read_application(cfgfile, parser.error)
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/admin/util.py", line 254, in read_application
(app, dist) = load_object(aconf['application']['path'])
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/admin/util.py", line 150, in load_object
return loaders[scheme](path, o)
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/admin/util.py", line 61, in load_app
return load_entry_point(app, 'nagare.applications')
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/admin/util.py", line 48, in load_entry_point
return (entry_point.load(), entry_point.dist)
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1954, in load
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/ide/app.py", line 18, in <module>
from nagare.ide import CHANNEL_ID, workspace
File "/home/schemelab/prg/nagare/home/lib/python2.7/site-
packages/nagare/ide/workspace.py", line 24, in <module>
from nagare.ide import YUI_PREFIX, CHANNEL_ID
ImportError: cannot import name YUI_PREFIX

# New Developments

The Nagare IDE [speaks of the BeSpin editor]
(http://www.nagare.org/trac/wiki/NagareIde) but that has morphed into two new
projects:

* [The ACE Editor](http://ace.ajax.org/)
* [Cloud 9](https://c9.io/)

Are there new plans for the Nagare IDE?


apoirier

unread,
Nov 27, 2012, 5:16:50 PM11/27/12
to Nagare users
On Nov 27, 8:28 pm, Terrence Brannon <scheme...@gmail.com> wrote:
> # Cannot Run
>
> After typing `pip install nagare.ide`, the IDE is successfully installed.

Don't use pip to install Nagare.ide, use setuptools or distribute. Pip
is not 100% compatible with them.
Well, the good old Bespin editor is currently running fine, so no plan
to change it for the moment.

Terrence Brannon

unread,
Nov 28, 2012, 9:56:13 AM11/28/12
to nagare...@googlegroups.com
apoirier <alain.poirier1@...> writes:

>
> On Nov 27, 8:28 pm, Terrence Brannon <scheme...@...> wrote:
> > # Cannot Run
> >
> > After typing `pip install nagare.ide`, the IDE is successfully installed.
>
> Don't use pip to install Nagare.ide, use setuptools or distribute. Pip
> is not 100% compatible with them.

ok easy_install nagare.ide seems to work... however:

typing `nagare-admin serve --host 0.0.0.0 --port 9000 --reload ide`
serves it but I am getting a "403 Forbidden" error when I attempt to visit
the ide remotely.

I dont know how to get my IP address, so I edited the ide.cfg file like so:

[security]
allow_hosts = 127.0.0.1, 0.0.0.0

But it still says "403 Forbidden"


Terrence Brannon

unread,
Nov 28, 2012, 2:52:43 PM11/28/12
to nagare...@googlegroups.com
Terrence Brannon <schemelab@...> writes:

> >
> I dont know how to get my IP address, so I edited the ide.cfg file like so:
>
> [security]
> allow_hosts = 127.0.0.1, 0.0.0.0
>
> But it still says "403 Forbidden"
>


A few comments:

A comma is required after the last IP address on the allow_hosts line... but
no docs say this.

Also http://www.nagare.org/trac/wiki/NagareIde states the default value is []
but I dont think you are supposed to supply [] or the list of allowed hosts
using Python array syntax. And I dont think the IP address needs to be in
quotes even though the docs imply this.

Finally, I figured out my IP address, but using this config

[security]
allow_hosts = 127.0.0.1, 172.3.2.33

I still get forbidden when I attempt to visit the ide from remote after
invoking the server via:

nagare-admin serve --host 0.0.0.0 --port 8000 --reload ide --debug


apoirier

unread,
Nov 29, 2012, 9:22:43 AM11/29/12
to Nagare users
On Nov 28, 8:52 pm, Terrence Brannon <scheme...@gmail.com> wrote:
> Terrence Brannon <schemelab@...> writes:
>
> > I dont know how to get my IP address, so I edited the ide.cfg file like so:
>
> > [security]
> > allow_hosts = 127.0.0.1, 0.0.0.0
>
> > But it still says "403 Forbidden"
>
> A few comments:
>
> A comma is required after the last IP address on the allow_hosts line... but
> no docs say this.

Right, but only if one single IP is given.

> Also http://www.nagare.org/trac/wiki/NagareIde states the default value is []
> but I dont think you are supposed to supply [] or the list of allowed hosts
> using Python array syntax. And I dont think the IP address needs to be in
> quotes even though the docs imply this.

Yes, the default `ide.cfg` file contains (with an ending ',' as only
one value is given):

[security]
allow_hosts = 127.0.0.1,

so the list of allowed remote hosts initially is ['127.0.0.1'].

> Finally, I figured out my IP address, but using this config
>
> [security]
> allow_hosts = 127.0.0.1, 172.3.2.33
>
> I still get forbidden when I attempt to visit the ide from remote after
> invoking the server via:
>
> nagare-admin serve --host 0.0.0.0 --port 8000 --reload ide --debug

All seems correct. The IDE is launch with '--host 0.0.0.0' to listen
on all the IP interfaces, not only the localhost. And the 'ide.cfg'
contains the IP address of the client wanted to access the IDE. I just
tested it again such a config and I can access the IDE from a remote
client without any problem.

I don't see what's wrong in your context. Are you sure '172.3.2.33' is
the IP address of the client, not the IP of the server?

Terrence Brannon

unread,
Nov 29, 2012, 9:38:30 AM11/29/12
to nagare...@googlegroups.com
apoirier <alain.poirier1@...> writes:
I am sure it is, because we have a "myInfo" program on our Windows machine
which shows our IP address. And often, tech support will remote into our
machines using that IP address.

It would be nice if some feedback via log file or STDERR reported each request
to the server. Then I could see which IP address was rejected and add it.

Is there some way to see what IP addresses requests are coming in from?


Terrence Brannon

unread,
Nov 29, 2012, 10:18:04 AM11/29/12
to nagare...@googlegroups.com
Terrence Brannon <schemelab@...> writes:

>
> apoirier <alain.poirier1@...> writes:
> > I don't see what's wrong in your context. Are you sure '172.3.2.33' is
> > the IP address of the client, not the IP of the server?
> >

I'm connecting through a web proxy, so maybe they are hiding my real IP
address when I make connections outside of the proxy?

At any rate, a log file of all requests or STDERR output would tell me exactly
what IP address is being rejected.

Terrence Brannon

unread,
Nov 29, 2012, 10:41:16 AM11/29/12
to nagare...@googlegroups.com
Terrence Brannon <schemelab@...> writes:

>
> Terrence Brannon <schemelab@...> writes:
>
> I'm connecting through a web proxy, so maybe they are hiding my real IP
> address when I make connections outside of the proxy?

That's what it was. I found out the outward-facing IP address and added that
and now it works... well, works as well as one can expect when one only has
Internet Explorer 6 available :)


apoirier

unread,
Nov 29, 2012, 11:06:44 AM11/29/12
to Nagare users
On Nov 29, 4:18 pm, Terrence Brannon <scheme...@gmail.com> wrote:
> Terrence Brannon <schemelab@...> writes:
>
> > apoirier <alain.poirier1@...> writes:
> > > I don't see what's wrong in your context. Are you sure '172.3.2.33' is
> > > the IP address of the client, not the IP of the server?
>
> I'm connecting through a web proxy, so maybe they are hiding my real IP
> address when I make connections outside of the proxy?

Yes, this is the problem. With a web proxy, the Nagare IDE doesn't
receive your IP address but the address of the proxy.

> At any rate, a log file of all requests or STDERR output would tell me exactly
> what IP address is being rejected.

Being a WSGI application, Nagare doesn't trace the requests received
by itself, because you can add a WSGI Middleware to do the job. For
example the already installed `paste` package comes with a
`TransLogger` middleware (http://pythonpaste.org/modules/
translogger.html).

To create the WSGI pipe:

1. Define somewhere (here, in `app.py`) a function to create the WSGI
pipe:

from paste.translogger import TransLogger

# Wrap the Nagare application in a TransLogger middleware
def create_wsgi_pipe(app, options, config_filenamen, config, error):
return TransLogger(app)

2. In the configuration file of your <my_app> application, put a
reference to this function:

[application]

wsgi_pipe = <my_app>.app:create_wsgi_pipe


That's enough to have all the requests displayed on the console, in
Apache format where the first field is the IP address of the client.

Terrence Brannon

unread,
Dec 17, 2012, 11:46:55 AM12/17/12
to nagare...@googlegroups.com
OK, I figured out my outward facing IP address. And I got a new modern web
browser installed (SlimBrowser 6.01). But the various icons (i.e. cut paste
save, etc) that you see here - http://www.nagare.org/trac/wiki/NagareIde
do not exist in my version of the IDE as you can see from this screenshot:
http://www.livingcosmos.org/wp-content/uploads/2012/12/nagare-ide2.png

Also, I cannot edit the text, I can move around in the file, but not edit the
text.

I invoked the IDE with this command:
nagare-admin serve --host 0.0.0.0 --port 8000 --reload ide
demo

And I notice a few errors on STDERR:
TCP: TCP: Possible SYN flooding on port 8000. Sending cookies. Check SNMP
counters

-- Terrence

Terrence Brannon

unread,
Dec 17, 2012, 1:32:51 PM12/17/12
to nagare...@googlegroups.com
Terrence Brannon <schemelab@...> writes:

> Also, I cannot edit the text, I can move around in the file, but not edit
the
> text.

I think I just found another issue. When I hit "reload" I am told 'XHR error'


apoirier

unread,
Dec 18, 2012, 10:35:11 AM12/18/12
to Nagare users
On Dec 17, 7:32 pm, Terrence Brannon <scheme...@gmail.com> wrote:
> Terrence Brannon <schemelab@...> writes:
> > Also, I cannot edit the text, I can move around in the file, but not edit
> the
> > text.

The message you see: "TCP: TCP: Possible SYN flooding on port 8000.
Sending cookies. Check SNMP counters" doesn't come from Nagare nor
the HTTP server. To me it comes from a security layer activated on the
server.

> I think I just found another issue. When I hit "reload" I am told 'XHR error'

I can only make a guest by it looks like the long polling XHR request
set by the Nagare IDE are viewed by a security layer as a SYN flood
attack and so are dropped.
Reply all
Reply to author
Forward
0 new messages