You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apps-dev@avalon.apache.org by pfisterj <pf...@yahoo.com> on 2002/10/22 00:23:40 UTC

Can't have two instances of Phoenix running on same machine?

I am running hsqldb inside hsql avalon block.
I am using Phoenix4.0.  hsqldb 1.7.1

I created two phoenix directories one for development
and one for PA product assurance.  My intent was to be
able to have both development and PA running on the
same machine.  I can already do this with Tomcat by
changing port attributes in server.xml.

I changed the port and the database file parameters in
config.xml in the SAR for the PA instance and started
it running.

When I tried to run development phoenix instance, at
same time, I got following error:
-----------------------------
INFO    2002-10-21 16:12:15.421 [Phoenix ] (): Logger
started
WARN    2002-10-21 16:12:15.500 [Phoenix ] (): Phoenix
was not started by the daemon thus it will not be
possible to restart the JVM via the Management
interface.
FATAL_E 2002-10-21 16:12:16.046 [Phoenix ] (): There
was a fatal error while starting Embeddor.
javax.management.MBeanException: nested exception is
java.net.BindException: Address already in use:
JVM_Bind
java.net.BindException: Address already in use:
JVM_Bind
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at
java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
	at java.net.ServerSocket.bind(ServerSocket.java:309)
	at
java.net.ServerSocket.<init>(ServerSocket.java:183)
	at
mx4j.adaptor.PlainAdaptorServerSocketFactory.createServerSocket(PlainAdaptorServerSocketFactory.java:26)
	at
mx4j.adaptor.http.HttpAdaptor.createServerSocket(HttpAdaptor.java:261)
-----------------

There seems to be a port being used that I am not
aware of and have no way of changing.  

2)Is this port "JVM_Bind" part of Phoenix? 

If so, and I cannot run more than one Phoenix
environment on a machine then I suppose I could put
both SARs in one Phoenix environment.  I will try that
next.  

3)Assuming that works, is there a way to bring down
and startup a given SAR as opposed to bringing down
entire Phoenix system itself?

Another subject:
4a)I have been shutting Phoenix down using cntrl-C. 
Is there another preferrable way to shut the server
down?

4b)After shutting down Phoenix the db.properties
indicates modified=yes.  This means that changes to
database have not been saved/commited to the data
file.  I would like to do SHUTDOWN COMPACT on hsqldb
when Phoenix shuts down.  I can't see any mechanism in
 DefaultHypersonicSQL.java nor in
HypersonicSQLHandler.java for implementing this.
How can I do this?

Thanks and Regards, Jim


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.

> Okay - still can't reproduce it. What version of Linux are you ising.
I am
> testing on Mandrake 7.x with kernel 2.4.18-6mdksecure and using
libc-2.2.4
> 
> Theres quite a few problems with RH7.2 and some Sun JDKs. Would this
be
> the
> combo that causes the error?

O/S is RH 6.2 with up-to-date RPM installs.

--Peter





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Donald <pe...@apache.org>.
Hi,

On Tue, 22 Oct 2002 17:48, Peter M. Goldstein wrote:
> > > > > Version is Sun 1.3.0 on Linux.  What have people been using on
> > >
> > > Linux?
> > >
> > > > I use that version without a hitch.
> > >
> > > Bizarre.  We changed to IBM 1.3.1, and the problem went away.
> >
> > Okay will look into it. Before I do can you make sure that the ext
> > directory
> > does not have any jars in it that it shouldn't and that the phoenix
> > directory
> > is also clean (with no stray jars) and that the kernel.xml is
>
> unmodified
>
> > (or
> > if modified could you send it to me).
>
> Ext is clean, kernel.xml is unmodified.

Okay - still can't reproduce it. What version of Linux are you ising. I am 
testing on Mandrake 7.x with kernel 2.4.18-6mdksecure and using libc-2.2.4

Theres quite a few problems with RH7.2 and some Sun JDKs. Would this be the 
combo that causes the error?

