How to configure Connection to RabbitMQ broker - java

I have been trying to connect to an RabbitMQ when the broker is in a shutdown state. So far I have:
com.rabbitmq.client.ConnectionFactory factory = new
com.rabbitmq.client.ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
factory.setAutomaticRecoveryEnabled(true);
factory.setNetworkRecoveryInterval(100000);
factory.setConnectionTimeout(100000);
factory.setHandshakeTimeout(100000);
return factory.newConnection();
However when factory.newConnection() is executed when the application startup. Here is the stacktrace:
Caused by: java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:124)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:120)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:362)
at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:63)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:99)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:918)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:877)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:835)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:987)
at com.app.RabbitMqConectionFactory.provide(RabbitMqConectionFactory.java:41)
... 75 more
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:443)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:306)
... 82 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:290)
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91)
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:164)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:580)
at java.lang.Thread.run(Thread.java:745)

Related

MongoDB SocketException: : Connection reset

I have a spring boot applicaiton running which connects to mongoserver in azure cloud.
The app continuesly gets java.net.SocketException: Connection reset exception for the first request after 4 secs idletime and fail.
Then the subsequent requests are processed after a new connection is established.
Mongo client configuration
#Bean
public MongoClient mongoClient() {
final String address = serverAddress;
MongoCredential credential = MongoCredential.createCredential(userName, database, primaryPassword.toCharArray());
ServerAddress sAddress = new ServerAddress(address, port);
MongoClientOptions.Builder opBuilder = MongoClientOptions.builder();
opBuilder.sslEnabled(true);
opBuilder.requiredReplicaSetName(requiredReplicaSetName);
opBuilder.maxConnectionIdleTime(1500000);
opBuilder.socketTimeout(30000);
opBuilder.connectTimeout(30000);
// MongoClient
return new MongoClient(sAddress, credential, opBuilder.build());
}
and the exception:
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT Caused by: org.springframework.data.mongodb.UncategorizedMongoDbException: Exception sending message; nested exception is com.mongodb.MongoSocketWriteException: Exception sending message
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT
at org.springframework.data.mongodb.repository.query.AbstractMongoQuery.lambda$getExecution$1(AbstractMongoQuery.java:115) ~[spring-data-mongodb-2.1.14.RELEASE.jar!/:2.1.14.RELEASE]
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT at
... 98 common frames omitted
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT Caused by: com.mongodb.MongoSocketWriteException: Exception sending message
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT at com.mongodb.internal.connection.InternalStreamConnection.translateWriteException(InternalStreamConnection.java:525) ~[mongo-java-driver-3.8.2.jar!/:na]
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT ... 130 common frames omitted
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT Caused by: java.net.SocketException: Connection reset
2020-08-05T11:40:55.34-0400 [APP/PROC/WEB/0] OUT ... 152 common frames omitted
I tried changing the connection timeout, socketimeout and maxConnectionIdleTime to increase/decrese but the app continuesly gets this exception after 4sec of idle time.

Redis PubSub: Connections timeout

Our subscription client connections keeps disconnecting with the following error.
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:47)
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:36)
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37)
at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:210)
at org.springframework.data.redis.connection.jedis.JedisConnection.subscribe(JedisConnection.java:2986)
at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.eventuallyPerformSubscription(RedisMessageListenerContainer.java:784)
at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.run(RedisMessageListenerContainer.java:740)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202)
at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
at redis.clients.jedis.Protocol.process(Protocol.java:151)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:285)
at redis.clients.jedis.BinaryJedisPubSub.process(BinaryJedisPubSub.java:87)
at redis.clients.jedis.BinaryJedisPubSub.proceed(BinaryJedisPubSub.java:82)
at redis.clients.jedis.BinaryJedis.subscribe(BinaryJedis.java:3070)
at org.springframework.data.redis.connection.jedis.JedisConnection.subscribe(JedisConnection.java:2983)
... 5 common frames omitted
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:127)
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:196)
... 14 common frames omitted
]
For having permanent connections, we have configured 0 timeout in both client and server.
Redis Client:
poolConfig.setMaxTotal(10);
poolConfig.setMaxIdle(5);
poolConfig.setBlockWhenExhausted(true);
poolConfig.setMinIdle(2);
poolConfig.setTestOnBorrow(true);
JedisConnectionFactory factory = new JedisConnectionFactory();
factory.setHostName(HOST);
factory.setPort(PORT);
factory.setDatabase(Protocol.DEFAULT_DATABASE);
factory.setPoolConfig(poolConfig);
factory.setTimeout(0);
JedisShardInfo shardInfo = new JedisShardInfo(factory.getHostName(), factory.getPort(), 0);
factory.setShardInfo(shardInfo);
return factory;
Redis Server Config:
127.0.0.1:6379> CONFIG GET client-output-buffer-limit
1) "client-output-buffer-limit"
2) "normal 0 0 0 slave 268435456 67108864 60 pubsub 257949696 134217728 0"
Can someone please help?

