Correct UDP source close at Hazelcast Jet - udp

I use UDP socket as data source at Hazelcast Jet.
#Override
protected void init(Context context) throws Exception {
super.init(context);
jobFuture = context.jobFuture();
try {
getLogger().info("Connecting to socket " + hostAndPort());
final DatagramChannel acctchannel = DatagramChannel.open();
socket = acctchannel.socket();
socket.setSoTimeout(0);
socket.bind(new InetSocketAddress(host, port));
getLogger().info("Connected to socket " + hostAndPort());
} catch (IOException e) {
throw sneakyThrow(e);
}
}
#Override
public void close() {
if (socket != null) {
getLogger().info("Closing socket " + hostAndPort());
socket.close();
}
}
#Override
public boolean complete() {
try {
while (!jobFuture.isDone() && socket != null) {
final byte replyBytes[] = new byte[4096];
final DatagramPacket reply = new DatagramPacket(replyBytes, replyBytes.length);
socket.receive(reply);
emit(reply);
}
return true;
} catch (IOException e) {
throw sneakyThrow(e);
} finally {
close();
}
}
It works correct on one node only.
When i start another node (hazelcase multicast join used) my first node try to bind UDP socket again. I haven't seen 'Closing socket' log.
Hazelcast logs at first node:
Jul 24, 2
017 6:54:24 PM com.hazelcast.internal.cluster.impl.MulticastJoiner
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2]
Members [1] {
Member [192.168.26.225]:5701 - af116710-cac6-4d5e-9c30-2ab04861c310 this
}
Jul 24, 2017 6:54:24 PM com.hazelcast.core.LifecycleService
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] [192.168.26.225]:5701 is STARTED
Filling Map
Starting job
Jul 24, 2017 6:54:24 PM com.hazelcast.internal.partition.impl.PartitionStateManager
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Initializing cluster partition table arrangement...
Jul 24, 2017 6:54:24 PM com.hazelcast.jet.impl.operation.ExecuteJobOperation
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Start executing job 0: dag
.vertex("datagram-source").localParallelism(1)
.vertex("map")
.vertex("sink").localParallelism(1)
.edge(between("datagram-source", "map").distributed())
.edge(between("map", "sink"))
Jul 24, 2017 6:54:24 PM com.hazelcast.jet.impl.operation.InitOperation
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Initializing execution plan for job 0 from [192.168.26.225]:5701.
Jul 24, 2017 6:54:24 PM com.hazelcast.jet.impl.operation.ExecuteOperation
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Start execution of plan for job 0 from caller [192.168.26.225]:5701.
Jul 24, 2017 6:54:24 PM org.eltex.softwlc.sorm.replicator.processor.UdpSource.datagram-source#0
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Connecting to socket 0.0.0.0:41813
Jul 24, 2017 6:54:24 PM org.eltex.softwlc.sorm.replicator.processor.UdpSource.datagram-source#0
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Connected to socket 0.0.0.0:41813
Jul 24, 2017 6:54:26 PM com.hazelcast.nio.tcp.SocketAcceptorThread
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Accepting socket connection from /192.168.26.206:48830
Jul 24, 2017 6:54:26 PM com.hazelcast.nio.tcp.TcpIpConnectionManager
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Established socket connection between /192.168.26.225:5701 and /192.168.26.206:48830
Jul 24, 2017 6:54:32 PM com.hazelcast.internal.cluster.ClusterService
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2]
Members [2] {
Member [192.168.26.225]:5701 - af116710-cac6-4d5e-9c30-2ab04861c310 this
Member [192.168.26.206]:5701 - d5f107bb-9cf9-491b-b902-9e964d7efa17
}
Jul 24, 2017 6:54:32 PM com.hazelcast.internal.partition.impl.MigrationManager
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Re-partitioning cluster data... Migration queue size: 271
Jul 24, 2017 6:54:34 PM com.hazelcast.jet.impl.operation.InitOperation
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Initializing execution plan for job 10000 from [192.168.26.206]:5701.
Jul 24, 2017 6:54:34 PM com.hazelcast.internal.partition.impl.MigrationThread
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] All migration tasks have been completed, queues are empty.
Jul 24, 2017 6:54:34 PM com.hazelcast.jet.impl.operation.ExecuteOperation
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Start execution of plan for job 10000 from caller [192.168.26.206]:5701.
Jul 24, 2017 6:54:34 PM org.eltex.softwlc.sorm.replicator.processor.UdpSource.datagram-source#0
INFO: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Connecting to socket 0.0.0.0:41813
Jul 24, 2017 6:54:34 PM com.hazelcast.jet.impl.execution.ExecutionService
WARNING: [192.168.26.225]:5701 [sorm-replicator] [0.4] [3.8.2] Exception in ProcessorTasklet{vertex=datagram-source, processor=org.eltex.softwlc.sorm.replicator.processor.UdpSource#931ff2f}
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
What is correct way to close udp socket after cluster members were changed?

Related

Can't consume message that is enqeued by test

I am having an issue writing a basic test that publishes a message to a point-point queue.
When using an #JmsListener bean, the message is consumed.
When not using an #JmsListener and using a consumer obtained from the connectionFactory via the #Autowired JmsTemplate in the test class the message is not consumed.
I have added some logging and debug output and can not see why I can not consume the message inside the test class but an #JmsListener bean does.
#SpringBootTest
#ActiveProfiles("tc")
#Log4j2
public class SessionActiveMQIT {
#Autowired
public JmsTemplate jmsTemplate;
#Test
void canEnqueueAndPersistClientAck() throws JMSException, InterruptedException {
final ActiveMQQueue activeMQQueue = new ActiveMQQueue("TEST_QUEUE");
jmsTemplate.setDeliveryPersistent(true);
jmsTemplate.setSessionAcknowledgeMode(JmsProperties.AcknowledgeMode.CLIENT.getMode());
jmsTemplate.setSessionTransacted(true);
jmsTemplate.setDefaultDestination(activeMQQueue);
jmsTemplate.setPubSubDomain(false);
jmsTemplate.setPubSubNoLocal(false);
final ActiveMQTextMessage activeMQTextMessage = new ActiveMQTextMessage();
activeMQTextMessage.setText("MESSAGE");
activeMQTextMessage.setPersistent(true);
jmsTemplate.execute("TEST_QUEUE", ((session, messageProducer) -> {
try {
log.info("Sending to Queue.");
messageProducer.send(activeMQTextMessage, DeliveryMode.PERSISTENT, 4, 30000);
session.commit();
session.close();
log.info("Committed and Closed.");
} catch (Exception e) {
e.printStackTrace();
log.error(e.getMessage());
session.rollback();
session.close();
}
return session;
}));
log.info("Create session from conn factory.");
final Session session = jmsTemplate.getConnectionFactory().createConnection().createSession();
log.info("Consumer creation.");
final ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer) session.createConsumer(activeMQQueue);
log.info("Consume Message");
log.info(consumer.receive(100L));
}
}
The log output:
02 Mar 2021 16:48:34,298 [ INFO] --- o.a.a.b.BrokerService : Using Persistence Adapter: MemoryPersistenceAdapter
02 Mar 2021 16:48:34,438 [ INFO] --- o.a.a.b.BrokerService : Apache ActiveMQ 5.16.1 (localhost, ID:devbox-44103-1614703714311-0:1) is starting
02 Mar 2021 16:48:34,442 [DEBUG] --- o.a.a.b.j.Log4JConfigView : Could not locate log4j classes on classpath.
02 Mar 2021 16:48:34,442 [ INFO] --- o.a.a.b.BrokerService : Apache ActiveMQ 5.16.1 (localhost, ID:devbox-44103-1614703714311-0:1) started
02 Mar 2021 16:48:34,442 [ INFO] --- o.a.a.b.BrokerService : For help or more information please see: http://activemq.apache.org
02 Mar 2021 16:48:34,445 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding destination: topic://ActiveMQ.Advisory.MasterBroker
02 Mar 2021 16:48:34,452 [DEBUG] --- o.a.a.t.TaskRunnerFactory : Initialized TaskRunnerFactory[ActiveMQ BrokerService[localhost] Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor#55bf08a5[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
02 Mar 2021 16:48:34,456 [DEBUG] --- o.a.a.t.v.VMTransportFactory : binding to broker: localhost
02 Mar 2021 16:48:34,459 [ INFO] --- o.a.a.b.TransportConnector : Connector vm://localhost started
02 Mar 2021 16:48:34,463 [DEBUG] --- o.a.a.t.TaskRunnerFactory : Initialized TaskRunnerFactory[ActiveMQ VMTransport: vm://localhost#0] using ExecutorService: java.util.concurrent.ThreadPoolExecutor#297db6ad[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
02 Mar 2021 16:48:34,472 [DEBUG] --- o.a.a.t.TaskRunnerFactory : Initialized TaskRunnerFactory[ActiveMQ VMTransport: vm://localhost#1] using ExecutorService: java.util.concurrent.ThreadPoolExecutor#170437d4[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
02 Mar 2021 16:48:34,474 [DEBUG] --- o.a.a.b.TransportConnection : Setting up new connection id: ID:devbox-44103-1614703714311-4:1, address: vm://localhost#0, info: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:devbox-44103-1614703714311-4:1, clientId = ID:devbox-44103-1614703714311-3:1, clientIp = null, userName = admin, password = *****, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true, faultTolerant = false, failoverReconnect = false}
02 Mar 2021 16:48:34,475 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,475 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,475 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding destination: topic://ActiveMQ.Advisory.Connection
02 Mar 2021 16:48:34,480 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding consumer: ID:devbox-44103-1614703714311-4:1:-1:1 for destination: ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
02 Mar 2021 16:48:34,514 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding destination: queue://TEST_QUEUE
02 Mar 2021 16:48:34,529 [DEBUG] --- o.a.a.b.r.Queue : queue://TEST_QUEUE, subscriptions=0, memory=0%, size=0, pending=0 toPageIn: 0, force:false, Inflight: 0, pagedInMessages.size 0, pagedInPendingDispatch.size 0, enqueueCount: 0, dequeueCount: 0, memUsage:0, maxPageSize:200
02 Mar 2021 16:48:34,530 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,530 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,530 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding destination: topic://ActiveMQ.Advisory.Queue
02 Mar 2021 16:48:34,532 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,532 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,532 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding destination: topic://ActiveMQ.Advisory.Producer.Queue.TEST_QUEUE
02 Mar 2021 16:48:34,534 [ INFO] --- m.a.w.c.SessionActiveMQIT : Sending to Queue.
02 Mar 2021 16:48:34,535 [DEBUG] --- o.a.a.TransactionContext : Begin:TX:ID:devbox-44103-1614703714311-4:1:1
02 Mar 2021 16:48:34,536 [DEBUG] --- o.a.a.ActiveMQSession : ID:devbox-44103-1614703714311-4:1:1 Transaction Commit :TX:ID:devbox-44103-1614703714311-4:1:1
02 Mar 2021 16:48:34,536 [DEBUG] --- o.a.a.TransactionContext : Commit: TX:ID:devbox-44103-1614703714311-4:1:1 syncCount: 0
02 Mar 2021 16:48:34,539 [DEBUG] --- o.a.a.t.LocalTransaction : commit: TX:ID:devbox-44103-1614703714311-4:1:1 syncCount: 1
02 Mar 2021 16:48:34,540 [DEBUG] --- o.a.a.b.r.Queue : localhost Message ID:devbox-44103-1614703714311-4:1:1:1:1 sent to queue://TEST_QUEUE
02 Mar 2021 16:48:34,541 [ INFO] --- m.a.w.c.SessionActiveMQIT : Committed and Closed.
02 Mar 2021 16:48:34,541 [DEBUG] --- o.a.a.b.r.Queue : queue://TEST_QUEUE, subscriptions=0, memory=0%, size=1, pending=0 toPageIn: 1, force:false, Inflight: 0, pagedInMessages.size 0, pagedInPendingDispatch.size 0, enqueueCount: 1, dequeueCount: 0, memUsage:1038, maxPageSize:200
02 Mar 2021 16:48:34,545 [ INFO] --- m.a.w.c.SessionActiveMQIT : Create session from conn factory.
02 Mar 2021 16:48:34,545 [DEBUG] --- o.a.a.b.j.ManagementContext : Unregistering MBean org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Queue,destinationName=TEST_QUEUE,endpoint=Producer,clientId=ID_devbox-44103-1614703714311-3_1,producerId=ID_devbox-44103-1614703714311-4_1_1_1
02 Mar 2021 16:48:34,546 [ INFO] --- m.a.w.c.SessionActiveMQIT : Consumer creation.
02 Mar 2021 16:48:34,546 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,546 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,552 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding consumer: ID:devbox-44103-1614703714311-4:1:2:1 for destination: queue://TEST_QUEUE
02 Mar 2021 16:48:34,558 [DEBUG] --- o.a.a.b.r.Queue : queue://TEST_QUEUE add sub: QueueSubscription: consumer=ID:devbox-44103-1614703714311-4:1:2:1, destinations=0, dispatched=0, delivered=0, pending=0, prefetch=1000, prefetchExtension=0, dequeues: 0, dispatched: 0, inflight: 0
02 Mar 2021 16:48:34,560 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,560 [DEBUG] --- o.a.a.b.r.Queue : queue://TEST_QUEUE, subscriptions=1, memory=0%, size=1, pending=0 toPageIn: 1, force:false, Inflight: 0, pagedInMessages.size 0, pagedInPendingDispatch.size 0, enqueueCount: 1, dequeueCount: 0, memUsage:1038, maxPageSize:200
02 Mar 2021 16:48:34,560 [DEBUG] --- o.a.a.b.TransportConnector : Publishing: vm://localhost for broker transport URI: vm://localhost
02 Mar 2021 16:48:34,560 [DEBUG] --- o.a.a.b.r.AbstractRegion : localhost adding destination: topic://ActiveMQ.Advisory.Consumer.Queue.TEST_QUEUE
02 Mar 2021 16:48:34,562 [ INFO] --- m.a.w.c.SessionActiveMQIT : Consume Message
02 Mar 2021 16:48:34,662 [ INFO] --- m.a.w.c.SessionActiveMQIT : null
I believe you need to call start() on your instance of javax.jms.Connection in order to get messages to flow to the consumer, e.g.:
final Connection connection = jmsTemplate.getConnectionFactory().createConnection();
final Session session = connection.createSession();
connection.start()
Also, be sure to close your resources (i.e. connection, session, consumer) when you're done with them. Currently they just fall out of scope which means they are being leaked. I understand this is just a test, but even still it's good practice.

When I try to lift a docker container it doesn't load the apache web

When up a container with apache, I cannot access the route.
My docker-compose:
version: '3'
services:
tomcat:
container_name: tomcatSimple
image: tomcat:9.0.27-jdk8-corretto
restart: always
ports:
- '8090:8080'
volumes:
- tomcat_webapps:/usr/local/tomcat/webapps
volumes:
tomcat_webapps:
with docker-ps i can see the container
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e6a608431f8a tomcat:9.0.27-jdk8-corretto "catalina.sh run" 53 minutes ago Up 8 minutes 0.0.0.0:8090->8080/tcp tomcatSimple
with docker inspect e6a608431f8a
{
"Id": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
"Created": "2019-10-31T11:45:28.6292202Z",
"Path": "catalina.sh",
"Args": [
"run"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 294,
"ExitCode": 0,
"Error": "",
"StartedAt": "2019-10-31T12:29:47.6437158Z",
"FinishedAt": "2019-10-31T13:04:58.5282453+01:00"
},
"Image": "sha256:30dd95129d60bfe08aaacd21fdb8022bd6c1e328997bae5254658453aa602379",
"ResolvConfPath": "",
"HostnamePath": "",
"HostsPath": "",
"LogPath": "C:\\ProgramData\\Docker\\containers\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3-json.log",
"Name": "/tomcatSimple",
"RestartCount": 0,
"Driver": "lcow",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"trydocker_tomcat_webapps:/usr/local/tomcat/webapps:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "trydocker_default",
"PortBindings": {
"8080/tcp": [
{
"HostIp": "",
"HostPort": "8090"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Capabilities": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 0,
"ConsoleSize": [
0,
0
],
"Isolation": "hyperv",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"dir": "C:\\ProgramData\\Docker\\lcow\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3"
},
"Name": "lcow"
},
"Mounts": [
{
"Type": "volume",
"Name": "trydocker_tomcat_webapps",
"Source": "C:\\ProgramData\\Docker\\volumes\\trydocker_tomcat_webapps\\_data",
"Destination": "/usr/local/tomcat/webapps",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "e6a608431f8a",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/tomcat/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto",
"CATALINA_HOME=/usr/local/tomcat",
"TOMCAT_NATIVE_LIBDIR=/usr/local/tomcat/native-jni-lib",
"LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib",
"GPG_KEYS=05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23",
"TOMCAT_MAJOR=9",
"TOMCAT_VERSION=9.0.27",
"TOMCAT_SHA512=408d30bf56d59941149b397e5e725a5f9baf225807397a4b7a3be79f7d211e6d878d34bf00776746a54cc7d067f168db24c367e5c7390bb7329b3bca428726cc"
],
"Cmd": [
"catalina.sh",
"run"
],
"Image": "tomcat:9.0.27-jdk8-corretto",
"Volumes": {
"/usr/local/tomcat/webapps": {}
},
"WorkingDir": "/usr/local/tomcat",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "61e1ab2b8140f4f4e6a215a0eb5350b5512f40571133f1313b1fc9f7a0af2a57",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "trydocker",
"com.docker.compose.service": "tomcat",
"com.docker.compose.version": "1.24.1"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8080/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8090"
}
]
},
"SandboxKey": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"trydocker_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"tomcat",
"e6a608431f8a"
],
"NetworkID": "2b43c6dd8527271224208b671bc29b54ad0b4819d175cca7e6d976abc550caf2",
"EndpointID": "33c6cb0e77a251b44ec5f6d1141098fabd876af46fba9ff92549f44e655ebcae",
"Gateway": "172.22.128.1",
"IPAddress": "172.22.135.63",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "00:15:5d:01:0d:c6",
"DriverOpts": null
}
}
}
}
It seems that everything is correct, but when accessing the localhost:8090
it doesn't show me tomcat's welcome screen
Estado HTTP 404 – No encontrado
Tipo Informe de estado
mensaje Not found
Descripción El recurso requerido no está disponible.
Apache Tomcat/9.0.2
My logs
31-Oct-2019 11:45:30.796 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.27
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2019 09:57:22 UTC
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.27-linuxkit
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_232-b09
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Amazon.com Inc.
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3].
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
31-Oct-2019 11:45:30.838 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips 26 Jan 2017]
31-Oct-2019 11:45:31.144 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 11:45:31.178 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 11:45:31.181 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [691] milliseconds
31-Oct-2019 11:45:31.224 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2019 11:45:31.224 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
31-Oct-2019 11:45:31.240 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
31-Oct-2019 11:45:31.255 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 11:45:31.260 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [78] milliseconds
31-Oct-2019 12:04:57.477 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.483 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:04:57.484 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
31-Oct-2019 12:04:57.486 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.489 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:04:57.498 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.499 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.27
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2019 09:57:22 UTC
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.27-linuxkit
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre
31-Oct-2019 12:29:47.042 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_232-b09
31-Oct-2019 12:29:47.042 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Amazon.com Inc.
31-Oct-2019 12:29:47.043 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
31-Oct-2019 12:29:47.043 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
31-Oct-2019 12:29:47.044 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2019 12:29:47.044 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2019 12:29:47.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2019 12:29:47.046 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2019 12:29:47.046 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2019 12:29:47.047 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
31-Oct-2019 12:29:47.047 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2019 12:29:47.048 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2019 12:29:47.048 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2019 12:29:47.049 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3].
31-Oct-2019 12:29:47.049 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
31-Oct-2019 12:29:47.050 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
31-Oct-2019 12:29:47.055 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips 26 Jan 2017]
31-Oct-2019 12:29:47.307 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:29:47.335 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.342 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [455] milliseconds
31-Oct-2019 12:29:47.372 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2019 12:29:47.372 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
31-Oct-2019 12:29:47.390 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:29:47.402 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.409 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [66] milliseconds

