Why am I getting a handshake time out after 10000ms? - rest

I am facing this handshake timed out after 10000ms while connecting via api gateway
I am getting below error in my API gateway while connecting to one of the micro-service REST api via this gateway url.
ERROR o.s.b.a.w.r.e.AbstractErrorWebExceptionHandler - [a20cd6e8-867608] 500 Server Error for HTTP POST "/myRestEndpoint"
io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 10000ms
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2054)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ HTTP POST "/myRestEndpoint" [ExceptionHandlingWebHandler]'
Could anyone please guide me here the required steps to be taken care?
Thanks.

Related

I tried connecting to a test server on localhost from socket.io's swift client but it can't find the hostname

I have a socket.io server running on Node.js listening on localhost:3000. I then try to connect to that server with a swift mac app. Here's how I'm doing the connection in swift
let manager = SocketManager(socketURL: URL(string: "https://localhost:3000/")!, config: [.secure(true), .log(true), .compress])
let socket: SocketIOClient
init() {
socket = manager.defaultSocket
print(storage)
addHandlers()
socket.connect()
}
The above code is inside a struct which is created as a property value in a ContentView so I don't think my manager is being destroyed.
Here are the relevant logs
2022-12-20 17:05:48.742 MultiSnake[46501:971261] LOG SocketIOClient{/}: Handling event: statusChange with data: [connecting, 2]
2022-12-20 17:05:48.742 MultiSnake[46501:971261] LOG SocketIOClient{/}: Joining namespace /
2022-12-20 17:05:48.742 MultiSnake[46501:971261] LOG SocketManager: Tried connecting socket when engine isn't open. Connecting
2022-12-20 17:05:48.742 MultiSnake[46501:971261] LOG SocketManager: Adding engine
2022-12-20 17:05:48.743 MultiSnake[46501:971274] LOG SocketEngine: Starting engine. Server: https://localhost:3000/
2022-12-20 17:05:48.743 MultiSnake[46501:971274] LOG SocketEngine: Handshaking
2022-12-20 17:05:48.745 MultiSnake[46501:971274] LOG SocketEnginePolling: Doing polling GET https://localhost:3000/socket.io/?transport=polling&b64=1&EIO=4
2022-12-20 17:05:48.857 MultiSnake[46501:971288] ERROR SocketEnginePolling: A server with the specified hostname could not be found.
2022-12-20 17:05:48.857 MultiSnake[46501:971288] ERROR SocketEngine: A server with the specified hostname could not be found.
2022-12-20 17:05:48.871 MultiSnake[46501:971261] ERROR SocketManager: A server with the specified hostname could not be found.
2022-12-20 17:05:48.871 MultiSnake[46501:971261] LOG SocketIOClient{/}: Handling event: error with data: ["A server with the specified hostname could not be found."]
2022-12-20 17:05:48.872 MultiSnake[46501:971261] LOG SocketManager: Starting reconnect
I can connect to localhost:3000 from the browser and I have done the required Certficate Authority related things for HTTPS to work. I have not made an ATS exception in my mac app and I would prefer not to.
I have tried to change the "https://localhost:3000/" string to "localhost:3000/" and add .secure(true) to the manager's config but then socket.io would poll https:/socket.io instead of the right url.
I don't know where I can specify the hostname and I think I have followed the examples here.

Kafka: SASL_SSL Cluster authorization failed

We are using Kafka SASL_SSL authentication
And able to make connections using User Principal Name.
But while sending the data to the topic getting below error
Executing step
Autopopulated Producer.Connection with Connection (Kafka Connection)
Adjusting Runtime Scopes
Adjusting Runtime Scopes
Creating SSL Context with protocol: TLSv1.2
Opening producer on sdr01kbr01.uscc.com:9093,sdr01kbr02.uscc.com:9093,sdr02kbr03.uscc.com:9093,sdr02kbr04.uscc.com:9093
Sending message to topic dev01-oms
Creating SSL Context with protocol: TLSv1.2
Error: Error waiting for acknowledgement after sending message to topic dev01-oms: org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.
============================================================================
| Exception:
============================================================================
| Message:     Error waiting for acknowledgement after sending message to topic dev01-oms: org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.
----------------------------------------------------------------------------
| Trapped Exception: org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.
| Trapped Message:   java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.
----------------------------------------------------------------------------
STACK TRACE
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.
               at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(FutureRecordMetadata.java:97)
               at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:65)
               at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:30)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
               at java.util.concurrent.FutureTask.run(FutureTask.java:266)
               at javax.swing.SwingWorker.run(SwingWorker.java:334)
               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: org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.

