[Messaging, JMS & JBossMQ] - Problem with JMS behind firewall
by NickDeGraeve
When our client application tries to create a topic connection it times out.
We have a JBoss server on a machine on the local LAN and it is separated from the Internet by a router/firewall. On the router following ports are forwarded to the local IP address of the JBoss server: 1098, 1099, 4444, 8080 & 8093.
I started the server with -Djava.rmi.server.hostname=mail.fpc.be -Djava.rmi.server.useLocalHostname=false
However, in the JBoss MQ logging on the client I see "Connecting with addr=192.168.254.6, port=8093, localAddr=null", and that's the local LAN IP address.
Any idea on what is configured incorrectly?
Stacktrace :
com.fpc.nokeos.core.common.exceptions.NokeosRuntimeException: Er is een systeem fout opgetreden.<br>Gelieve de NoKeossysteemadministrator te contacteren.
| at com.fpc.nokeos.core.common.jms.ConnectionFactory.<clinit>(ConnectionFactory.java:34)
| ... 14 more
| Caused by: org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.Con
| nectException : Connection timed out: connect)
| at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:78)
| at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:63)
| at org.jboss.mq.Connection.authenticate (Connection.java:1069)
| at org.jboss.mq.Connection.<init>(Connection.java:252)
| at org.jboss.mq.Connection.<init>(Connection.java:323)
| at org.jboss.mq.SpyConnection.<init>(SpyConnection.java :116)
| at org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
| at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:118)
| at com.fpc.nokeos.core.common.jms.ConnectionFactory .<clinit>(ConnectionFactory.java:31)
| ... 14 more
| Caused by: java.net.ConnectException: Connection timed out: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect (Unknown Source)
| at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
| at java.net.PlainSocketImpl.connect(Unknown Source)
| at java.net.SocksSocketImpl.connect(Unknown Source)
| at java.net.Socket.connect (Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at java.net.Socket.<init>(Unknown Source)
| at java.net.Socket.<init>(Unknown Source)
| at javax.net.DefaultSocketFactory.createSocket (Unknown Source)
| at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:670)
| at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:558)
| at org.jboss.mq.il.uil2.UILServerIL.authenticate (UILServerIL.java:360)
| at org.jboss.mq.Connection.authenticate(Connection.java:1065)
| ... 20 more
Additional logging on JBoss MQ:2007-05-08 11:25:15,859 - DEBUG: [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference
| 2007-05-08 11:25:15,953 - DEBUG: [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory[server=org.jboss.mq.il.uil2.UILServerIL@1343ed0 connectionProperties={ClientILService=org.jboss.mq.il.uil2.UILClientILService, UIL_TCPNODELAY_KEY=yes, UIL_CHUNKSIZE_KEY=1000000, UIL_CONNECTADDRESS_KEY=null, UIL_CONNECTPORT_KEY=0, UIL_SOTIMEOUT_KEY=120000, UIL_RECEIVE_REPLIES_KEY=No, UIL_ADDRESS_KEY=192.168.254.6, UIL_PORT_KEY=8093, PingPeriod=60000, UIL_BUFFERSIZE_KEY=2048}]
| 2007-05-08 11:25:15,984 - DEBUG: [org.jboss.mq.Connection] Setting the clockDaemon's thread factory
| 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] Connection Initializing userName=null Connection@9492714[clientID=null rcvstate=STOPPED]
| 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] Getting the serverIL Connection@9492714[clientID=null rcvstate=STOPPED]
| 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] serverIL=org.jboss.mq.il.uil2.UILServerIL@19113f8 Connection@9492714[clientID=null rcvstate=STOPPED]
| 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] Authenticating user null Connection@9492714[clientID=null rcvstate=STOPPED]
| 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Begin connect loop, maxRetries=10, delay=0
| 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Connecting with addr=192.168.254.6, port=8093, localAddr=null, localPort=0, socketFactory=javax.net.DefaultSocketFactory@542529, enableTcpNoDelay=true, bufferSize=2048, chunkSize=1000000
| 2007-05-08 11:25:37,062 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Begin connect loop, maxRetries=10, delay=0
| 2007-05-08 11:25:37,062 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Connecting with addr=192.168.254.6, port=8093, localAddr=null, localPort=0, socketFactory=javax.net.DefaultSocketFactory@542529, enableTcpNoDelay=true, bufferSize=2048, chunkSize=1000000
| 2007-05-08 11:25:58,187 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Failed to connect, retries=1
| java.net.ConnectException: Connection timed out: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(Unknown Source)
| at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
| at java.net.PlainSocketImpl.connect(Unknown Source)
| at java.net.SocksSocketImpl.connect(Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at java.net.Socket.<init>(Unknown Source)
| at java.net.Socket.<init>(Unknown Source)
| at javax.net.DefaultSocketFactory.createSocket(Unknown Source)
| at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:670)
| at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:558)
| at org.jboss.mq.il.uil2.UILServerIL.connectionClosing(UILServerIL.java:403)
| at org.jboss.mq.Connection.<init>(Connection.java:264)
| at org.jboss.mq.Connection.<init>(Connection.java:323)
| at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:116)
| at org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
| at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:118)
| at com.fpc.nokeos.core.common.jms.ConnectionFactory.<clinit>(ConnectionFactory.java:31)
| at com.fpc.nokeos.core.client.launch.Launcher$Licensor.<init>(Launcher.java:491)
| at com.fpc.nokeos.core.client.launch.Launcher.doLogin(Launcher.java:145)
| at com.fpc.nokeos.core.client.launch.Launcher.main(Launcher.java:134)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at com.sun.javaws.Launcher.executeApplication(Unknown Source)
| at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
| at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
| at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
| at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
| at com.sun.javaws.Launcher.run(Unknown Source)
| at java.lang.Thread.run(Unknown Source)
| 2007-05-08 11:25:58,187 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Connecting with addr=192.168.254.6, port=8093, localAddr=null, localPort=0, socketFactory=javax.net.DefaultSocketFactory@542529, enableTcpNoDelay=true, bufferSize=2048, chunkSize=1000000
| 2007-05-08 11:26:19,296 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Failed to connect, retries=2
| java.net.ConnectException: Connection timed out: connect
| [...]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043873#4043873
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043873
19 years
[JBossCache] - Re: TreeCache CacheLoader Issue
by robnor
Further
Cache config:
| <mbean code="org.jboss.cache.TreeCache" name="ice.import:service=TreeCache">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
| <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends> _
|
|
| <!-- Configure the TransactionManager -->
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
| <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <!-- <attribute name="IsolationLevel">NONE</attribute>-->
|
|
| <attribute name="CacheMode">LOCAL</attribute>
| <!-- <attribute name="CacheMode">REPL_SYNC</attribute>-->
| <!-- <attribute name="ClusterName">Import-Cache-Cluster</attribute>-->
|
| <!-- Configure Marshalling -->
| <attribute name="InitialStateRetrievalTimeout">5000</attribute>
| <attribute name="SyncReplTimeout">10000</attribute>
| <attribute name="LockAcquisitionTimeout">15000</attribute>
|
| <attribute name="CacheLoaderConfiguration" replace="false">
|
| <config>
| <preload>/import</preload>
| <shared>false</shared>
|
| <cacheloader>
| <class>org.jboss.cache.loader.JDBCCacheLoader</class>
| <properties>
| cache.jdbc.datasource=java:/DefaultDS
| cache.jdbc.table.drop=false
| </properties>
| <async>false</async>
| <fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| <purgeOnStartup>false</purgeOnStartup>
| </cacheloader>
|
| <cacheloader>
| <class>org.jboss.cache.loader.FileCacheLoader</class>
| <properties>location=/tmp</properties>
| <async>false</async>
| <fetchPersistentState>false</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| <purgeOnStartup>false</purgeOnStartup>
| </cacheloader>
|
|
| </config>
| </attribute>
|
| </mbean>
|
I have been experimenting with different configuration without success, latest try is with optimistic node locking...
I have the extra file cacheloader to be able to view what is stored without having to redeploy app (to see if it fetches the state when it loads).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043867#4043867
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043867
19 years
[JBossCache] - Re: TreeCache CacheLoader Issue
by robnor
Log:
| 2007-05-08 11:33:40,093 DEBUG [ImportCacheHelper] storeTracker() - start
| 2007-05-08 11:33:40,093 DEBUG [ImportCacheHelper] ImportTracker - PUT
| 2007-05-08 11:33:40,093 DEBUG [ImportCacheHelper] TRANSACTION STATUS: Active [0]
| 2007-05-08 11:33:40,093 DEBUG [TxInterceptor] local transaction exists - registering global tx if not present for Thread[WorkManager(3)-49,5,JBoss Pooled Threads]
| 2007-05-08 11:33:40,093 DEBUG [TxInterceptor] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=dev-07/498, BranchQual=, localId=498] is already registered.
| 2007-05-08 11:33:40,109 DEBUG [TxInterceptor] local transaction exists - registering global tx if not present for Thread[WorkManager(3)-49,5,JBoss Pooled Threads]
| 2007-05-08 11:33:40,109 DEBUG [TxInterceptor] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=dev-07/498, BranchQual=, localId=498] is already registered.
| 2007-05-08 11:33:40,109 DEBUG [ImportCacheHelper] PUT - Performed!
| 2007-05-08 11:33:40,109 DEBUG [ImportCacheHelper] storeTracker() - stop
| 2007-05-08 11:33:40,109 DEBUG [LocalScpPusher1] PUSHED PRODUCT: BatchId[1303016476664275:061432324027] ProductType[DummyFilterProductsNoDrm] Pusher[LocalSCPPusher1]
| 2007-05-08 11:33:40,125 DEBUG [TxInterceptor] local transaction exists - registering global tx if not present for Thread[WorkManager(3)-49,5,JBoss Pooled Threads]
| 2007-05-08 11:33:40,125 DEBUG [TxInterceptor] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=dev-07/498, BranchQual=, localId=498] is already registered.
| 2007-05-08 11:33:40,859 DEBUG [TxInterceptor] Running commit phase. One phase? false
| 2007-05-08 11:33:40,859 DEBUG [OptimisticValidatorInterceptor] commiting validated changes
| 2007-05-08 11:33:40,859 DEBUG [TxInterceptor] Finished local commit/rollback method for GlobalTransaction:<null>:76
| 2007-05-08 11:33:40,859 DEBUG [TxInterceptor] Finished commit phase
| 2007-05-08 11:33:40,875 DEBUG [TxInterceptor] local transaction exists - registering global tx if not present for Thread[WorkManager(3)-50,5,JBoss Pooled Threads]
| 2007-05-08 11:33:40,875 DEBUG [TxInterceptor] Running commit phase. One phase? false
| 2007-05-08 11:33:40,875 DEBUG [OptimisticValidatorInterceptor] commiting validated changes
| 2007-05-08 11:33:40,875 DEBUG [TxInterceptor] Finished local commit/rollback method for GlobalTransaction:<null>:77
| 2007-05-08 11:33:40,875 DEBUG [TxInterceptor] Finished commit phase
| 2007-05-08 11:33:40,890 DEBUG [ImportCacheHelper] storeTracker() - start
| 2007-05-08 11:33:40,890 DEBUG [ImportCacheHelper] ImportTracker - PUT
| 2007-05-08 11:33:40,890 DEBUG [ImportCacheHelper] NO TRANSACTION
| 2007-05-08 11:33:40,890 DEBUG [TxInterceptor] local transaction exists - registering global tx if not present for Thread[WorkManager(3)-50,5,JBoss Pooled Threads]
| 2007-05-08 11:33:40,890 DEBUG [TxInterceptor] Running commit phase. One phase? false
| 2007-05-08 11:33:40,890 DEBUG [OptimisticValidatorInterceptor] commiting validated changes
| 2007-05-08 11:33:40,890 DEBUG [TxInterceptor] Finished local commit/rollback method for GlobalTransaction:<null>:78
| 2007-05-08 11:33:40,890 DEBUG [TxInterceptor] Finished commit phase
| 2007-05-08 11:33:40,890 DEBUG [TxInterceptor] local transaction exists - registering global tx if not present for Thread[WorkManager(3)-50,5,JBoss Pooled Threads]
| 2007-05-08 11:33:40,890 DEBUG [TxInterceptor] Running commit phase. One phase? false
| 2007-05-08 11:33:40,906 DEBUG [OptimisticValidatorInterceptor] commiting validated changes
| 2007-05-08 11:33:40,906 DEBUG [TxInterceptor] Finished local commit/rollback method for GlobalTransaction:<null>:79
| 2007-05-08 11:33:40,906 DEBUG [TxInterceptor] Finished commit phase
| 2007-05-08 11:33:40,906 DEBUG [ImportCacheHelper] PUT - Performed!
|
The storage interceptor is never triggered and the data is not commited in the cacheloader.
I can get the data to get stored as I want it to be but then I need to get the cacheloader from the cache and make a put directly in the cacheloader. This sux!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043866#4043866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043866
19 years