MFP 7.1 - FWLSE0342E: Grant code validation failed: Grant code was already used

Facing Grand code validation failed issue when client request is made for one of the adapter.
This happens only in cluster environment. We have configured it as Round Robin.
When running server independently one or the other we don't see this issue. This issue arrises when both are up and running.
Logs from Application server messages.log
[INFO ] SRVE0242I: [DHSProject] [/DHSProject] [PushWorksApplication]: Initialization successful.
[INFO ] The following JAX-RS application has been processed: com.ibm.ws.jaxrs.webcontainer.JAXRSDefaultApplicationSubclassProxy
[INFO ] The server has registered the JAX-RS resource class com.worklight.oauth.TokenValidationEndpoint with #Path(/validation).
[INFO ] The server has registered the JAX-RS resource class com.worklight.oauth.TokenEndpoint with #Path(/token).
[INFO ] There are no custom JAX-RS providers defined in the application.
[INFO ] SRVE0242I: [DHSProject] [/DHSProject] [AuthorizationServer]: Initialization successful.
[AUDIT ] CWWKZ0001I: Application DHSProject started in 64.058 seconds.
[INFO ] FWLSE0277I: Creating an ILMT record in the file '/var/opt/IBM/WebSphere/Liberty/usr/servers/mobilefirst/logs/ae6695ccf7cfe74ee108bf753b1a76d5.slmtag'.
[INFO ] Resource conf/jndi/default.properties not found. This is not an error. Context path is /worklightconsole
[INFO ] The endpoint used to invoke the MFP administration services is https://MyHostname:443/worklightadmin
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] Detected Liberty farm runtime
[INFO ] SRVE0242I: [DHSProject] [/DHSProject] [RESTAdaptersServiceServlet]: Initialization successful.
[INFO ] SRVE0242I: [DHSProject] [/DHSProject] [GadgetAPIServlet]: Initialization successful.
[INFO ] SRVE0242I: [DHSProject] [/DHSProject] [ClientLogUploaderServlet]: Initialization successful.
[ERROR ] FWLSE0342E: Grant code validation failed: Grant code was already used. ClientId:0459405be995d13e209ac40d56c1d73a6eee8ec6, sessionId:187AE2B5-1673-41CA-87EB-8BFA0FDC7772, grant code:CkvKJl4tDyIaTtcKb1KiBwYMhaWdvHq60z6PsdbbyPGAv-TnU4RP1Vqldw-qVWLyqmychO0FST_myOJKzaZDnx9zG5ZbtkR1uV34QvW4F-g7rXJdMsG1XdnIVkq5RAJaSVogUNfEGGeMM4W3UbwbISTCKhPbuu3esBzKh86fCRg [project DHSProject]
Grant code was already used
[ERROR ] FWLSE0342E: Grant code validation failed: Grant code was already used. ClientId:0459405be995d13e209ac40d56c1d73a6eee8ec6, sessionId:17E31752-B5FB-46D0-843C-407893F2417F, grant code:arVpm_yAPDg3Q28uFtBzSP-6PVh6Os-LXSkTcszKeoBANO3TJhW1ydNfej4KvsfhkTEQI7alzdlFsop9QvdzQP_NFh5q7LsHPOSIV5YE6lnBfwzkeKDRMCZnjvOECT7P_hiLdGPzEYFB8vhSHnHusB4jrdkV4a96-LIMOi9cXMY [project DHSProject]
Grant code was already used
[ERROR ] FWLSE0342E: Grant code validation failed: Grant code was already used. ClientId:0459405be995d13e209ac40d56c1d73a6eee8ec6, sessionId:17E31752-B5FB-46D0-843C-407893F2417F, grant code:JVckFNnonbcw0UpoZ7-Iq7CmXWBgYXofD0cavY_9ctIUN1dIqK3K_WsqSJoUPEAgONSSvyyjBdVNkU5tova_XiYQ7bO_mlcaB2ynQJNQX-X3RU-4yXhaS9zdPkV5o0aBUQGUqN2L7aeArxVi-yTRnQNiDf4UyOzJ0R310efebts [project DHSProject]
Grant code was already used
This is the log from my Mobile device Iphone
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/29 19:42:47
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: SessionTimeoutService elapsedTime : NaN
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] Constructing
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] open method GET url https://myhostname:443/MYProject/adapters/FaqAdapter/faqs
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name Authorization value Bearer eyJhbGciOiJSUzI1NiIsImpwayI6eyJhbGciOiJSU0EiLCJleHAiOiJBUUFCIiwibW9kIjoiQU1VTDg0WXZiN0RXVVpaUFRlaEIydUVwT2Mwd0ZNLXdPQ05aODFLQTkyYkc4Sm00UlNCNUQyU2xiU2U3UGlQVVZfcmJsd1BrSWQ2NWdvLTExaDg5Y0ltZDQxc0NxcnY4Q3hzVThGYUNVV1Q5TXl6Sy1tR2RBeWJGOTNUWTM2WEVUaC1tMzVGcE9qeG1abXpFVFcxalZZU1N2eDVzNFFjOXZfdDZaTG9ZN0VIOEMySjZucXdwcENqMlhVR1MwWWhLYkNEYWlXRmcwTURTbHNIWWdVaGJqZXloTVdZWHM1WnVKeUc3SmNUQ0V2OENScVdVNEIwMEV3a3hOZUxnRHVTd3RXdVI1MnYtY19vNm41Wi1VODhwRGU3MG51RWVhYmIxX21EQXE0T3cyUTIzakdmR2hCa1Z4OHlhR2NtZjFfMkozbmtvRGJQWF9vR25MbXA0dDltRFpZOCJ9fQ.eyJleHAiOjE0NjE1MTMzMDIsImltZi5zY29wZSI6eyJ3bF9kaXJlY3RVcGRhdGVSZWFsbSI6eyJleHAiOjE0NjE1MTMyODcsIm1hbmRhdG9yeSI6dHJ1ZX0sIndsX3JlbW90ZURpc2FibGVSZWFsbSI6eyJleHAiOjE0NjE1MDk5ODcsIm1hbmRhdG9yeSI6dHJ1ZX0sIndsX2FudGlYU1JGUmVhbG0iOnsiZXhwIjoxNDYxNTEzMjg4LCJtYW5kYXRvcnkiOnRydWV9LCJ3bF9kZXZpY2VOb1Byb3Zpc2lvbmluZ1JlYWxtIjp7ImV4cCI6MTQ2MTUxMzI4NywibWFuZGF0b3J5Ijp0cnVlfSwid2xfYW5vbnltb3VzVXNlclJlYWxtIjp7ImV4cCI6MTQ2MTUxMzI4NywibWFuZGF0b3J5Ijp0cnVlfX0sImlzcyI6Imh0dHBzOlwvXC91YXRjc3Btb2JpbGUuZGhzLmdhLmdvdjo0NDNcL0RIU1Byb2plY3RcL2F1dGhvcml6YXRpb25cLyIsInBybiI6IjA0NTk0MDViZTk5NWQxM2UyMDlhYzQwZDU2YzFkNzNhNmVlZThlYzYifQ.uyvCAj7zER-golAnI5bziibDHcS4ug1j1u20LSICNUHYTj3Dsmp4vxr5A8zZoylzVIDqEyu3PrtVGhIO58Ywjfr-W13n07IFtAGtWBp2a_ELy6z0lJsfy4-6sNW0YHoJxeUj6UeoZJJkUg6lXBa6sMaNebhY7Sfv_CwF_sh_4KsZprpRWhJmI2XPNqNcbpFrhzcFfIPjh0ANhIWDpeJDLcU6Bs4YNCw0yUcHxd2izlwGdBrh4ErlUsrPkSTvSSYOKwicO7s-XtG-4o4SzwfItjtvzjuS6M0SHgtRWUe8pgabf9G9bvK_AalU2IKzYtrOL1GDIM8djcI3MULNM2q25A eyJhbGciOiJSUzI1NiIsImpwayI6eyJhbGciOiJSU0EiLCJleHAiOiJBUUFCIiwibW9kIjoiQU1VTDg0WXZiN0RXVVpaUFRlaEIydUVwT2Mwd0ZNLXdPQ05aODFLQTkyYkc4Sm00UlNCNUQyU2xiU2U3UGlQVVZfcmJsd1BrSWQ2NWdvLTExaDg5Y0ltZDQxc0NxcnY4Q3hzVThGYUNVV1Q5TXl6Sy1tR2RBeWJGOTNUWTM2WEVUaC1tMzVGcE9qeG1abXpFVFcxalZZU1N2eDVzNFFjOXZfdDZaTG9ZN0VIOEMySjZucXdwcENqMlhVR1MwWWhLYkNEYWlXRmcwTURTbHNIWWdVaGJqZXloTVdZWHM1WnVKeUc3SmNUQ0V2OENScVdVNEIwMEV3a3hOZUxnRHVTd3RXdVI1MnYtY19vNm41Wi1VODhwRGU3MG51RWVhYmIxX21EQXE0T3cyUTIzakdmR2hCa1Z4OHlhR2NtZjFfMkozbmtvRGJQWF9vR25MbXA0dDltRFpZOCJ9fQ.eyJleHAiOjE0NjE1MTMzMDIsInN1YiI6Ijo6MDQ1OTQwNWJlOTk1ZDEzZTIwOWFjNDBkNTZjMWQ3M2E2ZWVlOGVjNiIsImltZi5hbmFseXRpY3MiOnsiaWQiOiJEQ1NTTW9iaWxlQXBwIiwiZW52aXJvbm1lbnQiOiJpcGhvbmUiLCJ2ZXJzaW9uIjoiMS4wIn0sImltZi5hcHBsaWNhdGlvbiI6eyJpZCI6IkRDU1NNb2JpbGVBcHAiLCJlbnZpcm9ubWVudCI6ImlwaG9uZSIsInZlcnNpb24iOiIxLjAifSwiaXNzIjoiaHR0cHM6XC9cL3VhdGNzcG1vYmlsZS5kaHMuZ2EuZ292OjQ0M1wvREhTUHJvamVjdFwvYXV0aG9yaXphdGlvblwvIiwiaWF0IjoxNDYxNTA5NzAyLCJpbWYuZGV2aWNlIjp7ImlkIjoiMTYyMTEzOTAtQjYxMS00NUE1LUFCRjItRTUxM0M2NTQzREYwIiwicGxhdGZvcm0iOiJpT1MiLCJtb2RlbCI6ImlQaG9uZSIsIm9zVmVyc2lvbiI6IjkuMy4xIn19.Cy2PdsqyngYDyNHtQsqXMFavXJW8ZHKYbYgEkyqbI12LZzGQEqAtMXn_WaAEfMiDvL1FO-rzB7pU1rvyFTfwpW2WmIBJZXVfxg5YGQPJDAhPCGo3lOU23BBRnQgr62zG57IVUmN23HBNgfmFuOv4NawJYoKYNDgs9ChRNC_ZVFkek27ECU1xOLMW59u_yJ9ZmYwQSVG34rrWgUwgAJ0HOhFzH04Pl3tKxPuva5W1I1elAWhLLuLtmCGytumsZJOaJHeXpAkU2vGEnrE0hk2bScAAIiqRmvGV4MYd9qyR06-z2MZSXo3r7sfWpl-gvCH99rrGzCSP7C8BL45dv-mh9w
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] send
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is https://myhostname:443/MYProject/adapters/FaqAdapter/faqs
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:332 :: Starting the request with URL https://myhostname:443/MYProject/adapters/FaqAdapter/faqs
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:364 :: Request Failed
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:365 :: Response Status Code : 403
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:366 :: Response Error : Request failed: forbidden (403)
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/29 19:42:47
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [NONE] Request [https://myhostname:443/MYProject/authorization/v1/authorization]
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [NONE] Application details header: {"applicationDetails":{"platformVersion":"7.1.0.0","nativeVersion":"193323332","skinName":"default","skinChecksum":3762916697,"skinLoaderChecksum":"(null)"}}
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '17.318848' ms. Plugin should use a background thread.
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] Constructing
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] open method GET url https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.8985385324340314
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-Requested-With value XMLHttpRequest
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name Accept value text/javascript, text/html, application/xml, text/xml, */*
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name Accept-Language value en-US
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name x-wl-app-version value 1.0
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name x-wl-app-details value {"applicationDetails":{"platformVersion":"7.1.0.0","nativeVersion":"193323332","skinName":"default","skinChecksum":3762916697,"skinLoaderChecksum":"(null)"}}
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-WL-Session value 17E31752-B5FB-46D0-843C-407893F2417F
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-WL-ClientId value 0459405be995d13e209ac40d56c1d73a6eee8ec6
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-WL-S-ClientId value eyJhbGciOiJSUzI1NiIsImpwayI6eyJhbGciOiJSU0EiLCJtb2QiOiJBSl9QbmI5aVpvQVNRcFFYZEc0NzNHQnctV3FCcFNITGw1N1ZIdG8yZHQyR2dULTUzM0o0TFpwaEpkX2gyYnJMa0h5MmFqZUZYYlRWVXhJQTVja290MkU9IiwiZXhwIjoiQVFBQiJ9fQ==.eyJjbGllbnRJZCI6IjA0NTk0MDViZTk5NWQxM2UyMDlhYzQwZDU2YzFkNzNhNmVlZThlYzYifQ==.U4ls1NvDvDA5aDiL3XN4vaBITv2pI0WQLi6PwYEjjFvJpqgMeyGiFuOjB4idjWgZGQOBSXIAVo3ykLhAPHcUyw==
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] send
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.8985385324340314
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:332 :: Starting the request with URL https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.8985385324340314
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:364 :: Request Failed
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:365 :: Response Status Code : 401
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:366 :: Response Error : Request failed: unauthorized (401)
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/29 19:42:47
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:71 :: returning UUID from the keychain
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [NONE] Application details header: {"applicationDetails":{"platformVersion":"7.1.0.0","nativeVersion":"193323332","skinName":"default","skinChecksum":3762916697,"skinLoaderChecksum":"(null)"}}
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [NONE] Request [https://myhostname:443/MYProject/authorization/v1/authorization]
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '12.122803' ms. Plugin should use a background thread.
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] Constructing
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] open method GET url https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.5182551073376089
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-Requested-With value XMLHttpRequest
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name Accept value text/javascript, text/html, application/xml, text/xml, */*
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name Accept-Language value en-US
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name x-wl-app-version value 1.0
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name x-wl-app-details value {"applicationDetails":{"platformVersion":"7.1.0.0","nativeVersion":"193323332","skinName":"default","skinChecksum":3762916697,"skinLoaderChecksum":"(null)"}}
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name Authorization value {"wl_deviceNoProvisioningRealm":{"ID":{"token":"jc8scbrogj2cstljm4e6f6osov","app":{"id":"MyMobileApp","version":"1.0"},"device":{"id":"16211390-B611-45A5-ABF2-E513C6543DF0","os":"9.3.1","model":"iPhone7,2","environment":"iphone"},"custom":{}}}}
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-WL-Session value 17E31752-B5FB-46D0-843C-407893F2417F
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-WL-ClientId value 0459405be995d13e209ac40d56c1d73a6eee8ec6
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] setRequestHeader name X-WL-S-ClientId value eyJhbGciOiJSUzI1NiIsImpwayI6eyJhbGciOiJSU0EiLCJtb2QiOiJBSl9QbmI5aVpvQVNRcFFYZEc0NzNHQnctV3FCcFNITGw1N1ZIdG8yZHQyR2dULTUzM0o0TFpwaEpkX2gyYnJMa0h5MmFqZUZYYlRWVXhJQTVja290MkU9IiwiZXhwIjoiQVFBQiJ9fQ==.eyJjbGllbnRJZCI6IjA0NTk0MDViZTk5NWQxM2UyMDlhYzQwZDU2YzFkNzNhNmVlZThlYzYifQ==.U4ls1NvDvDA5aDiL3XN4vaBITv2pI0WQLi6PwYEjjFvJpqgMeyGiFuOjB4idjWgZGQOBSXIAVo3ykLhAPHcUyw==
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WLNativeXHR] send
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.5182551073376089
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:332 :: Starting the request with URL https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.5182551073376089
Apr 24 11:23:45 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:364 :: Request Failed
Apr 24 11:23:46 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:365 :: Response Status Code : 401
Apr 24 11:23:46 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:366 :: Response Error : Request failed: unauthorized (401)
Apr 24 11:23:46 My-iPhone MyMobileApp[794] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/29 19:42:47
Apr 24 11:23:46 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:71 :: returning UUID from the keychain
Apr 24 11:23:46 My-iPhone MyMobileApp[794] <Warning>: [TRACE] [NONE] Application details header: {"applicationDetails":{"platformVersion":"7.1.0.0","nativeVersion":"193323332","skinName":"default","skinChecksum":3762916697,"skinLoaderChecksum":"(null)"}}
If you observe in client log when mobile app invokes one of the Adapter
GET url https://myhostname:443/MYProject/adapters/FaqAdapter/faqs
second call it makes for Authorization which return as 401. This authorization call is made in loop for many times and finally fails
https://myhostname:443/MYProject/authorization/v1/authorization?response_type=code&client_id=0459405be995d13e209ac40d56c1d73a6eee8ec6&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.8985385324340314
Probably the Grand code is issued by one server from cluster but the same code failed on another server. Perhaps the Grand code is not in snyc between 2 cluster servers.
My worklight Properties
mfp.session.independent=false
serverSessionTimeout=10
mfp.attrStore.type=httpSession
Taking in the following parameters that you explained:
You run in session-mode.
It fails only when you run multiple servers.
This strongly leads me to believe that you do not correctly follow the requirement of using sticky sessions. Meaning, each client session must always use the same server. If the client switches between server, then the session is lost and the context of the request is lost as well.
Or, alternatively, you can switch to session independent mode if you do not want to use sticky sessions.