Kafka gives Invalid receive size with Hyperledger Fabric Orderer connection

I was setting up a new cluster for Hyperledger Fabric on EKS. The cluster has 4 kafka nodes, 3 zookeeper nodes, 4 peers, 3 orderers, 1 CA. All the containers come up individually, and the kafka/zookeeper backend is also stable. I can SSH into any kafka/zookeeper and check for connections to any other nodes, create topics, post messages etc. The kafka is accessible via Telnet from all orderers.
When I try to create a channel I get the following error from the orderer:
2019-04-25 13:34:17.660 UTC [orderer.common.broadcast] ProcessMessage -> WARN 025 [channel: channel1] Rejecting broadcast of message from 192.168.94.15:53598 with SERVICE_UNAVAILABLE: rejected by Consenter: backing Kafka cluster has not completed booting; try again later
2019-04-25 13:34:17.660 UTC [comm.grpc.server] 1 -> INFO 026 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=192.168.94.15:53598 grpc.code=OK grpc.call_duration=14.805833ms
2019-04-25 13:34:17.661 UTC [common.deliver] Handle -> WARN 027 Error reading from 192.168.94.15:53596: rpc error: code = Canceled desc = context canceled
2019-04-25 13:34:17.661 UTC [comm.grpc.server] 1 -> INFO 028 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.94.15:53596 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=24.987468ms
And the Kafka leader reports the following error:
[2019-04-25 14:07:09,453] WARN [SocketServer brokerId=2] Unexpected error from /192.168.89.200; closing connection (org.apache.kafka.common.network.Selector)
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369295617 larger than 104857600)
at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:132)
at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:93)
at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:231)
at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:192)
at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:528)
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:469)
at org.apache.kafka.common.network.Selector.poll(Selector.java:398)
at kafka.network.Processor.poll(SocketServer.scala:535)
at kafka.network.Processor.run(SocketServer.scala:452)
at java.lang.Thread.run(Thread.java:748)
[2019-04-25 14:13:53,917] INFO [GroupMetadataManager brokerId=2] Removed 0 expired offsets in 0 milliseconds. (kafka.coordinator.group.GroupMetadataManager)
The error indicates that you are receiving messages larger than the permitted maximum size, that defaults to ~100MB. Try to increase the following property in server.properties file, so that it can fit larger receive (in this case at least 369295617 bytes):
# Set to 500MB
socket.request.max.bytes=500000000
and then restart your Kafka Cluster.
If this doesn't work for you, then I guess that you are trying to connect to a non-SSL listener. Therefore, you'd have to verify that broker's SSL listener port is 9092 (or the corresponding port in case you are not using the default one) . The following should do the trick:
listeners=SSL://:9092
advertised.listeners=SSL://:9092
inter.broker.listener.name=SSL

RH Develoiper Studio to JBoss EAP server connection