Using settings from TNSNAMES.ORA in HikariCP

I am trying to migrate to HikariCP for my application connection pool. At the moment, I want to connect to an Oracle database.
Here is the code I am using :
HikariConfig hc = new HikariConfig();
hc.setUsername(username);
hc.setPassword(password);
hc.setDataSourceClassName("oracle.jdbc.pool.OracleDataSource");
hc.addDataSourceProperty("serverName", TNS);
hc.addDataSourceProperty("portNumber", 1521);
hc.addDataSourceProperty("driverType", "thin");
HikariDataSource hds = new HikariDataSource(hc);
hds.setPoolName("Pool::"+username+"#"+dbName);
the TNS variable comes from my config, and reference a setting in the TNSNAMES.ora files present on the server.
SERVER_1 =
(DESCRPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server01.intranet)(PORT = 1521))
)
(CONNECTION_DATA =
(SERVICE_NAME = SERVER1)
)
)
The code fails with the following stacktrace :
INFO HikariPool-1 - Starting...
ERROR HikariPool-1 - Exception during pool initialization.
java.sql.SQLRecoverableException: Erreur d'E/S: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:317)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:241)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:443)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:514)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:111)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:72)
at com.test.commonlib.config.DbConfigReader.getDataSource(DbConfigReader.java:105)
at com.test.commonlib.config.DbConfigReader.getDataSource(DbConfigReader.java:31)
at com.test.module1.Module1.getConnectionModule1(Module1.java:258)
at com.test.module1.fileinjector.fd.loadConf(fd.java:583)
at com.test.module1.fileinjector.fd.<init>(fd.java:78)
at com.test.module1.fileinjector.fd.getInstance(fd.java:84)
at com.test.module1.Module1.init(Module1.java:78)
at com.test.module1.scripts.TestPerso.TestPerso.testModule1(TestPerso.java:2009)
at com.test.module1.scripts.TestPerso.TestPerso.main(TestPerso.java:145)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 20 more
Caused by: java.net.UnknownHostException: SERVER_1
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:120)
at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
... 25 more
Exception in thread "main" com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Erreur d'E/S: The Network Adapter could not establish the connection
at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:543)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:535)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:111)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:72)
at com.test.commonlib.config.DbConfigReader.getDataSource(DbConfigReader.java:105)
at com.test.commonlib.config.DbConfigReader.getDataSource(DbConfigReader.java:31)
at com.test.module1.Module1.getConnectionModule1(Module1.java:258)
at com.test.module1.fileinjector.fd.loadConf(fd.java:583)
at com.test.module1.fileinjector.fd.<init>(fd.java:78)
at com.test.module1.fileinjector.fd.getInstance(fd.java:84)
at com.test.module1.Module1.init(Module1.java:78)
at com.test.module1.scripts.TestPerso.TestPerso.testModule1(TestPerso.java:2009)
at com.test.module1.scripts.TestPerso.TestPerso.main(TestPerso.java:145)
Caused by: java.sql.SQLRecoverableException: Erreur d'E/S: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:317)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:241)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:443)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:514)
... 11 more
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 20 more
Caused by: java.net.UnknownHostException: SERVER_1
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:120)
at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
... 25 more
Does anyone got any luck to make it work on Oracle with the TNS NAME ?
Set the "oracle.net.tns_admin" system property in order to specify a directory location of TNSNAMES.ORA file.
System.setProperty("oracle.net.tns_admin", "C:\\Development\\TNS_ADMIN");
If you have TNS_ADMIN system variable set you can do it in following way
System.setProperty("oracle.net.tns_admin", System.getenv("TNS_ADMIN"));
You can work with JDBC URL instead:
dataSource.setDriverClassName("oracle.jdbc.driver.OracleDriver");
dataSource.setJdbcUrl("jdbc:oracle:thin:#server01.intranet:1521/SERVER1")

redistemplate exceptions after redis server restart