-- 
Cheers,

Peter Donald
------------------------------------------------------------
 militant agnostic: i don't know, and you don't know either.
------------------------------------------------------------ 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Peter,

> > > > Version is Sun 1.3.0 on Linux.  What have people been using on
> >
> > Linux?
> >
> > > I use that version without a hitch.
> >
> > Bizarre.  We changed to IBM 1.3.1, and the problem went away.
> 
> Okay will look into it. Before I do can you make sure that the ext
> directory
> does not have any jars in it that it shouldn't and that the phoenix
> directory
> is also clean (with no stray jars) and that the kernel.xml is
unmodified
> (or
> if modified could you send it to me).

Ext is clean, kernel.xml is unmodified.

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Donald <pe...@apache.org>.
On Tue, 22 Oct 2002 14:44, Peter M. Goldstein wrote:
> Peter,
>
> > > Version is Sun 1.3.0 on Linux.  What have people been using on
>
> Linux?
>
> > I use that version without a hitch.
>
> Bizarre.  We changed to IBM 1.3.1, and the problem went away.

Okay will look into it. Before I do can you make sure that the ext directory 
does not have any jars in it that it shouldn't and that the phoenix directory 
is also clean (with no stray jars) and that the kernel.xml is unmodified (or 
if modified could you send it to me).

-- 
Cheers,

Peter Donald
Einstein argued that there must be simplified explanations of nature, because
God is not capricious or arbitrary.  No such faith comforts the software
engineer.
- Fred Brooks, Jr.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Peter,

> > Version is Sun 1.3.0 on Linux.  What have people been using on
Linux?
> 
> I use that version without a hitch.

Bizarre.  We changed to IBM 1.3.1, and the problem went away.

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Donald <pe...@apache.org>.
On Tue, 22 Oct 2002 13:05, Peter M. Goldstein wrote:
> Version is Sun 1.3.0 on Linux.  What have people been using on Linux?

I use that version without a hitch. 

-- 
Cheers,

Peter Donald
------------------------------------------------
 "No. Try not. Do. Or do not. There is no try." 
                                     -- Yoda 
------------------------------------------------ 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.

All,

> >> What JDK on Linux?
> >
> > Will check.  Noel is gone for a couple more hours.  I'll post after
he
> > gets back.  Is there a known JVM issue?
> 
> I don't know of any documented ones... but I had troubles with IBM's
> JDK with Tomcat and Phoenix that I didn't have with Sun's (this was
all
> 1.3.1). Since Sun's didn't work I didn't investigate further (and this
> was over a year ago too).

Version is Sun 1.3.0 on Linux.  What have people been using on Linux?

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Royal <pr...@apache.org>.
On Monday, October 21, 2002, at 07:37  PM, Peter M. Goldstein wrote:
>> What JDK on Linux?
>
> Will check.  Noel is gone for a couple more hours.  I'll post after he
> gets back.  Is there a known JVM issue?

I don't know of any documented ones... but I had troubles with IBM's 
JDK with Tomcat and Phoenix that I didn't have with Sun's (this was all 
1.3.1). Since Sun's didn't work I didn't investigate further (and this 
was over a year ago too).
-pete

-- 
peter royal -> proyal@apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
> What JDK on Linux?

Will check.  Noel is gone for a couple more hours.  I'll post after he
gets back.  Is there a known JVM issue?

--Peter




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Royal <pr...@apache.org>.
On Monday, October 21, 2002, at 07:31  PM, Peter M. Goldstein wrote:
> Here's more of the baffling part - I don't see this problem when I 
> start
> the server on Windows.  So on Windows there is no NPE, while on Linux 
> we
> see a seemingly impossible NPE.  Any thoughts?  Anyone who knows the
> internals of Phoenix wish to comment (Peter D., perhaps)?

What JDK on Linux?
-pete

-- 
peter royal -> proyal@apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Ok folks, I've got a doozy of an error.

When one of our developers starts Phoenix 4.0.1 running James, he gets
the following:

