running 2 concurrant instances of exist

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

running 2 concurrant instances of exist

Scott Gillespie
Greetings,

I've been looking for answers to this and can't seem to find it.

I have eXist1.0b1 running on my server. I've installed the latest
snapshot 20050805 and would like to have it running concurrently on a
different port, but I can't get it to work. I've changed the port
number. Either one works if the other is not running. If I do a netstat
after starting both, both ports are listening, but I can't connect to
the second one started.

Any thoughts?

Thanks,
Scott

--
...................................
Scott Gillespie
Project Manager
Virginia Center for Digital History
434.924.4777 (phone)
434.243.5566 (fax)


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: running 2 concurrant instances of exist

Michael Beddow-2
Scott Gillespie wrote:

> I have eXist1.0b1 running on my server. I've installed the latest
> snapshot 20050805 and would like to have it running concurrently on a
> different port, but I can't get it to work. I've changed the port
> number. Either one works if the other is not running.


This rather depends on what you meant by "it" (i.e. how exactly are you
running eXist) and what you mean by "instances" (do you mean two completely
independent installations, each with its own database, or do you mean two
instances of eXist server+client modules both accessing the same database --
not that this would ever be feasible using a combination of 1.0b and
20050805 anyway, because the data formats are too different and the locking
rules and principles have radically changed)?

Let's assume you mean you want to run two completely independent
installations in "standalone" mode (life, or at least the amount of *my*
life that's likely to be left, is too short to embark on attempts to explore
how to run two full-house installations with Cocoon etc in parallel) and
access them via the Java client or REST.


Alas, you may have a problem even on the theoretically simple "standalone"
scenario, because both the implementation and the configuration methods of
the "standalone" server have changed vastly between the two builds you're
trying to run in parallel. 1.01b really does have a  "standalone" server
native to eXist, whereas 20050805 provides equivalent functionality via
Jetty. But the default ports used and service addressing particulars have
changed. I have completely forgotten how to configure 1.01b, and I fear it
may involve messing with the source. With more recent builds, you just pass
the -p parameter to server.sh/bat and all the listeners configured in
server.properties will start up on the port you specify after the -p
switch. Maybe that works for 1.01b as well: I wouldn't know because I
banished it from my machines months ago. (I'm also not sure how things work
with the current cvs, which now specifies ports as well as services in the
new server.xml file that has replaced server.properties: specifically I
don't know whether the -p parameter can be used at startup to override the
ports specification in server.xml).

But anyway, I've just verified that I can start two arbitrary (but
relatively recent) builds of "standalone" eXist server, each with its own
database, on different ports, and address either of them at will via either
the java client over xmlrpc or a webbrowser via REST. In other words, with
the builds at my disposal, I can't reproduce what I take to be your problem,
but maybe what you are trying to do has to be done differently for 1.01b

You say both servers are listening when you look via netstat or lsof, so can
you get an elementary http response from both of them via telnet? Telnet to
each port in turn and fake an http 0.9 (!) query by typing in GET / and
pressing return twice. You should get back a result listing the collections
and their permissions (from a very recent CVS build you will instead get
back an http 404 error complaining that  Document /dfb/dfb.xq was not found,
a promising, but as yet undocumented new behaviour). That shows the servers
are responding to http, and so they ought to be responding to xmlrpc from
the java client also. Check out client properties carefully to make sure the
server addressing there is what you want (and make sure your java client is
reading the correct client.properties for the server you are trying to
address)

Michael Beddow




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: running 2 concurrant instances of exist

Scott Gillespie
Michael,

Thank you for the response. I'm trying to run two servers in embedded
mode with jetty (using the startup.sh script supplied with the
distribution). I'm unable to telnet into the port due to restrictions on
the server so I'm not sure what kind of response I would get.

After banging my head against this for a number of days with no solution
in site, I've decided to just update to running the 20050805 snapshot
and re-importing and configuring all the applications to work as they
did under 1.0b1. It's just a headache because there are live sites
running off the current install that will have to go down for a while.

Thanks again for your prompt response.
Scott

Michael Beddow wrote:

> Scott Gillespie wrote:
>
>
>>I have eXist1.0b1 running on my server. I've installed the latest
>>snapshot 20050805 and would like to have it running concurrently on a
>>different port, but I can't get it to work. I've changed the port
>>number. Either one works if the other is not running.
>
>
>
> This rather depends on what you meant by "it" (i.e. how exactly are you
> running eXist) and what you mean by "instances" (do you mean two completely
> independent installations, each with its own database, or do you mean two
> instances of eXist server+client modules both accessing the same database --
> not that this would ever be feasible using a combination of 1.0b and
> 20050805 anyway, because the data formats are too different and the locking
> rules and principles have radically changed)?
>
> Let's assume you mean you want to run two completely independent
> installations in "standalone" mode (life, or at least the amount of *my*
> life that's likely to be left, is too short to embark on attempts to explore
> how to run two full-house installations with Cocoon etc in parallel) and
> access them via the Java client or REST.
>
>
> Alas, you may have a problem even on the theoretically simple "standalone"
> scenario, because both the implementation and the configuration methods of
> the "standalone" server have changed vastly between the two builds you're
> trying to run in parallel. 1.01b really does have a  "standalone" server
> native to eXist, whereas 20050805 provides equivalent functionality via
> Jetty. But the default ports used and service addressing particulars have
> changed. I have completely forgotten how to configure 1.01b, and I fear it
> may involve messing with the source. With more recent builds, you just pass
> the -p parameter to server.sh/bat and all the listeners configured in
> server.properties will start up on the port you specify after the -p
> switch. Maybe that works for 1.01b as well: I wouldn't know because I
> banished it from my machines months ago. (I'm also not sure how things work
> with the current cvs, which now specifies ports as well as services in the
> new server.xml file that has replaced server.properties: specifically I
> don't know whether the -p parameter can be used at startup to override the
> ports specification in server.xml).
>
> But anyway, I've just verified that I can start two arbitrary (but
> relatively recent) builds of "standalone" eXist server, each with its own
> database, on different ports, and address either of them at will via either
> the java client over xmlrpc or a webbrowser via REST. In other words, with
> the builds at my disposal, I can't reproduce what I take to be your problem,
> but maybe what you are trying to do has to be done differently for 1.01b
>
> You say both servers are listening when you look via netstat or lsof, so can
> you get an elementary http response from both of them via telnet? Telnet to
> each port in turn and fake an http 0.9 (!) query by typing in GET / and
> pressing return twice. You should get back a result listing the collections
> and their permissions (from a very recent CVS build you will instead get
> back an http 404 error complaining that  Document /dfb/dfb.xq was not found,
> a promising, but as yet undocumented new behaviour). That shows the servers
> are responding to http, and so they ought to be responding to xmlrpc from
> the java client also. Check out client properties carefully to make sure the
> server addressing there is what you want (and make sure your java client is
> reading the correct client.properties for the server you are trying to
> address)
>
> Michael Beddow
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open