Using redisTemplate, things work until redis server restart. Then two exceptions occur (see below).
When I stop using redisTemplate.executePipelined, the exception 2 stops happening. After invoking redisTemplate.setEnableTransactionSupport(false);, the exception 1 goes away.
But I have no idea why.
Any ideas?
Exception 1:
org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketException: Broken pipe; nested exception is redis.clients.jedis.ex
ceptions.JedisConnectionException: java.net.SocketException: Broken pipe
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67)
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41)
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37)
at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:212)
at org.springframework.data.redis.connection.jedis.JedisConnection.hGetAll(JedisConnection.java:2890)
at org.springframework.data.redis.connection.DefaultStringRedisConnection.hGetAll(DefaultStringRedisConnection.java:360)
at org.springframework.data.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223)
at org.springframework.data.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:204)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:166)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:88)
at org.springframework.data.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220)
....
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe
at redis.clients.jedis.Protocol.sendCommand(Protocol.java:104)
at redis.clients.jedis.Protocol.sendCommand(Protocol.java:84)
at redis.clients.jedis.Connection.sendCommand(Connection.java:127)
at redis.clients.jedis.BinaryClient.hgetAll(BinaryClient.java:294)
at redis.clients.jedis.BinaryJedis.hgetAll(BinaryJedis.java:1027)
at org.springframework.data.redis.connection.jedis.JedisConnection.hGetAll(JedisConnection.java:2888)
... 14 common frames omitted
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.write(RedisOutputStream.java:59)
at redis.clients.jedis.Protocol.sendCommand(Protocol.java:90)
... 19 common frames omitted
Exception 2:
org.springframework.dao.InvalidDataAccessApiUsageException: Cannot use Jedis when in Pipeline. Please use Pipeline or reset jedis state .; nested
exception is redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Pipeline. Please use Pipeline or reset jedis state .
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:64)
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41)
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37)
at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:212)
at org.springframework.data.redis.connection.jedis.JedisConnection.hGetAll(JedisConnection.java:2890)
at org.springframework.data.redis.connection.DefaultStringRedisConnection.hGetAll(DefaultStringRedisConnection.java:360)
at org.springframework.data.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223)
at org.springframework.data.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:204)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:166)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:88)
at org.springframework.data.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220)
...
Caused by: redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Pipeline. Please use Pipeline or reset jedis state .
at redis.clients.jedis.BinaryJedis.checkIsInMultiOrPipeline(BinaryJedis.java:1761)
at redis.clients.jedis.BinaryJedis.hgetAll(BinaryJedis.java:1026)
at org.springframework.data.redis.connection.jedis.JedisConnection.hGetAll(JedisConnection.java:2888)
... 14 common frames omitted

DeploymentManagerCreationException

When I run the following code in command window
java weblogic.Deployer -adminurl localhost:7001 -user weblogic -password weblogic -start -name myTestDeployment"
I am getting the following error:
javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException at
weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(W
ebLogicDeploymentManagerImpl.java:121) at
weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getD
eploymentManager(DeploymentFactoryImpl.java:84) at
weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionH elper.java:432) at
weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operat ion.java:304) at
weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137 ) at
weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88) at
weblogic.utils.compiler.Tool.run(Tool.java:158) at
weblogic.utils.compiler.Tool.run(Tool.java:115) at
weblogic.Deployer.run(Deployer.java:70) at weblogic.Deployer.main(Deployer.java:54)
Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException at
weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(Ser
verConnectionImpl.java:143) at
weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewCo
nnection(WebLogicDeploymentManagerImpl.java:148) at
weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(W
ebLogicDeploymentManagerImpl.java:118) ... 9 more Caused by:
javax.naming.CommunicationException [Root exception is java.net.Conne ctException:
localhost:7001: Destination unreachable; nested exception is : java.net.ConnectException:
Connection refused: connect; No available rou ter to destination] at
weblogic.jndi.internal.ExceptionTranslator.toNamingException(Exceptio nTranslator.java:40)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLIni
tialContextFactoryDelegate.java:773) at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
tialContextFactoryDelegate.java:363) at
weblogic.jndi.Environment.getContext(Environment.java:307) at
weblogic.jndi.Environment.getContext(Environment.java:277) at
weblogic.jndi.Environment.createInitialContext(Environment.java:200) at
weblogic.jndi.Environment.getInitialContext(Environment.java:184) at
weblogic.jndi.Environment.getInitialContext(Environment.java:162) at
weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getConte
xt(ServerConnectionImpl.java:330) at
weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getEnvir
onment(ServerConnectionImpl.java:302) at
weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(Ser
verConnectionImpl.java:141) ... 11 more Caused by: java.net.ConnectException:
localhost:7001: Destination unreach able; nested exception is: java.net.ConnectException:
Connection refused: connect; No available rou ter to destination at
weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:204) at
weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:154) at
weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextF
actoryDelegate.java:342) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source) at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
tialContextFactoryDelegate.java:337) ... 19 more Caused by: java.rmi.ConnectException:
Destination unreachable; nested exception is: java.net.ConnectException: Connection
refused: connect; No available rou ter to destination at
weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:472) at
weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:323) at
weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java :263) at
weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:206) at
weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:226 ) at
weblogic.rjvm.RJVMFinder.findOrCreateRemoteCluster(RJVMFinder.java:30 8) at
weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:194) ... 24 more Unable to connect
to 'localhost:7001': Destination unreachable; nested ex ception is:
java.net.ConnectException: Connection refused: connect; No available rou ter to
destination. Ensure the url represents a running admin server and that th e credentials
are correct. If using http protocol, tunneling must be enabled on the admin server.
Please help me to solve this problem.
Check if the admin server is running on this server port 7001:
javax.naming.CommunicationException [Root exception is java.net.Conne ctException:
localhost:7001: Destination unreachable; nested exception is : java.net.ConnectException:
Connection refused: connect; No available rou ter to destination]

Categories