I have tried Developer Studio 11.3.0, and 12.0.0. I've tried EAP 6.4.0, and 7.1.0. Everything gives me the same error. I've run it with servers in RHEL on AWS and a DevStudio in Windows 10 or Windows 7. I've run it with server and DevStudio on the same Fedora system. Always the same error when I try to "start" the remote server:
The initialization produced an exception, which can occur due to incorrect security credentials. Please review the exception messages by clicking the Details button.
* java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://LOCALHOST:9990. The connection failed
* java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://LOCALHOST:9990. The connection failed
* WFLYPRT0053: Could not connect to http-remoting://LOCALHOST:9990. The connection failed
* Authentication failed: all available authentication mechanisms failed:
JBOSS-LOCAL-USER: javax.security.sasl.SaslException: ELY05128: [JBOSS-LOCAL-USER] Failed to read challenge file [Caused by java.io.FileNotFoundException: /datavirt/jboss/EAP-7.1.0/standalone/tmp/auth/local3848441195962286340.challenge (Permission denied)]
DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Server rejected authentication
Here's a bit of the server.log file, where things go wrong. (It's slightly different in 6.4.0, but not substantially.)
2018-09-01 23:20:52,946 TRACE [org.jboss.remoting.endpoint] (management I/O-2) Allocated tick to 8 of endpoint "miramanee:MANAGEMENT" <68fb9f51> (opened org.jboss.remoting3.EndpointImpl$TrackingExecutor#18776914)
2018-09-01 23:20:52,946 TRACE [org.xnio.nio] (management I/O-2) Running task org.jboss.remoting3.remote.ServerConnectionOpenListener$2#228e4439
2018-09-01 23:20:52,946 TRACE [org.xnio.nio.selector] (management I/O-2) Beginning select on sun.nio.ch.EPollSelectorImpl#617c6bff (with timeout)
2018-09-01 23:20:52,946 TRACE [org.xnio.nio] (management I/O-2) Select, queue is empty
2018-09-01 23:20:52,946 TRACE [org.wildfly.security] (management task-7) Handling RealmCallback: selected = [ManagementRealm]
2018-09-01 23:20:52,946 TRACE [org.wildfly.security] (management task-7) Handling NameCallback: authenticationName = admin
2018-09-01 23:20:52,946 TRACE [org.wildfly.security] (management task-7) Principal assigning: [admin], pre-realm rewritten: [admin#ManagementRealm], realm name: [DIGEST], post-realm rewritten: [admin#ManagementRealm], realm rewritten: [admin#ManagementRealm]
2018-09-01 23:20:52,947 TRACE [org.wildfly.security] (management task-7) Handling CredentialCallback: obtained credential for correct realm "ManagementRealm"
2018-09-01 23:20:52,947 TRACE [org.wildfly.security] (management task-7) Handling CredentialCallback: obtained credential: org.wildfly.security.credential.PasswordCredential#b75f36fa
2018-09-01 23:20:52,947 TRACE [org.jboss.remoting.remote.server] (management task-7) Server sending authentication rejected: javax.security.sasl.SaslException: ELY05055: [DIGEST-MD5] Authentication rejected (invalid proof)
at org.wildfly.security.sasl.digest.DigestSaslServer.validateDigestResponse(DigestSaslServer.java:281)
at org.wildfly.security.sasl.digest.DigestSaslServer.evaluateMessage(DigestSaslServer.java:358)
at org.wildfly.security.sasl.util.AbstractSaslParticipant.evaluateMessage(AbstractSaslParticipant.java:180)
at org.wildfly.security.sasl.digest.DigestSaslServer.evaluateResponse(DigestSaslServer.java:331)
at org.wildfly.security.sasl.util.AuthenticationCompleteCallbackSaslServerFactory$1.evaluateResponse(AuthenticationCompleteCallbackSaslServerFactory.java:58)
at org.wildfly.security.sasl.util.AuthenticationTimeoutSaslServerFactory$DelegatingTimeoutSaslServer.evaluateResponse(AuthenticationTimeoutSaslServerFactory.java:106)
I am plumb stumped.
If you want to get it going quickly for learning/etc, then I can just say what I'm doing. I have RHEL 7 & EAP 7.1. I'm using dev studio 12 on same machine. When I added a server into dev studio, I had option to select local or remote. I selected local and had no problems starting via dev studio. The user I'm running dev studio with also has permissions to EAP home directory (I see file perm errors in your error). I also chose management options vs. Filesystem and shell operations. I also test, and this worked picking remote as well. But again, same server for everything/same localhost.

eclipse console suddenly showing INFO

I'm using a apache HttpClient and I've started seeing some INFO output on the eclipse console:
0 [main] INFO org.apache.commons.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
3 [main] INFO org.apache.commons.httpclient.HttpMethodDirector - Retrying request
3861 [pool-1-thread-25] INFO org.apache.commons.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
3861 [pool-1-thread-25] INFO org.apache.commons.httpclient.HttpMethodDirector - Retrying request
3913 [pool-1-thread-16] INFO org.apache.commons.httpclient.HttpMethodBase - Response content length is not known
To my knowledge, nothing has changed. How can I get rid of it?
It's probably your logging library. HttpClient likely depends on commons-logging, which automatically picks up a logging implementation in your classpath (either java.util.logging or log4j) which by default writes on the console.