[JBoss Messaging] - Re: -b 0.0.0.0 is behaving one way on Test machine and anoth
by rdaly
PeterJ:
1. If I ping the servers, I get their correct IP addresses.
2. Tried adding -Djava.rmi.server.hostname. Unfortunately, same results. Clients receive a serverLocatorURI of 127.0.0.1.
3. Yes, I do know that -b and jboss.bind.address are supposed to be the same. Unfortunately I could not get my test machine working with only one of them?!?! When I use 0.0.0.0, the ports are exposed to remote clients, but the clients have a serverLocatorURI of 127.0.0.1. So, the remote clients try to contact the local machine instead of the remote machine. On the other hand, when I use test.server.com, the ports are blocked for remote connections.
I even tried hard-coding the serverBindAddress in the remoting*service.xml files, instead of using ${jboss.bind.address}. This only served in blocking the ports from remote clients again.
Thanks again for your suggestions.
*************************
Martin:
1. Tried your suggestion before posting. Tried again just now for due-diligence. This opens the ports, but clients have a serverLocatorURI of 127.0.0.1.
2. Tried the hostname command. I received the expected server names.
Thank you for your help.
Rich
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154687#4154687
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154687
16 years, 6 months
[Messaging, JMS & JBossMQ] - Re: XA Recovery of messages sent to a Topic
by adrian@jboss.org
Ok, I see the problem. So there's two ways to fix it.
1) We come up with some mechanism where the ServerIL's transact() request
can vote READONLY in this case.
This would require a mixin interface like the Recovery interface
such that newer clients can take advantage of it.
i.e. something like
| public interface NewTxProtocol
| {
| TransactionResult transact2(ConnectionToken dc, TransactionRequest t) throws Exception;
| }
|
| with the necessary know on changes throughout the Invoker layer.
|
| Then have the client side can use it (if the server side supports it)
|
| org.jboss.mq.Connection;
| protected TransactionResult send(TransactionRequest transaction) throws JMSException
| {
| checkClosed();
| if (trace)
| log.trace("Transact request=" + transaction + " " + this);
|
| try
| {
| if (serverIL instanceof NewTxProtocol)
| {
| return serverIL.transact2(connectionToken, transaction);
| }
| else
| {
| serverIL.transact2(connectionToken, transaction);
| return null;
| }
| }
| catch (Throwable t)
| {
| SpyJMSException.rethrowAsJMSException("Cannot process a transaction", t);
| }
| }
|
|
2) We disable the lazy insert of the tx record in the jdbc2 persistence manager
when it is a real XID.
(2) is obviously easier, but it is not as efficient as (1).
I'll do (2) but do you want to have a go at trying to do (1) ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154677#4154677
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154677
16 years, 6 months
[EJB/JBoss] - compressed remote calls with compression-invoker
by n2
I tried to configure compressed remote calls as described in Configuration Guide section 14.2.1.
See: http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/Server_Configu....
I changed jboss-service.xml to use a CompressionClient/ServerSocketFactory:
| <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker" name="jboss:service=invoker,type=jrmp,socketType=CompressionSocketFactory">
| <attribute name="RMIObjectPort">4445</attribute>
| <attribute name="ServerAddress">${jboss.bind.address}</attribute>
| <attribute name="RMIClientSocketFactory">org.jboss.test.jrmp.ejb.CompressionClientSocketFactory</attribute>
| <attribute name="RMIServerSocketFactory">org.jboss.test.jrmp.ejb.CompressionServerSocketFactory</attribute>
| <depends>jboss:service=TransactionManager</depends>
| </mbean>
|
The CompressionClient/ServerSocketFactory uses a CompressionSocket to wrap the Input/OutputStream of the client-server-socket with a java.util.zip.GZIPInput/OutputStream:
| class CompressionSocket extends Socket
| {
| ..
| /*
| * Returns a stream of type CompressionInputStream
| */
| public InputStream getInputStream() throws IOException
| {
| if (in == null)
| {
| in = new GZIPInputStream( super.getInputStream() );
| }
| return in;
| }
|
| /*
| * Returns a stream of type CompressionOutputStream
| */
| public OutputStream getOutputStream() throws IOException
| {
| if (out == null)
| {
| out = new GZIPOutputStream( super.getOutputStream());
| }
| return out;
| }
| ..
|
The configuration is working. The CompressionClient/ServerSocketFactory are used. But i get an exception on the client side when i do remote calls:
| java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
| java.net.SocketTimeoutException: Read timed out
| at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
| at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
| at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
| at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
| at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
| at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:63)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy0.create(Unknown Source)
| at com.carano.cbf.partner.client._AbstractGPAktionZuordnungEJBClienthandlerBase.createRemotehandler(_AbstractGPAktionZuordnungEJBClienthandlerBase.java:68)
| at com.carano.framework.abo.EJBClienthandler$EJBObjectFactory.createRemote(EJBClienthandler.java:1293)
| at com.carano.framework.util.ejb.AbstractEJBObjectFactory.getRemote(AbstractEJBObjectFactory.java:704)
| at com.carano.framework.abo.EJBClienthandler.getEJBhandler(EJBClienthandler.java:245)
| at com.carano.framework.abo.EJBClienthandler.doSearch(EJBClienthandler.java:897)
| at com.carano.framework.abo.EJBClienthandler.doSearch(EJBClienthandler.java:850)
| at com.carano.framework.abo.client.AbstractClienthandler._doSearch(AbstractClienthandler.java:1063)
| at com.carano.framework.abo.client.AbstractClienthandler.searchMainBOs(AbstractClienthandler.java:1018)
| at com.carano.cbf.partner.client.AbstractGPAktionZuordnungClienthandlerSupport.getLastAktionsForCurrentUser(AbstractGPAktionZuordnungClienthandlerSupport.java:109)
| at com.carano.cbf.partner.client.AbstractGPAktionZuordnungEJBClienthandler.getLastAktionsForCurrentUser(AbstractGPAktionZuordnungEJBClienthandler.java:80)
| at fleet.client.gui.FleetAktionenStatusBar.checkForNewAktionen(FleetAktionenStatusBar.java:201)
| at fleet.client.gui.FleetAktionenStatusBar.init(FleetAktionenStatusBar.java:116)
| at fleet.client.gui.FleetAktionenStatusBar.<init>(FleetAktionenStatusBar.java:108)
| at fleet.client.gui.CaramotoDesktopRootPane.createStatusBar(CaramotoDesktopRootPane.java:790)
| at com.carano.framework.gui.client.masterdetail.AbstractDesktopRootPane.jbInit(AbstractDesktopRootPane.java:368)
| at com.carano.framework.gui.client.masterdetail.AbstractDesktopRootPane.<init>(AbstractDesktopRootPane.java:338)
| at fleet.client.gui.CaramotoDesktopRootPane.<init>(CaramotoDesktopRootPane.java:274)
| at fleet.client.gui.CaramotoMDIFrame$1.<init>(CaramotoMDIFrame.java:134)
| at fleet.client.gui.CaramotoMDIFrame.createDesktopRootPane(CaramotoMDIFrame.java:134)
| at com.carano.framework.gui.client.masterdetail.AbstractDesktopFrame.createRootPane(AbstractDesktopFrame.java:158)
| at javax.swing.JFrame.frameInit(JFrame.java:241)
| at javax.swing.JFrame.<init>(JFrame.java:164)
| at com.carano.framework.gui.client.masterdetail.AbstractDesktopFrame.<init>(AbstractDesktopFrame.java:134)
| at fleet.client.gui.CaramotoMDIFrame.<init>(CaramotoMDIFrame.java:41)
| at fleet.client.gui.Main.<init>(Main.java:243)
| at fleet.client.gui.Main.main(Main.java:394)
| Caused by: java.net.SocketTimeoutException: Read timed out
| at java.net.SocketInputStream.socketRead0(Native Method)
| at java.net.SocketInputStream.read(SocketInputStream.java:129)
| at java.net.SocketInputStream.read(SocketInputStream.java:182)
| at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42)
| at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205)
| at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197)
| at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136)
| at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
| at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
| at org.jboss.test.jrmp.ejb.CompressionSocket.getInputStream(CompressionSocket.java:72)
| at sun.rmi.transport.tcp.TCPConnection.getInputStream(TCPConnection.java:85)
| at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:226)
| ... 37 more
|
Thanks for help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154670#4154670
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154670
16 years, 6 months