[ome-users] Accessing web interfaces from other computers

josh.moore at gmx.de josh.moore at gmx.de
Thu Apr 23 07:33:09 BST 2009


Steve Guerrero writes:
 > Thanks for the pointers.

Sure, no problem, even if they were to no avail. :) There are at least
two issues with what I said. One of which is blocking you, one of
which may.

The first is that WebTemplate -- as with all the templates for Windows
-- is setup to use absolute paths. You'll need to add
":yourinstallation/lib/python" to the end of the PYTHONPATH
string. This was unfortunately set for me locally so I didn't
notice. Sorry about that.

The second is that you will still need to use syncdb as per the
instructions on 

https://www.openmicroscopy.org/site/documents/data-management/omero4/server/install-windows

In fact, if you are just demo'ing, the simplest option may be to just
use the directions under install-windows for manually starting:

  ...
  python manage.py syncdb
  python manage.py runserver

since icegridnode's purpose really is to keep processes up and running.

 > So just to be absolutely clear, if I want the built in django webserver 
 > to listen on the public network interface (nevermind security, I'm just 
 > demo'ing the software), I should do the following exactly:
 > 
 > 1) In the file etc/grid/templates.xml, add the following line, verbatim, 
 > to the "WebTemplate" section :
 > 
 >   <server-template id="WebTemplate">
 >        <parameter name="act" default="on-demand"/>
 >        <server id="Web" exe="python" activation="${act}" 
 > pwd="${OMEROPY_HOME}omeroweb">
 >          <option>manage.py</option>
 >          <option>runserver</option>
 >          <option>0.0.0.0:8000</option>   <--- ADD THIS LINE
 > 
 > 2) In the file etc/grid/default.xml I should replace this line:
 > 
 > <server-instance template="ShellTemplate" id="Web" act="on-demand"/>
 > 
 > with this line:
 > <server-instance template="WebTemplate"/>
 > 
 > 
 > Is that correct?  I tried this and it does not seem to work for me.  I 
 > get the error message below:
 > 
 > 
 > bin/omero admin ice
 > Ice 3.3.0  Copyright 2003-2008 ZeroC, Inc.
 >  >>> server enable Web
 >  >>> server start Web
 > error: the server didn't start successfully:
 > The server terminated unexpectedly with exit code 1.
 > 
 > 
 > josh.moore at gmx.de wrote:
 > > Mario Valle writes:
 > >  > Confirm that the problem is still in 4.0.1
 > > 
 > > Right. I was wrong with the addition of the option, so it will
 > > continue to be a problem. :) The proper way to get OMERO.web onto the
 > > public network interface is to follow the production instructions
 > > under:
 > > 
 > > https://www.openmicroscopy.org/site/documents/data-management/omero4/server/install-web
 > > 
 > > However, since I like you all so much, here's how you can go about
 > > doing this, but as I told Jerome: development only!
 > > 
 > > Feel free to stop reading here. For anyone wanting to get their hands
 > > dirtier with OMERO, please join the ome-devel mailing list:
 > > 
 > > http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel/
 > > 
 > > The etc/grid/(win)default.xml and etc/grid/templates.xml files are
 > > highly customizable, and are intended to let system administrators
 > > configure exactly what processes are started where on their resources.
 > > 
 > > The ShellTemplate which is used to start OMERO.web on *nix machines,
 > > simply calls: bin/omero server Web, which is why the change that Mark
 > > suggested works.
 > > 
 > > The extra bit of work which "bin/omero server Web" does is to create
 > > the initial django database. If you are willing to do this from the
 > > commandline as outlined on install-web, then there's no reason to not
 > > use the WebTemplate (which is used under Windows for various reasons).
 > > 
 > > SO...if you would like to add the <option>0.0.0.0:8000</option> entry
 > > in default.xml, do so to WebTemplate and then change the line
 > > 
 > >   <server-instance template="ShellTemplate" id="Web" act="on-demand"/>
 > > 
 > > in etc/grid/default.xml to
 > > 
 > >   <server-instance template="WebTemplate"/>
 > > 
 > > And then let me know if you have any further questions. :)
 > > 
 > > Best wishes,
 > > ~Josh.
 > > 
 > > 
 > >  > Ciao!
 > >  > 	mario
 > >  > 
 > >  > Mark Woodbridge wrote:
 > >  > > I had the same problem as Paulo. Adding:
 > >  > > 
 > >  > > <option>0.0.0.0:8000</option>
 > >  > > 
 > >  > > to etc/grid/templates.xml didn't work. But changing 
 > >  > > lib/python/omero/plugins/server.py to include:
 > >  > > 
 > >  > > django = 
 > >  > > ["python","manage.py","runserver","0.0.0.0:8000","--noreload"]+list(args)
 > >  > > 
 > >  > > did work. I also needed to install python-imaging and python-sqlite2 on 
 > >  > > RHEL to get webadmin/webclient to work, in case anyone else is having 
 > >  > > problems.
 > >  > > 
 > >  > > My ICE java/RPM problems were sorted after using DEBUG=1 (thanks Josh!).
 > >  > > 
 > >  > > Mark.
 > >  > > 
 > >  > > josh.moore at gmx.de wrote:
 > >  > >> Ola Paulo,
 > >  > >>
 > >  > >> Paulo Almeida writes:
 > >  > >>  > I can access the webadmin and webclient interfaces from the server,
 > >  > >>  > but not from other machines.
 > >  > >>  > 
 > >  > >>  > nmap says port 8000 is closed, and the output of: 
 > >  > >>  > 
 > >  > >>  > netstat -an |grep 8000
 > >  > >>  > 
 > >  > >>  > is:
 > >  > >>  > 
 > >  > >>  > tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN
 > >  > >>  > 
 > >  > >>  > I think that means it is only listening on 127.0.0.1? 
 > >  > >>
 > >  > >> Exactly. The webclient doesn't come with HTTPS out-of-the-box. In
 > >  > >> order to protect your installation, we start it only on 127.0.0.1. To
 > >  > >> make it listen elsewhere, you'll need to modify etc/grid/templates.xml
 > >  > >>
 > >  > >>     <server-template id="ShellTemplate">
 > >  > >>       <parameter name="id"/>
 > >  > >>       <parameter name="exe" default="python"/>
 > >  > >>       <parameter name="act" default="always"/>
 > >  > >>       <server id="${id}" exe="${exe}" activation="${act}">
 > >  > >>         <option>lib/python/shellserver.py</option>
 > >  > >>         <option>${id}</option>
 > >  > >>         <!-- ADD THE NEXT LINE -->
 > >  > >>         <option>http://your.address.com</option>
 > >  > >>         <adapter name="${id}Adapter" register-process="true" endpoints="tcp"/>
 > >  > >>       </server>
 > >  > >>     </server-template>
 > >  > >>
 > >  > >> where the value you add is passed to `python manage.py runserver`
 > >  > >> who's command-line option is of the form: ipaddr:port
 > >  > >>
 > >  > >> This installation is meant to get you started with the server, but you
 > >  > >> may want to look at the OMERO.web instructions directly. See:
 > >  > >> https://trac.openmicroscopy.org.uk/omero/wiki/OmeroWeb
 > >  > >>
 > >  > >>  > If so, how do I make omero listen to computers other than
 > >  > >>  > localhost? I tried 'bin/omero config simple' (and advanced) but
 > >  > >>  > that returned:
 > >  > >>
 > >  > >>   bin/omero config simple?
 > >  > >>
 > >  > >> Where did you see these commands? I'm not quite sure where it could
 > >  > >> have come from. See:
 > >  > >>
 > >  > >>   bin/omero config
 > >  > >>
 > >  > >> for instructions on using config, but unfortunately there is no
 > >  > >> configuration parameter for setting the interface used by OMERO.web.
 > >  > >>
 > >  > >>  > unhashable type
 > >  > >>
 > >  > >>
 > >  > >> This is actually *really* odd, maybe you could help us track it
 > >  > >> down. What python version are you using? What java version?server start Web
 > 
 > >  > >>
 > >  > >>   python --version
 > >  > >>   java -version
 > >  > >>
 > >  > >>
 > >  > >>  > I also looked around on the etc directory, especially
 > >  > >>  > omero.properties, but I couldn't figure it out.
 > >  > >>
 > >  > >>  > Thanks,
 > >  > >>  > Paulo
 > >  > >>
 > >  > >> Hope we can figure that out.
 > >  > >> Cheers,
 > >  > >> ~Josh
 > > _______________________________________________
 > > ome-users mailing list
 > > ome-users at lists.openmicroscopy.org.uk
 > > http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
 > > 



More information about the ome-users mailing list