--
...................................
Scott Gillespie
Project Manager
Virginia Center for Digital History
434.924.4777 (phone)
434.243.5566 (fax)


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: running 2 concurrant instances of exist

Michael Beddow-2
Scott Gillespie wrote:

>  I'm unable to telnet into the port due to restrictions on
> the server so I'm not sure what kind of response I would get.

But if telnet can't connect to the port(s) you are running eXist on, neither
can anything else, so those restrictions might be part of your problem.  I'm
not talking about trying to connect to a telnet service on the server, but
simply about using telnet as a handy way of checking that the eXist
listeners are indeed accepting basic commands.

>
> After banging my head against this for a number of days with no solution
> in site, I've decided to just update to running the 20050805 snapshot
> and re-importing and configuring all the applications to work as they
> did under 1.0b1. It's just a headache because there are live sites
> running off the current install that will have to go down for a while.
>
Don't you have another box available that you could use to set up the newer
build (if this is to be a major production upgrade, however, I would advise
waiting for the next snapshot, due Real Soon Now, which fixes quite a lot of
bugs in 20050805 and brings additional standards conformance in the XQuery
and XPath implementations as well as truly dramatic improvements in indexing
and backup restoration times)

You could get the whole thing set up and tested under the newer build on the
spare box, then tar and zip the whole working setup over onto the production
server then swap it for the current working one. No more that  a few seconds
downtime needed. This is basically how I do upgrades to our production
sites.

Michael Beddow



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: running 2 concurrant instances of exist

wolfgangmm
In reply to this post by Michael Beddow-2
> (from a very recent CVS build you will instead get
> back an http 404 error complaining that  Document /dfb/dfb.xq was not found,
> a promising, but as yet undocumented new behaviour).

This is caused by another new feature in the current CVS: the
standalone server (i.e. the one you start with bin/server.sh) does now
support URL forwarding. The configuration is read from server.xml,
where you will find the line:

<root destination="/dfb/dfb.xq"/>

This forwards all requests to the server root to the dfb.xq script in
collection /db/dfb (dfb actually stands for Ding Fubao's buddhist
dictionary, which is the application for which I needed the feature. I
forgot to remove that when committing the file).

I guess the entire documentation concerning server configuration etc.
needs a rewrite to reflect the new possibilities offered by stored
XQueries.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: running 2 concurrant instances of exist

Michael Beddow-2
[Wolfgang]

>I guess the entire documentation concerning server configuration etc.
>needs a rewrite to reflect the new possibilities offered by stored
>XQueries.

One thing about these changes directly relevant to the original post here:
the -p switch on server.sh /bat no longer works as documented. The value of
the port attribute on the <server> element  in server.xml now determines the
port on which the server listens, and any value passed via the -p switch
seems to be ignored. (In the old Java properties-style config, the
properties file determined only which listeners were configured, not which
port they used. The port defaulted to 8088 but could be changed via the -p
switch on the command line).

Michael Beddow





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: running 2 concurrant instances of exist

Scott Gillespie
In reply to this post by Michael Beddow-2
Michael Beddow wrote:
> But if telnet can't connect to the port(s) you are running eXist on, neither
> can anything else, so those restrictions might be part of your problem.  I'm
> not talking about trying to connect to a telnet service on the server, but
> simply about using telnet as a handy way of checking that the eXist
> listeners are indeed accepting basic commands.

OK, figured this out. I was not using the correct syntax for the port. I
was able to connect via telnet to the default Jetty page so all is up
and running. I did not think there was a port firewall on the box, but
have discovered that is the case. I've contacted the sys admin about
opening that up for me to see if it fixes things.

Many thanks for the help trouble shooting.


> Don't you have another box available that you could use to set up the newer
> build (if this is to be a major production upgrade, however, I would advise
> waiting for the next snapshot, due Real Soon Now, which fixes quite a lot of
> bugs in 20050805 and brings additional standards conformance in the XQuery
> and XPath implementations as well as truly dramatic improvements in indexing
> and backup restoration times)

Unfortunately, no. Just a single box. My collections are not that large,
so it's pretty easy to get a new one up and running in short order. I
was able to get it up and running in about 10 minutes and fortunately it
all works. No code changes necessary.

Thanks,
Scott


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open