INFO    2002-10-21 18:52:09.222 [Phoenix ] (): Logger started
WARN    2002-10-21 18:52:09.612 [Phoenix ] (): Phoenix was not started
by the daemon thus it will not be possible to restart the JVM via the
Management interface.
INFO    2002-10-21 18:52:10.669 [Phoenix.] (): Work directory does not
exist, attempting to create directory /opt/james-2.1a1-cvs/work.
FATAL_E 2002-10-21 18:52:10.702 [Phoenix ] (): There was a fatal error
while starting Embeddor.
java.lang.NullPointerException
	at java.lang.String.trim(String.java:1884)
	at
org.apache.avalon.framework.configuration.AbstractConfiguration.getValue
AsInteger(AbstractConfiguration.java:46)
	at
org.apache.avalon.framework.configuration.AbstractConfiguration.getValue
AsInteger(AbstractConfiguration.java:87)
	at
org.apache.avalon.phoenix.components.manager.MX4JSystemManager.configure
(MX4JSystemManager.java:63)
	at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerU
til.java:192)
	at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.setupCompo
nent(DefaultEmbeddor.java:530)
	at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.setupCompo
nents(DefaultEmbeddor.java:507)

This exception trace starts with a NPE, to a standard call to
getValueAsInteger on an AbstractConfiguration subclass.  Tracing the
code in AbstractConfiguration we see something that looks like:

String value = getValue().trim();

Which will obviously produce an exception if getValue() is null.  All
good so far.

Now, getValue() should, according to the implementation of
DefaultConfiguration, throw a ConfigurationException if the value to be
returned is null.  Because of the code in AbstractConfiguration, this
seems to be a requirement for subclasses of AbstractConfiguration, lest
you generate NPEs.

Ok, here's the baffling part - is there another subclass of
AbstractConfiguration being used?  I can't find one - the only one in
use seems to be DefaultConfiguration.  But DefaultConfiguration throws a
ConfigurationException upon encountering a null value.  So there
certainly shouldn't be an NPE.

Here's more of the baffling part - I don't see this problem when I start
the server on Windows.  So on Windows there is no NPE, while on Linux we
see a seemingly impossible NPE.  Any thoughts?  Anyone who knows the
internals of Phoenix wish to comment (Peter D., perhaps)?

--Peter










--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't have two instances of Phoenix running on same machine?

Posted by Paul Hammant <Pa...@yahoo.com>.
Jim,

Easy: in one of the phoenix conf dirs, edit kernel.conf and change the 
MX4J port from 8082 to something else.  That or run without MX4J.

-ph

