Questions tagged [netty]
An open source asynchronous event-driven network application framework written in Java. It is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients
4,983
questions
0
votes
0
answers
15
views
io.netty.handler.ssl.SslContext.newClientContext() deprecated in favor of?
What I am trying to achieve:
I would like to create a dummy SslContext (the one from io.netty.handler.ssl.SslContext, not SSLContext) during my testing.
What did I try:
Since it is a dummy and it ...
1
vote
0
answers
15
views
RejectedExecutionException when running Kafka + Netty in OpenShift
We're developing a stateful Kafka application in Kotlin designed to consume records from two topics and produce records to another topic. The application runs as a statefulset in OpenShift with three ...
0
votes
0
answers
18
views
How to organize nettty pipeline?
My pipeline doesn't work as expected
public class DataServerInitializer extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel socketChannel) ...
1
vote
0
answers
20
views
Block unknown http client requests to my https server?
My https server works just fine with my Android clients, but some random bots are sending http requests to my server and this is resulting netty throwing TLS handshake failure exception and a very big ...
0
votes
1
answer
25
views
Handle non-SSL client bots for https netty server
I am using KTor https server for my Android app and I have noticed that bots trying to connect to my server fail because of TLS handshake didn't happen.
This is annoying because my log file is filled ...
0
votes
0
answers
22
views
How to use netty properly?
I used netty to write a program in which the server and the client communicate with each other. When the client sends a message to the server, it can be received, but when the server sends a message ...
0
votes
0
answers
23
views
ERROR util.ResourceLeakDetector: LEAK: ByteBuf.release() Connection.getTable().put(List)
I am trying to do a lot of PUTs in Hbase, however, after some time of operation, a memory leak occurs due to the following error:
ERROR util.ResourceLeakDetector: LEAK: ByteBuf.release() was not ...
0
votes
0
answers
20
views
Prevent HTTP Request Smuggling in Netty-4.1.96
I am working on a application based on Netty. Recently from our security scanner, we got to know that our application is vulnerable to Http Request Smuggling Attack. Post to that I did some ...
0
votes
0
answers
21
views
Random requests to my ktor http server from internet
I am developing a server for my Android app, and there are multiple JAR files developed in KTor server which are running on different port numbers and act as servers for different services for my ...
0
votes
0
answers
25
views
Get response status from ChannelFuture
Here is a example server
package org.test;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.Unpooled;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import ...
0
votes
0
answers
60
views
How to set a long read timeout for Spring WebClient (to avoid PrematureCloseException)
I have a Spring Boot application with a Spring WebClient sending requests to another Spring-Boot application (Spring-Boot 2.7.14 and Spring WebFlux 5.3.29)
WebClient.Builder wcBuilder = WebClient....
0
votes
0
answers
12
views
How to skip some specified Handler in netty or the correct handler usage with reactor-netty?
Summary
I am new to netty and plan to demonstrate a rtsp online desktop share application for practise . now i get puzzled that when i request the desktop share frame via rtsp , it should be decode ...
0
votes
0
answers
27
views
camel-netty4: io.netty.util.internal.OutOfDirectMemoryError
I've looked through all the previous times some version of this question has been asked.
Here's an overview of the answers.
Unanswered:
How to find a root cause of the following netty error: io.netty....
0
votes
0
answers
8
views
how to fix the netty-handler violation from aqua scanner report under application insights
I'm facing the netty-handler violation from aqua scanner report for my maven project, where the parent path is showing as /applicationinsights-agent.jar. No fix version is suggested,
to fix this I ...
0
votes
0
answers
77
views
What could cause a Errors$NativeIoException: recvAddress(..) failed: Connection timed out?
Context: we use Netty to connect to a device, using TCP/Epoll. Connecting is successful and messages are exchanged. At some point we get this exception:
io.netty.channel.unix.Errors$NativeIoException: ...
-2
votes
0
answers
17
views
Is there some best practice that could bind some metadata to connection channel in reactor netty?
Scenario
i wanna build a desktop share application via reactor netty and different client should send a meeting room key for that when anyone share its desktop frame data ,server could accorging ...
0
votes
1
answer
23
views
llegalStateException: Could not find TLS ALPN provider; no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available
I am trying to use Google PubSub. The code is relatively straight forward.
PubsubMessage message = PubsubMessage.newBuilder()
.setData(ByteString.copyFromUtf8(messageBody))
.putAllAttributes(...
1
vote
1
answer
40
views
With Spring Webclient how to verify hostname validation is taking place
I have a project that uses Spring Webclient/Webflux and Reactor-Netty. Our vulnerability scanner detects Netty and complains that it is configured to not do hostname validation by default(CWE-295).
...
0
votes
1
answer
51
views
Quarkus: How to log body of an incoming POST request
I have a Quakus application that uses quarkus-resteasy dependency. i.e non-reactive.
I want to print(or somehow know) the content of the incoming POST request body.
I tried various log level settings ...
0
votes
0
answers
18
views
Netty Splice operation not working in channelRead
I am using Splice Operation to transfer data from one inbound channel to outbound channel and vice versa using Splice operation to improve performance.
Inbound channel is between client and proxy ...
0
votes
0
answers
23
views
io.netty.util.IllegalReferenceCountException in netty client
Please help me with the following problem, I wrote a synchronous netty client and when I try to send a request I get an error:
java.util.concurrent.CompletionException: io.netty.util....
0
votes
0
answers
12
views
Spring WebClient annotated connectexception" connection refused " and going indefinatatly in the logs
please help us on this issue we have two services a, b a is trying to call b service when is down and now a continuously logging error indefinitely.it should not do
it should only log once, its keep ...
1
vote
1
answer
103
views
How to increase request header size in Spring WebFlux with Netty?
Is there a way to configure maximum http request header size for a request in Spring WebFlux with embedded Netty server?
I am getting following exception.
io.netty.handler.codec.http2.Http2Exception$...
0
votes
0
answers
16
views
Netty Client can't receive the message from server
Here is my Server code
public class Server {
private int port;
public Server(int port) {
this.port = port;
}
public void run() {
NioEventLoopGroup bossGroup = new ...
0
votes
0
answers
26
views
Using Redisson(V3.23.5) occurs a warning exception
Dependencies:
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version&...
0
votes
1
answer
182
views
How to force specific version of a transitive dependency (netty-codec-http) in gradle?
I am trying to use version 4.1.100.Final for the netty-codec-http library as the OWASP dependency checker marks the netty* dependancies as HIGH. It is pulled out by amazon s3 dependency. Here is my ...
0
votes
0
answers
74
views
Spring Boot - lettuce-core and netty issue: java.lang.NoClassDefFoundError: io/netty/util/Recycler$EnhancedHandle
Could you please give any insight about how to solve it this error?
The error popped up when I changed the version of aws to 2.20.161.
Unable to connect to [cache]: Caused by: java.lang....
2
votes
1
answer
109
views
Should I avoid blocking code in netty-grpc?
The most popular option is running grpc server on netty, in my understanding netty use a worker event loop group which call handlers in the pipeline, so basically my rpc is one of these handlers in ...
0
votes
0
answers
20
views
Why Netty become slow when data packet bigger than 8k
When using Netty, the received data package bigger than 8k, CPU occupation become high and slow, but small data package was Ok, can sb help this
I tried some config, but can’t solve it. Is sb meet the ...
0
votes
0
answers
16
views
Latency issue for attending a HTTP request using Netty libary
We implemented a Server that attends over HTTP/Json requests. Our Netty configuration is a follows:
<apg-netty-servers>
<boss-threads>1</boss-threads>
<worker-...
1
vote
0
answers
82
views
Spring reactive webclient doesn't throw ReadTimeoutException at the configured time
In our service we are using Spring Boot 2.7.16 with Kotlin. In our http calls we are using the reactive webclient wrapped with coroutines (async await). The webclient configuration for all client are ...
0
votes
0
answers
16
views
dotNetty proxy - wait for response before continuing
I have written a TCP-proxy using dotNetty, and so far it's working great! But now I am having a problem with waiting for the response from the server that the proxy is connecting to.
The server ...
0
votes
0
answers
42
views
Is there support for "amazon-sqs-java-temporary-queues-client" with SqsAsyncClient?
I am using SQS temporary queue with request/response pattern which uses SqsClient (under the hood it supports Apache HTTP client only). I am exploring to migrate the implementation to use netty to ...
0
votes
1
answer
66
views
How to store ByteBufs inside of a Caffeine LoadingCache without race conditions?
I have a LoadingCache that loads a Netty ByteBuf from some data. I need to be able to release this data using release() once the entry is evicted, however there is a race condition where the entry is ...
0
votes
1
answer
43
views
Declaring variable as interface and accessing properties of specific implementation
In an application I am developing, I am decoding TCP-messages. These messages all have the same header, but the actual message content can have different fields and a different total length. So I ...
0
votes
0
answers
45
views
Reactor Netty custom access log, missing connected user details
In a Spring Cloud Gateway application, I'm trying to understand how I can add the connected user in my access log. The user property in AccessLogArgProvider is always at the default value (-).
I'm ...
0
votes
0
answers
22
views
Netty client sends TCP RST
I see strange behaviour in Netty HTTP Client.
It establishes connection to server fine, has some traffic but then sends RST out of blue.
What could cause such behaviour?
22:20:03.954242 IP 10.15.12....
0
votes
0
answers
104
views
Reactor Netty HTTP client opens new connection in Pool mode
Set up:
Java 17
Spring Cloud Gateway 4.0.7
Netty client propetrties
spring.cloud.gateway.httpclient.connect-timeout=3000
spring.cloud.gateway.httpclient.pool.type=fixed
spring.cloud.gateway.httpclient....
0
votes
0
answers
20
views
Understanding the implications of using UnpooledByteBufAllocator.DEFAULT in Flink with Cassandra sinks
I am in the process of upgrading Flink applications from JDK 8 to JDK 11, and these applications use Cassandra sinks. During this process, I encountered an issue with the Flink cluster running out of ...
0
votes
0
answers
11
views
How to use netty to open the new session ticket of TLSv1.3?
My chakan netty4.1.97 source code is open by default, but there is still no new session ticket package.
I see netty source code need use PSK_DHE-KE but i don't know how to realize,this is right?
i can ...
0
votes
0
answers
27
views
java grpc ignores `maxInboundMessageSize` and fails when payload bigger than 4194304
Using:
server = ServerBuilder.forPort(port)
.addService(new MyGRPC())
.maxInboundMessageSize(Integer.MAX_VALUE)
.build()
.start();
with gradle and package versions:
def grpcVersion = &...
0
votes
0
answers
9
views
is there command for identifying server name windows/linux?
I am using springboot application which is having tomcat server libraries and spring-boot-stater-webflux library in my application. I read some of the blogs and says that if we have webflux library, ...
0
votes
0
answers
43
views
How to enable session resumption on tlsv1.3 by netty server side
I hava a java netty server like this:
public class Server {
public Server(int port) {
EventLoopGroup bossGroup = new NioEventLoopGroup(1);
EventLoopGroup workGroup = new ...
0
votes
0
answers
9
views
Http1 / Netty Question : Do we see http request and content in the same channel read
We have a bare-bones Netty http (1.1) proxy in our architecture. I would like to know whether the channel handlers in Netty see a http request and content in the same channelRead in a channelHandler. ...
1
vote
0
answers
17
views
Netty - Not receiving new message when not calling writeAndFlush with ByteBuf of channelRead
When I pass data to const ProxyServerHandler, everything works as usual.
But when I pass activeBuffer, then netty appears just stuck there, channelRead won't be fired again.
private ByteBuf ...
0
votes
0
answers
11
views
At what stage does jetty server log a request using RequestLog?
A jetty server is configured using a queuedthreadpool with 10 threads.
QueuedThreadPool threadPool = new QueuedThreadPool(
10,
10,
60000,
new ...
0
votes
0
answers
20
views
HttpRequest using netty ChannelPool is always returning 400 response
I'm trying to understand netty ChannelPool. I'm following the tutorial https://www.programmerall.com/article/74872253762/ to for that.
Below is the http URL that is working fine in curl cli.
curl --...
0
votes
0
answers
34
views
How to parse byte array into HttpRequest (netty)?
I'm using netty and need to convert a byte[] (representing the complete request, not just the body) into io.netty.handler.codec.http.HttpRequest. I found HttpObjectDecoder, but no way to parse it ...
0
votes
0
answers
26
views
Is it possible use SecurityContext in App integrated Spring Security and Netty-socketio
I want to integrate Spring Web + Spring Security and Netty-Socket.io.
But In my app, they are diffrent port and WAS(WEB use tomcat(port: 8080), Netty-Socket.io use netty(port: 8070))
But I want to use ...
0
votes
0
answers
156
views
Pubsub messages are getting dropped before reaching to our internal microservices
We are using google cloud pub sub pull mechanism, from past couple of days we are seeing the below error in our service logs-
io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: Abrupt GOAWAY closed ...