Hibernate 4.2.2 The Network Adapter could not establish the connection

I've been working through several Hibernate Tutorial but the application won't run. I get a JDBCConnectionException.
I think maybe there is something wrong with the connection settings: "ERROR: I/O-Fehler: The Network Adapter could not establish the connection"
Therefore I linked the SQL Developer Settings and my hibernate.cfg.xml.
Link to SQL Developer Settings
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:#localhost:1521:xe</property>
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<!-- SQL dialect -->
<property name="dialect"> org.hibernate.dialect.Oracle10gDialect</property>
<mapping resource="TEST.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Here is the Main Class:
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
import org.hibernate.Session;
import org.hibernate.Query;
import org.hibernate.cfg.Configuration;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import java.util.Map;
public class Main {
private static final SessionFactory ourSessionFactory;
private static final ServiceRegistry serviceRegistry;
static {
try {
Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
ourSessionFactory = configuration.buildSessionFactory(serviceRegistry);
} catch (Throwable ex) {
throw new ExceptionInInitializerError(ex);
}
}
public static Session getSession() throws HibernateException {
return ourSessionFactory.openSession();
}
public static void main(final String[] args) throws Exception {
final Session session = getSession();
final Test a1 = new Ankuendigung(3,"AA", "AAAA");
session.beginTransaction();
session.save(a1);
session.getTransaction().commit();
try {
System.out.println("querying all the managed entities...");
final Map metadataMap = session.getSessionFactory().getAllClassMetadata();
for (Object key : metadataMap.keySet()) {
final ClassMetadata classMetadata = (ClassMetadata) metadataMap.get(key);
final String entityName = classMetadata.getEntityName();
final Query query = session.createQuery("from " + entityName);
System.out.println("executing: " + query.getQueryString());
for (Object o : query.list()) {
System.out.println(" " + o);
}
}
} finally {
session.close();
}
}
}
Here is the complete stacktrace:
Apr 19, 2016 11:31:22 AM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
Apr 19, 2016 11:31:22 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.2.Final}
Apr 19, 2016 11:31:22 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Apr 19, 2016 11:31:22 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Apr 19, 2016 11:31:22 AM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
Apr 19, 2016 11:31:22 AM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
Apr 19, 2016 11:31:22 AM org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: Ankuendigung.hbm.xml
Apr 19, 2016 11:31:22 AM org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
Apr 19, 2016 11:31:22 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
Apr 19, 2016 11:31:22 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
Apr 19, 2016 11:31:22 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
Apr 19, 2016 11:31:22 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [oracle.jdbc.driver.OracleDriver] at URL [jdbc:oracle:thin:#localhost:1521:xe]
Apr 19, 2016 11:31:22 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=vias, password=****}
Apr 19, 2016 11:31:25 AM org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure
WARN: HHH000342: Could not obtain connection to query metadata : I/O-Fehler: The Network Adapter could not establish the connection
Apr 19, 2016 11:31:25 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
Apr 19, 2016 11:31:25 AM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000422: Disabling contextual LOB creation as connection was null
Apr 19, 2016 11:31:25 AM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
Apr 19, 2016 11:31:25 AM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
Apr 19, 2016 11:31:27 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 17002, SQLState: 08006
Apr 19, 2016 11:31:27 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: I/O-Fehler: The Network Adapter could not establish the connection
Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Could not open connection
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:221)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:157)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1426)
at Main.main(Main.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.sql.SQLRecoverableException: I/O-Fehler: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:204)
at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:214)
... 10 more
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:439)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:454)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:693)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:251)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
... 17 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:149)
at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:405)
... 22 more
Process finished with exit code 1
Thanks a lot!
The Problem is solved!!!
The URL was wrong (Thanks to Mohamed) and I had to add the configuration details from the Sql Developer settings (Host, Port & SID).
<property name="connection.url">jdbc:oracle:thin:#000.000.000.000:1111:xe</property>
I think the Url is not valid
<property name="connection.url">000.000.000.000:11111</property>
try this out :
<property name="connection.url">jdbc:oracle:thin:#localhost:1521:orcl</property>
orcl is the default instance name, You can find the SID/SERVICE name in your tnsnames.ora file.