>I am running hsqldb inside hsql avalon block.
>I am using Phoenix4.0.  hsqldb 1.7.1
>
>I created two phoenix directories one for development
>and one for PA product assurance.  My intent was to be
>able to have both development and PA running on the
>same machine.  I can already do this with Tomcat by
>changing port attributes in server.xml.
>
>I changed the port and the database file parameters in
>config.xml in the SAR for the PA instance and started
>it running.
>
>When I tried to run development phoenix instance, at
>same time, I got following error:
>-----------------------------
>INFO    2002-10-21 16:12:15.421 [Phoenix ] (): Logger
>started
>WARN    2002-10-21 16:12:15.500 [Phoenix ] (): Phoenix
>was not started by the daemon thus it will not be
>possible to restart the JVM via the Management
>interface.
>FATAL_E 2002-10-21 16:12:16.046 [Phoenix ] (): There
>was a fatal error while starting Embeddor.
>javax.management.MBeanException: nested exception is
>java.net.BindException: Address already in use:
>JVM_Bind
>java.net.BindException: Address already in use:
>JVM_Bind
>	at java.net.PlainSocketImpl.socketBind(Native Method)
>	at
>java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
>	at java.net.ServerSocket.bind(ServerSocket.java:309)
>	at
>java.net.ServerSocket.<init>(ServerSocket.java:183)
>	at
>mx4j.adaptor.PlainAdaptorServerSocketFactory.createServerSocket(PlainAdaptorServerSocketFactory.java:26)
>	at
>mx4j.adaptor.http.HttpAdaptor.createServerSocket(HttpAdaptor.java:261)
>-----------------
>
>There seems to be a port being used that I am not
>aware of and have no way of changing.  
>
>2)Is this port "JVM_Bind" part of Phoenix? 
>
>If so, and I cannot run more than one Phoenix
>environment on a machine then I suppose I could put
>both SARs in one Phoenix environment.  I will try that
>next.  
>
>3)Assuming that works, is there a way to bring down
>and startup a given SAR as opposed to bringing down
>entire Phoenix system itself?
>
>Another subject:
>4a)I have been shutting Phoenix down using cntrl-C. 
>Is there another preferrable way to shut the server
>down?
>
>4b)After shutting down Phoenix the db.properties
>indicates modified=yes.  This means that changes to
>database have not been saved/commited to the data
>file.  I would like to do SHUTDOWN COMPACT on hsqldb
>when Phoenix shuts down.  I can't see any mechanism in
> DefaultHypersonicSQL.java nor in
>HypersonicSQLHandler.java for implementing this.
>How can I do this?
>
>Thanks and Regards, Jim
>
>
>__________________________________________________
>Do you Yahoo!?
>Y! Web Hosting - Let the expert host your web site
>http://webhosting.yahoo.com/
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't have two instances of Phoenix running on same machine?

Posted by Peter Royal <pr...@apache.org>.
CC'ing the user list, since this is most appropriate there...

On Monday, October 21, 2002, at 06:23  PM, pfisterj wrote:
> When I tried to run development phoenix instance, at
> same time, I got following error:
> -----------------------------
> INFO    2002-10-21 16:12:15.421 [Phoenix ] (): Logger
> started
> WARN    2002-10-21 16:12:15.500 [Phoenix ] (): Phoenix
> was not started by the daemon thus it will not be
> possible to restart the JVM via the Management
> interface.
> FATAL_E 2002-10-21 16:12:16.046 [Phoenix ] (): There
> was a fatal error while starting Embeddor.
> javax.management.MBeanException: nested exception is
> java.net.BindException: Address already in use:
> JVM_Bind

inside PHOENIX_HOME/conf/kernel.xml, there is the "SystemManager" 
component.

There are two tags under there that could be causing this:

	<manager-adaptor-port>8082</manager-adaptor-port>
      <enable-rmi-adaptor>true</enable-rmi-adaptor>

'enable-rmi-adaptor' may be commented out, or set to false. if so, 
don't worry about it. Otherwise, you want to set it to false on one of 
the instances.

You also want to make sure the 'manager-adaptor-port' is unique on each 
phoenix installation (I would just increment by one for the other 
install)

> 3)Assuming that works, is there a way to bring down
> and startup a given SAR as opposed to bringing down
> entire Phoenix system itself?

Yes, using the web-based management interface. http://localhost:<port 
number from above>

> Another subject:
> 4a)I have been shutting Phoenix down using cntrl-C.
> Is there another preferrable way to shut the server
> down?

On Windows I believe Control-C is preferrable at the moment (4.0). I 
believe 4.1 has some batch file wrapper to start/stop

> 4b)After shutting down Phoenix the db.properties
> indicates modified=yes.  This means that changes to
> database have not been saved/commited to the data
> file.  I would like to do SHUTDOWN COMPACT on hsqldb
> when Phoenix shuts down.  I can't see any mechanism in
>  DefaultHypersonicSQL.java nor in
> HypersonicSQLHandler.java for implementing this.
> How can I do this?

Is it possible to shutdown the server from the HsqlSocketRequestHandler 
interface?

If so, by modifying DefaultHypersonicSQL to implement the Disposable 
interface and calling the shutdown methods inside of dispose() would be 
the preferred way to implement.
-pete

-- 
peter royal -> proyal@apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>