error happened when use red5-client to connect remote red5 server

First I use adobe flash player to connect my red5 server(using rtmps protocal) and it success
rtmps://myred5ServerName:443/live
15:29:05:203 - NetConnection.Connect.Success
But When I use Red5Client to try to connect it , it failed.
I just used the Example code ClientTest.java
public class ClientTest extends RTMPSClient {
private String server = "myred5ServerName";
//private int port = 1935;
//private int port = 5080;
private int port = 443;
//private String application = "oflaDemo";
private String application = "RtmpRelay";
private String filename = "hobbit_vp6.flv";
// live stream (true) or vod stream (false)
private boolean live;
private static boolean finished = false;
public static void main(String[] args) throws InterruptedException {
final ClientTest player = new ClientTest();
// decide whether or not the source is live or vod
//player.setLive(true);
// connect
player.connect();
synchronized (ClientTest.class) {
if (!finished) {
ClientTest.class.wait();
}
}
System.out.println("Ended");
}
public void connect() {
setExceptionHandler(new ClientExceptionHandler() {
#Override
public void handleException(Throwable throwable) {
throwable.printStackTrace();
}
});
setStreamEventDispatcher(streamEventDispatcher);
connect(server, port, application, connectCallback);
}
private IEventDispatcher streamEventDispatcher = new IEventDispatcher() {
public void dispatchEvent(IEvent event) {
System.out.println("ClientStream.dispachEvent()" + event.toString());
}
};
private IPendingServiceCallback methodCallCallback = new IPendingServiceCallback() {
public void resultReceived(IPendingServiceCall call) {
System.out.println("methodCallCallback");
Map<?, ?> map = (Map<?, ?>) call.getResult();
System.out.printf("Response %s\n", map);
}
};
public void getFlvList() {
invoke("demoService.getListOfAvailableFLVs", new Object[] {}, methodCallCallback);
}
public void test() {
new Thread() {
#Override
public void run() {
for (int i = 0; i < 100; ++i) {
getFlvList();
}
}
}.start();
}
private IPendingServiceCallback connectCallback = new IPendingServiceCallback() {
public void resultReceived(IPendingServiceCall call) {
System.out.println("connectCallback");
ObjectMap<?, ?> map = (ObjectMap<?, ?>) call.getResult();
String code = (String) map.get("code");
System.out.printf("Response code: %s\n", code);
if ("NetConnection.Connect.Rejected".equals(code)) {
System.out.printf("Rejected: %s\n", map.get("description"));
disconnect();
synchronized (ClientTest.class) {
finished = true;
ClientTest.class.notifyAll();
}
} else if ("NetConnection.Connect.Success".equals(code)) {
test();
createStream(createStreamCallback);
}
}
};
private IPendingServiceCallback createStreamCallback = new IPendingServiceCallback() {
public void resultReceived(IPendingServiceCall call) {
int streamId = (Integer) call.getResult();
/*
NetStream.play(name, start, length, reset)
- start An optional numeric parameter that specifies the start time, in seconds. This parameter can also be used to indicate whether the stream is live or recorded.
The default value for start is -2, which means that Flash Player first tries to play the live stream specified in name. If a live stream of that name is not found,
Flash Player plays the recorded stream specified in name. If neither a live nor a recorded stream is found, Flash Player opens a live stream named name, even
though no one is publishing on it. When someone does begin publishing on that stream, Flash Player begins playing it.
If you pass -1 for start, Flash Player plays only the live stream specified in name. If no live stream is found, Flash Player waits for it indefinitely
if len is set to -1; if len is set to a different value, Flash Player waits for len seconds before it begins playing the next item in the playlist.
If you pass 0 or a positive number for start, Flash Player plays only a recorded stream named name, beginning start seconds from the beginning of the stream.
If no recorded stream is found, Flash Player begins playing the next item in the playlist immediately.
If you pass a negative number other than -1 or -2 for start, Flash Player interprets the value as if it were -2.
- len An optional numeric parameter that specifies the duration of the playback, in seconds.
The default value for len is -1, which means that Flash Player plays a live stream until it is no longer available or plays a recorded stream until it ends.
If you pass 0 for len, Flash Player plays the single frame that is start seconds from the beginning of a recorded stream (assuming that start is equal to or greater than 0).
If you pass a positive number for len, Flash Player plays a live stream for len seconds after it becomes available, or plays a recorded stream for len seconds.
(If a stream ends before len seconds, playback ends when the stream ends.)
If you pass a negative number other than -1 for len, Flash Player interprets the value as if it were -1.
- reset An optional Boolean value or number that specifies whether to flush any previous playlist. If reset is false (0), name is added (queued) in the current playlist;
that is, name plays only after previous streams finish playing. You can use this technique to create a dynamic playlist. If reset is true (1), any previous play calls
are cleared and name is played immediately. By default, the value is true.
You can also specify a value of 2 or 3 for the reset parameter, which is useful when playing recorded stream files that contain message data. These values are analogous to
passing false (0) and true (1), respectively: a value of 2 maintains a playlist, and a value of 3 resets the playlist. However, the difference is that specifying 2 or 3 for
reset causes Flash Media Server to return all messages in the recorded stream file at once, rather than at the intervals at which the messages were originally recorded
(the default behavior).
*/
// live buffer 0.5s / vod buffer 4s
if (live) {
conn.ping(new Ping(Ping.CLIENT_BUFFER, streamId, 500));
play(streamId, filename, -1, -1);
} else {
conn.ping(new Ping(Ping.CLIENT_BUFFER, streamId, 4000));
play(streamId, filename, 0, -1);
}
}
};
#SuppressWarnings("unchecked")
protected void onCommand(RTMPConnection conn, Channel channel, Header header, Notify notify) {
super.onCommand(conn, channel, header, notify);
System.out.println("onInvoke, header = " + header.toString());
System.out.println("onInvoke, notify = " + notify.toString());
Object obj = notify.getCall().getArguments().length > 0 ? notify.getCall().getArguments()[0] : null;
if (obj instanceof Map) {
Map<String, String> map = (Map<String, String>) obj;
String code = map.get("code");
if (StatusCodes.NS_PLAY_STOP.equals(code)) {
synchronized (ClientTest.class) {
finished = true;
ClientTest.class.notifyAll();
}
disconnect();
System.out.println("Disconnected");
}
}
}
/**
* #return the live
*/
public boolean isLive() {
return live;
}
/**
* #param live the live to set
*/
public void setLive(boolean live) {
this.live = live;
}
}
First it showed me
Keystore or password are null
Then I go to RTMPSClient.java to annotate this line
And then here is the log.
2016-01-08 15:42:10,368 [DEBUG]
org.red5.client.net.rtmp.RTMPMinaIoHandler - Set handler:
org.red5.client.ClientTest#ef9176 2016-01-08 15:42:10,374 [DEBUG]
org.red5.client.net.rtmp.RTMPMinaIoHandler - Set handler:
org.red5.client.ClientTest#ef9176 2016-01-08 15:42:10,377 [DEBUG]
org.red5.client.net.rtmp.BaseRTMPClientHandler - setExceptionHandler:
org.red5.client.ClientTest$5#1ca901e 2016-01-08 15:42:10,377 [DEBUG]
org.red5.client.net.rtmp.BaseRTMPClientHandler - connect server:
myred5ServerName port 443 application RtmpRelay
connectCallback org.red5.client.ClientTest$3#49fd9b 2016-01-08
15:42:10,381 [DEBUG] org.red5.client.net.rtmp.BaseRTMPClientHandler -
connect server: myred5ServerName port 443 connect
- params: {app=RtmpRelay, tcUrl=rtmp://myred5ServerName:443/RtmpRelay,
audioCodecs=3575, path=RtmpRelay, capabilities=15, videoFunction=1,
swfUrl=null, flashVer=WIN 11,2,202,235, videoCodecs=252, pageUrl=null,
objectEncoding=0, fpad=false} callback:
org.red5.client.ClientTest$3#49fd9b args: null 2016-01-08 15:42:10,381
[INFO] org.red5.client.net.rtmp.BaseRTMPClientHandler -
rtmp://myred5ServerName:443/RtmpRelay 2016-01-08
15:42:10,795 [DEBUG] org.red5.client.net.rtmp.RTMPMinaIoHandler -
Session created 2016-01-08 15:42:10,850 [DEBUG]
org.red5.server.BaseConnection - New BaseConnection - type: persistent
2016-01-08 15:42:10,851 [DEBUG] org.red5.server.BaseConnection -
Generated session id: AHWDCE1GVSI4E 2016-01-08 15:42:10,867 [INFO]
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor -
Initializing ExecutorService 2016-01-08 15:42:10,868 [TRACE]
org.red5.client.net.rtmp.RTMPConnManager - Connections: 1 2016-01-08
15:42:10,868 [TRACE] org.red5.client.net.rtmp.RTMPConnManager -
Connection created: RTMPMinaConnection null:0 to null client: null
session: AHWDCE1GVSI4E state: connect 2016-01-08 15:42:10,868 [TRACE]
org.red5.server.net.rtmp.RTMPMinaConnection - setIoSession conn:
RTMPMinaConnection 54.249.13.195:443 to null client: null session:
AHWDCE1GVSI4E state: connect 2016-01-08 15:42:11,298 [TRACE]
org.red5.server.net.rtmp.RTMPHandshake - Handshake ctor 2016-01-08
15:42:11,386 [TRACE] org.red5.server.net.rtmp.RTMPHandshake - Setting
handshake type: 3 2016-01-08 15:42:11,678 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Adding the SSL Filter sslFilter
to the chain 2016-01-08 15:42:11,681 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client[1](no
sslEngine) Initializing the SSL Handler 2016-01-08 15:42:11,741
[DEBUG] org.apache.mina.filter.ssl.SslHandler - Session Client[1](no
sslEngine) SSL Handler Initialization done. 2016-01-08 15:42:11,746
[DEBUG] org.apache.mina.filter.ssl.SslFilter - Session
Client1 : Starting the first handshake 2016-01-08
15:42:11,747 [DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the NEED_WRAP state 2016-01-08
15:42:11,749 [DEBUG] org.apache.mina.filter.ssl.SslFilter - Session
Client1: Writing Message : WriteRequest: HeapBuffer[pos=0
lim=200 cap=264: 16 03 03 00 C3 01 00 00 BF 03 03 56 8F 68 53 80...]
2016-01-08 15:42:11,752 [DEBUG] org.apache.mina.filter.ssl.SslHandler
- Session Client1 processing the NEED_UNWRAP state 2016-01-08 15:42:11,752 [DEBUG]
org.red5.client.net.rtmp.RTMPMinaIoHandler - Session opened 2016-01-08
15:42:11,753 [DEBUG] org.red5.client.net.rtmp.RTMPMinaIoHandler -
Handshake - client phase 1 2016-01-08 15:42:11,753 [TRACE]
org.red5.server.net.rtmp.RTMPHandshake - doHandshake: null 2016-01-08
15:42:11,753 [DEBUG] org.red5.server.net.rtmp.RTMPHandshake -
generateClientRequest1 2016-01-08 15:42:11,753 [DEBUG]
org.red5.server.net.rtmp.RTMPHandshake - Creating client handshake
part 1 with keys/hashes 2016-01-08 15:42:11,769 [DEBUG]
org.red5.server.net.rtmp.RTMPHandshake - Public key:
78668315212650400198827186223390359611077988560233147216455670641253464082043705461893836314852397223863719227558751209473569845879501294308958930567273504944711329557183892645652712976106317821813632735196388382068508141569520794069165208541632289296819978630098062466414991768903103649759385818784493305923
2016-01-08 15:42:11,780 [DEBUG] org.red5.server.net.rtmp.RTMPHandshake
- Public key as bytes - length [128]: 700703a6d5388f6df4794834f384602d6112f7d2269393d79960e23209c0c78b900c13141b5e5accaa9101917f2743682d9f430048362a74df3593d79a1c64d6c791109d929fc780316ab156d7eebe8d61ef823143386fb9b3e73930612915501d5ac10b7a7ebbfa3987528f04a6a46130d4b72bb8b0368a6ca30b32b9818043
2016-01-08 15:42:11,780 [DEBUG] org.red5.server.net.rtmp.RTMPHandshake
- Client public key: 700703a6d5388f6df4794834f384602d6112f7d2269393d79960e23209c0c78b900c13141b5e5accaa9101917f2743682d9f430048362a74df3593d79a1c64d6c791109d929fc780316ab156d7eebe8d61ef823143386fb9b3e73930612915501d5ac10b7a7ebbfa3987528f04a6a46130d4b72bb8b0368a6ca30b32b9818043
2016-01-08 15:42:11,781 [TRACE]
org.red5.client.net.rtmpe.RTMPEIoFilter - Not encrypting write request
2016-01-08 15:42:11,782 [DEBUG] org.apache.mina.filter.ssl.SslFilter -
Session Client1: Writing Message : WriteRequest:
HeapBuffer[pos=0 lim=1537 cap=1537: 03 00 00 00 00 80 00 07 02 0F 55
92 23 09 84 C0...] 2016-01-08 15:42:11,941 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Message received : HeapBuffer[pos=0 lim=2048 cap=2048: 16 03 03 00 59
02 00 00 55 03 03 CF DB 23 E6 48...] 2016-01-08 15:42:11,941 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
Processing the received message 2016-01-08 15:42:11,941 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_UNWRAP state 2016-01-08 15:42:11,942 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_TASK state 2016-01-08 15:42:11,943 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_UNWRAP state 2016-01-08 15:42:11,943 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Processing the SSL Data 2016-01-08 15:42:11,943 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Message received : HeapBuffer[pos=0 lim=2048 cap=4096: 7D 64 12 DC 74
4A 34 A1 1D 0A EA 96 1D 0B 15 FC...] 2016-01-08 15:42:11,943 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
Processing the received message 2016-01-08 15:42:11,943 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_UNWRAP state 2016-01-08 15:42:11,943 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Processing the SSL Data 2016-01-08 15:42:11,944 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Message received : HeapBuffer[pos=0 lim=464 cap=4096: 20 0C 59 88 62
07 CE CE F7 4E F9 BB 59 A1 98 E5...] 2016-01-08 15:42:11,944 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
Processing the received message 2016-01-08 15:42:11,944 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_UNWRAP state 2016-01-08 15:42:11,944 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_TASK state 2016-01-08 15:42:11,949 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_UNWRAP state 2016-01-08 15:42:11,950 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_TASK state 2016-01-08 15:42:11,961 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_UNWRAP state 2016-01-08 15:42:11,962 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_TASK state 2016-01-08 15:42:11,975 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_WRAP state 2016-01-08 15:42:11,975 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Writing Message : WriteRequest: HeapBuffer[pos=0 lim=75 cap=132: 16 03
03 00 46 10 00 00 42 41 04 80 B7 B5 9F 24...] 2016-01-08 15:42:11,975
[DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the NEED_WRAP state 2016-01-08
15:42:11,975 [DEBUG] org.apache.mina.filter.ssl.SslFilter - Session
Client1: Writing Message : WriteRequest: HeapBuffer[pos=0
lim=6 cap=8: 14 03 03 00 01 01] 2016-01-08 15:42:11,975 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
processing the NEED_WRAP state 2016-01-08 15:42:11,976 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Writing Message : WriteRequest: HeapBuffer[pos=0 lim=45 cap=66: 16 03
03 00 28 00 00 00 00 00 00 00 00 46 04 B3...] 2016-01-08 15:42:11,976
[DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the NEED_UNWRAP state 2016-01-08
15:42:11,976 [DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the NEED_UNWRAP state 2016-01-08
15:42:11,976 [DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the NEED_UNWRAP state 2016-01-08
15:42:11,976 [DEBUG] org.apache.mina.filter.ssl.SslFilter - Session
Client1: Processing the SSL Data 2016-01-08 15:42:12,135
[DEBUG] org.apache.mina.filter.ssl.SslFilter - Session
Client1: Message received : HeapBuffer[pos=0 lim=51
cap=4096: 14 03 03 00 01 01 16 03 03 00 28 29 B4 4C D8 BC...]
2016-01-08 15:42:12,136 [DEBUG] org.apache.mina.filter.ssl.SslHandler
- Session Client1 Processing the received message 2016-01-08 15:42:12,136 [DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the NEED_UNWRAP state 2016-01-08
15:42:12,137 [DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 processing the FINISHED state 2016-01-08
15:42:12,137 [DEBUG] org.apache.mina.filter.ssl.SslHandler - Session
Client1 is now secured 2016-01-08 15:42:12,137 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Processing the SSL Data 2016-01-08 15:42:12,137 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1: Writing
Message : WriteRequest: HeapBuffer[pos=0 lim=1537 cap=1537: 03 00 00
00 00 80 00 07 02 0F 55 92 23 09 84 C0...] 2016-01-08 15:42:12,140
[DEBUG] org.red5.client.net.rtmp.RTMPMinaIoHandler - messageSent
2016-01-08 15:42:12,140 [TRACE]
org.red5.client.net.rtmp.RTMPMinaIoHandler - Session id: AHWDCE1GVSI4E
2016-01-08 15:42:12,140 [DEBUG]
org.red5.client.net.rtmp.RTMPConnManager - Getting connection by
session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,298 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1: Message
received : HeapBuffer[pos=0 lim=95 cap=2048: 17 03 03 00 5A 29 B4 4C
D8 BC 7E 9E AA DA 75 CC...] 2016-01-08 15:42:12,298 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
Processing the received message 2016-01-08 15:42:12,299 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Processing the SSL Data 2016-01-08 15:42:12,300 [TRACE]
org.red5.client.net.rtmpe.RTMPEIoFilter - Session id: AHWDCE1GVSI4E
2016-01-08 15:42:12,301 [DEBUG]
org.red5.client.net.rtmp.RTMPConnManager - Getting connection by
session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,301 [TRACE]
org.red5.client.net.rtmpe.RTMPEIoFilter - Handshake exists on the
session 2016-01-08 15:42:12,301 [TRACE]
org.red5.client.net.rtmpe.RTMPEIoFilter - Not decrypting message
received: HeapBuffer[pos=0 lim=66 cap=95: 48 54 54 50 2F 31 2E 31 20
34 30 30 20 42 41 44...] 2016-01-08 15:42:12,302 [DEBUG]
org.apache.mina.filter.codec.ProtocolCodecFilter - Processing a
MESSAGE_RECEIVED for session 1 2016-01-08 15:42:12,304 [TRACE]
org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder - Session id:
AHWDCE1GVSI4E 2016-01-08 15:42:12,304 [DEBUG]
org.red5.client.net.rtmp.RTMPConnManager - Getting connection by
session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,310 [DEBUG]
org.red5.server.api.Red5 - Set connection: AHWDCE1GVSI4E with thread:
NioProcessor-2 2016-01-08 15:42:12,310 [DEBUG]
org.red5.server.api.Red5 - Caller:
org.red5.client.net.rtmp.RTMPMinaIoHandler$RTMPMinaCodecFactory$1.decode
256 2016-01-08 15:42:12,310 [TRACE] org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder - Decoder lock
acquiring.. AHWDCE1GVSI4E 2016-01-08 15:42:12,310 [TRACE]
org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder - Decoder lock
acquired AHWDCE1GVSI4E 2016-01-08 15:42:12,311 [TRACE]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Decoding for
connection - session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,312 [TRACE]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - RTMPDecodeState
[sessionId=AHWDCE1GVSI4E, decoderState=0, decoderBufferAmount=0]
2016-01-08 15:42:12,312 [TRACE]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Can start
decoding 2016-01-08 15:42:12,312 [TRACE]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Decoding for
AHWDCE1GVSI4E 2016-01-08 15:42:12,312 [DEBUG]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder -
decodeServerHandshake - buffer: HeapBuffer[pos=0 lim=66 cap=1536: 48
54 54 50 2F 31 2E 31 20 34 30 30 20 42 41 44...] 2016-01-08
15:42:12,312 [DEBUG]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Handshake init
too small, buffering. remaining: 66 2016-01-08 15:42:12,312 [TRACE]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Decoding finished
for AHWDCE1GVSI4E 2016-01-08 15:42:12,312 [TRACE]
org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Cannot continue
decoding 2016-01-08 15:42:12,313 [TRACE]
org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder - Decoder lock
releasing.. AHWDCE1GVSI4E 2016-01-08 15:42:12,313 [DEBUG]
org.red5.server.api.Red5 - Set connection: null with thread:
NioProcessor-2 2016-01-08 15:42:12,313 [DEBUG]
org.red5.server.api.Red5 - Caller:
org.red5.client.net.rtmp.RTMPMinaIoHandler$RTMPMinaCodecFactory$1.decode
275 2016-01-08 15:42:12,313 [DEBUG] org.apache.mina.filter.ssl.SslFilter - Session Client1: Message
received : HeapBuffer[pos=0 lim=31 cap=2048: 15 03 03 00 1A 29 B4 4C
D8 BC 7E 9E AB 2E 99 50...] 2016-01-08 15:42:12,313 [DEBUG]
org.apache.mina.filter.ssl.SslHandler - Session Client1
Processing the received message 2016-01-08 15:42:12,314 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client1:
Processing the SSL Data 2016-01-08 15:42:12,314 [DEBUG]
org.apache.mina.filter.ssl.SslFilter - Session Client[1]: Writing
Message : WriteRequest: HeapBuffer[pos=0 lim=31 cap=33: 15 03 03 00 1A
00 00 00 00 00 00 00 02 AD DD 15...] 2016-01-08 15:42:12,470 [DEBUG]
org.red5.client.net.rtmp.RTMPMinaIoHandler - Session closed 2016-01-08
15:42:12,470 [TRACE] org.red5.client.net.rtmp.RTMPMinaIoHandler -
Session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,471 [DEBUG]
org.red5.client.net.rtmp.RTMPConnManager - Getting connection by
session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,471 [DEBUG]
org.red5.client.net.rtmp.BaseRTMPClientHandler - connectionClosed
2016-01-08 15:42:12,471 [DEBUG]
org.red5.server.net.rtmp.BaseRTMPHandler - connectionClosed:
AHWDCE1GVSI4E 2016-01-08 15:42:12,471 [DEBUG]
org.red5.server.net.rtmp.RTMPConnection - close: AHWDCE1GVSI4E
2016-01-08 15:42:12,472 [DEBUG]
org.red5.server.net.rtmp.RTMPConnection - State: connect 2016-01-08
15:42:12,472 [DEBUG] org.red5.server.api.Red5 - Set connection:
AHWDCE1GVSI4E with thread: NioProcessor-2 2016-01-08 15:42:12,472
[DEBUG] org.red5.server.api.Red5 - Caller:
org.red5.server.net.rtmp.RTMPConnection.close #924 2016-01-08
15:42:12,479 [DEBUG] org.red5.server.net.rtmp.RTMPConnection - Stream
service was not found for scope: null or non-existant 2016-01-08
15:42:12,479 [DEBUG] org.red5.server.BaseConnection - Close, not
connected nothing to do 2016-01-08 15:42:12,479 [TRACE]
org.red5.server.net.rtmp.RTMPConnection - Memory at close - free:
1596K total: 15872K 2016-01-08 15:42:12,479 [DEBUG]
org.red5.server.net.rtmp.RTMPMinaConnection - IO Session closing: true
2016-01-08 15:42:12,479 [DEBUG]
org.red5.server.net.rtmp.RTMPMinaConnection - Connection state: RTMP
[state=disconnecting, encrypted=false, readChunkSize=128,
writeChunkSize=128, encoding=AMF0] 2016-01-08 15:42:12,480 [DEBUG]
org.red5.client.net.rtmp.BaseRTMPClientHandler - connectionClosed
2016-01-08 15:42:12,480 [DEBUG]
org.red5.server.net.rtmp.BaseRTMPHandler - connectionClosed:
AHWDCE1GVSI4E 2016-01-08 15:42:12,480 [TRACE]
org.red5.server.net.rtmp.RTMPConnection - setStateCode: 5 -
disconnected 2016-01-08 15:42:12,486 [TRACE]
org.red5.server.net.rtmp.RTMPConnManager - Connection manager instance
does not exist 2016-01-08 15:42:12,486 [TRACE]
org.red5.server.net.rtmp.RTMPConnManager - Connection manager bean
doesnt exist, creating new instance 2016-01-08 15:42:12,490 [TRACE]
org.red5.server.net.rtmp.RTMPConnManager - Removing connection with
session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,491 [TRACE]
org.red5.server.net.rtmp.RTMPConnManager - Connections (0) at
pre-remove: [] 2016-01-08 15:42:12,492 [TRACE]
org.red5.server.net.rtmp.BaseRTMPHandler - connectionClosed:
RTMPMinaConnection 54.249.13.195:443 to null client: null session:
AHWDCE1GVSI4E state: disconnected 2016-01-08 15:42:12,558 [TRACE]
org.red5.server.net.rtmp.RTMPConnection - setStateCode: 5 -
disconnected 2016-01-08 15:42:12,558 [TRACE]
org.red5.server.net.rtmp.RTMPConnManager - Removing connection with
session id: AHWDCE1GVSI4E 2016-01-08 15:42:12,558 [TRACE]
org.red5.server.net.rtmp.RTMPConnManager - Connections (0) at
pre-remove: [] 2016-01-08 15:42:12,558 [TRACE]
org.red5.server.net.rtmp.BaseRTMPHandler - connectionClosed:
RTMPMinaConnection 54.249.13.195:443 to null client: null session:
AHWDCE1GVSI4E state: disconnected
I wish someone could tell me where I was wrong.THKS.