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,639
questions
0
votes
0answers
8 views
GRPC migration: Supporting both grpc and rest in spring boot?
I have an existing micro-service in production which has a restful endpoint. For new customers, as well as well from a long term objective, we would like to support grpc. I would like to understand if ...
0
votes
0answers
9 views
Java Netty tcp client reconnect ant testing the behavior
I am new to network programming and playing around with netty. I need an application that handles multiple tcp client connections. I can connect to the server, encode/decode the request, get the ...
0
votes
2answers
33 views
OOM killed JVM with 320 x 16MB Netty DirectByteBuffer objects
I run an app in a 7.5GB RAM server (no swap) with args:
-Xmx3g -Xms3g -Xlog:gc -XX:+UseG1GC -XX:MaxGCPauseMillis=1000 -XX:MaxDirectMemorySize=500m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -...
2
votes
1answer
36 views
Why WebFlux-WebClient Timeout not working?
I am using Spring boot Webflux 2.4.4 (latest) and trying to invoke a backend URL using WebClient. WebClient always responds above 20 secs. If I hit the URL directly it responds in milliseconds.
Pom ...
3
votes
0answers
93 views
+200
Truncated protobufs in Micronaut application
I have a Micronaut (version 2.1.4) application that consumes Protobuf messages via HTTP.
This is the controller example:
@Post
@Consumes(ProtobufferCodec.PROTOBUFFER_ENCODED)
@Produces(...
1
vote
1answer
25 views
Secure Netty Server with Lets Encrypt SSL Certificates
I have a RESTful netty server that will provide some data to users that request. I would like to secure this server using an SSL Certificate generated from Let's Encrypt.
I currently have this for my ...
1
vote
0answers
30 views
Problem with upgrading version io.netty netty-handler in azure-spring-boot-starter-storage [closed]
I am getting an io.netty.handler.ssl.SslContxtBuilder exception when I upgraded the version of io.netty netty-handler in azure-spring-boot-starter-storage package.
io.netty.netty-handler version 4.1....
0
votes
0answers
30 views
Webflux ReadTimeoutHandler returns io.netty.handler.timeout.ReadTimeoutException with null message
We're using Webflux Webclient for making API calls through our spring-webflux application. We've configured ReadTimeout using io.netty.handler.timeout.ReadTimeoutHandler but whenever a ReadTimeout ...
-1
votes
1answer
42 views
Re-use same local port number with Netty client
I have developed a java TCP client with Netty.
I should use the same local port number to connect to the server if I disconnects but I can't use same localport. I think the reason is the socket is in ...
1
vote
0answers
31 views
Configure ReadTimeoutHandler or WriteTimeoutHandler for request type
I have a service that receive HTTP and WS requests.
How can I configure ReadTimeoutHandler for HTTP requests only?
0
votes
1answer
53 views
How to do rolling upgrades for tcp servers behind a load balancer?
I am having 2 tcp servers behind a load balancer, each server has 200k tcp connections. When I upgrade the servers, I need to keep the cluster alive by doing a rolling upgrade, and after upgrading the ...
0
votes
1answer
23 views
why the certificateVerifierTask_class is not unload in netty-tcnative
when I read the source sslcontext.c of netty-tcnative, I found that the 「certificateVerifierTask_class」 is loaded in the method 「netty_internal_tcnative_SSLContext_JNI_OnLoad」
jint ...
0
votes
0answers
13 views
netty Reflective Access Unsupported
I have an AWS Firehose Client running in my lambda fucntion. It is instantiated as shown below.
private static FirehoseAsyncClient firehoseClient =
FirehoseAsyncClient.builder()
....
0
votes
0answers
32 views
Zeppelin and Netty reverse proxy in Chrome RSV != 0 and no extension negotiated, RSV:4
We are attempting to upgrade our Zeppelin version from 0.7.0 to 0.8.2 and are having issues with WebSockets in Chrome.
Our flow is Zeppelin <- -> reverse proxy for authentication, based on Netty....
0
votes
0answers
22 views
Netty slow writeAndFlush times
I have a relatively short Netty pipeline with a single ByteToMessageDecoder and a LoggingHandler. In doing analysis to see why my request/response times to my remote were taking so long and I was able ...
0
votes
0answers
15 views
Netty: Why momory usage of preferDirectBufs mode is larger than set it to false?
I had do some performance test on netty 4.1.47, and I found that in the same test case, the used memory in preferDirectBufs mode is about 4 times as preferDirectBufs is set to false.
set ...
0
votes
0answers
22 views
How are Netty Quic Streams Used
I have successfully run the netty incubator quic example and am now trying to work out how to use it in a real application.
https://github.com/netty/netty-incubator-codec-quic/tree/main/src/test/java/...
0
votes
1answer
24 views
Netty neophyte question on WARNING: Failed to release a message: PooledUnsafeDirectByteBuf(freed)
I am learning Netty with the Netty In Action book and code example, for the chapter 2 example in https://github.com/normanmaurer/netty-in-action/tree/2.0-SNAPSHOT/chapter2
I added another ...
1
vote
0answers
47 views
ByteBuf leak in netty - still unable to solve
This question is a continuation of this one:
LEAK: ByteBuf.release() was not called - how do we solve this?
I did everything that was suggested to me there.
I mean:
a) I upgraded netty to version 4.1....
0
votes
1answer
24 views
Pushy APNS http2 protocol - No init method in io.netty.util.concurrent.PromiseCombiner Error
I was facing the following runtime error while using the library
I used the following dependencies in my project
<dependency>
<groupId>com.eatthepath</groupId>
<...
0
votes
1answer
24 views
What is the difference between the ByteBuf retrieved from Context versus any other ByteBuf
I found out that using ByteBuf derived from ChannelHandlerContext behaves exactly the same as when using ByteBuf created via Unpooled for example.
That is, both of these two works:
ctx.write(ctx.alloc(...
0
votes
0answers
13 views
spring-boot with netty project is unable to recognize .geojson file mime type for compression
I have a spring-boot/netty application setup to serve some static file from main/resource/static. The application is also setup for compression.
server:
compression:
enabled: true
mime-types:...
-1
votes
0answers
26 views
Netty takes too long to resolve DNS
I did a spring-boot-starter-parent version upgrade from 2.2.0.RELEASE to 2.4.4. My previous netty version was 4.1.42 and now its 4.1.60. In my application, it's connect to an external https endpoint ...
0
votes
1answer
24 views
Why does ChannelOutboundHandlerAdapter have a read method if it s means for outbound IO operations
As far as I understand, in Netty ChannelOutboundHandlerAdapter is meant for outbound IO operations: that is writes, but a class implementing ChannelOutboundHandlerAdapter can also implement a read ...
0
votes
1answer
111 views
Cipher list configured in Netty client not being sent down to Server
I have below piece of code in order to configure a cipher list and send down to the server in Netty client.
Pair<String, String> config = Pair.of(keyStore, keyStorePassword);
if (!filters....
0
votes
1answer
25 views
netty getting the text value of an byte[]
I use an API, that gives me the byte[] of a WebSicketFrame#content.
If I use WebSocketFrame#content#toString(Charset) is works with no problem.
The API I use although returns WebSocketFrame#content#...
1
vote
0answers
19 views
AWS's Proxy Protocol v2 Breaking Application Due to Absence of PSH Flag
I have a network application built using Netty. The application is behind Amazon network load balancer.
I now want to be able to retrieve the original client IP address, so I turned on the Proxy ...
0
votes
0answers
126 views
java.lang.UnsatisfiedLinkError: no netty-transport-native-epoll in java.library.path
I'm trying to customize the keep-alive settings on a channel created by Lettuce Redis client. I have registered a NettyCustomizer, and within the NettyCustomizer#afterBootstrapInitialized method I am ...
0
votes
0answers
24 views
Tomcat with Netty inside single application context
I have a spring application using tomcat, I would like to run netty as a parallel web server and share the application context between the two, I connected the web flux starter together with the web, ...
0
votes
0answers
16 views
Spring WebClient tcpConfiguration function not called
I am using Spring's WebClient besides security stuff i need to configure a proxy.
The client is configured this way:
public HttpClient getHttpClient() {
HttpClient httpClient = HttpClient....
3
votes
1answer
60 views
How to set DotNetty(Netty) Bootstrap.ConnectAsync timeout?
I'm using DotNetty in Unity, and has the following client bootstrap, when the server is down, it will take the "clientBootstrap.ConnectAsync()" around 17 seconds to give up trying to ...
0
votes
0answers
11 views
ReadTimeoutHandler for netty http/2 codec
Have netty some way to find out stream of the current http/2 request?
I want to set readtimeout for netty, the obvious way is ReadTimeoutHandler.
in my server intiializer I do:
ch.pipeline().addLast(
...
0
votes
0answers
14 views
What happen after the request reaches the server computer enter the Netty http server application? I want to know the technical details
If I send a Http Request from Web client to a Netty http server, and the request reaches the server.What happened after the request enter the server.Did it passed the socket? Can someone tell me the ...
0
votes
1answer
31 views
netty file upload with auth ,if the auth failed ,how can i discard the left httpConent?
i'm using netty to dev a file upload server , when a client upload a file , it needs contains the auth info like a token which put in the form body before any file . if the token is mismatch, the ...
0
votes
0answers
25 views
Set max execution timeout for Netty threads in Micronaut
I am trying to understand how to set max execution timeout (if possible at all) for Netty threads in my Micronaut app.
Currently, I have these configs set:
micronaut:
server:
read-timeout: 5
...
0
votes
0answers
37 views
Simple web CRUD WebFlux application: how can Netty be useful?
I learned from here: What's the difference between Jetty and Netty?
Netty is not a server at all.
but from here: https://stackoverflow.com/a/57297055/10894456 I see it's the server.
Anyway I guess ...
0
votes
0answers
47 views
channel closure on channel using SslHandler sometimes triggers IllegalReferenceCountException
I'm using Netty 4.1.58 [Update: and I also tried Netty 4.1.60]
Closing a channel that includes the SslHandler in its pipeline using the following methodology:
channel.writeAndFlush(Unpooled....
0
votes
0answers
21 views
Why does outgoing Netty UDP Channel close automatically?
I am implementing some Java code which means to send a periodic (1 second period) heartbeat message to a remote host. The heartbeats are sent as UDP unicast messages to the remote host. I am using ...
0
votes
1answer
29 views
run netty server in separate thread
I have the next app for running my application:
// class Server
public static void runServer(int port) {
var boss = new NioEventLoopGroup()
var worker = new NioEventLoopGroup()
var ...
0
votes
2answers
55 views
Does channel.close() actually stop scheduled tasks by channel.eventLoop().scheduleAtFixedRate()?
I am developing a device control program (Tcp Server) using Netty.
I have to send status request message every 1 second, Therefor I am using the method channel.eventLoop().scheduleAtFixedRate() and it ...
0
votes
1answer
20 views
Netty client receives the message delay
1.scene description:
Device sen data to Netty Server(about ## 20ms intervals ##), Netty Server forward msg to Client ## Immediately ##(IOS or Android).
2.Associated business code
ctx.writeAndFlush(msg)...
0
votes
1answer
29 views
Which version of Netty does DotNetty 0.6.0 align with?
As we know that DotNetty is a port of Netty to .net, I searched a lot, but couldn't find out which version of Netty is equal to the DotNetty 0.6.0 (latest DotNetty version).
If it's Netty 5, then ...
0
votes
1answer
30 views
Why does my Ktor app fail after few seconds?
I have a small Ktor app (I know it's a stupid app, I am a beginner trying to learn Ktor):
import com.auth0.jwt.JWT
import com.auth0.jwt.JWTVerifier
import com.auth0.jwt.algorithms.Algorithm
import io....
0
votes
1answer
26 views
Netty.io file transfer
As the title says, I want to transfer specific files from client to server using Netty.io. I've tried sending bytes from the client to the server, putting those bytes into an array and then create a ...
0
votes
1answer
34 views
Conditionally attach HttpObjectAggregator in the Channel Pipeline
For some use cases, eg: when it is a GET request or a WebSocket upgrade request, the HttpObjectAggregator turns out to be performance overhead and can easily be omitted.
Can I conditionally add the ...
1
vote
1answer
65 views
Uploading multiple files to the MultipartBody using declarative client Micronaut
Trying to upload multiple files to using Micronaut declarative client.
Http client
@Client("http://localhost:8080/product")
public interface IHttpClient {
@Post(consumes = MediaType....
0
votes
1answer
27 views
How can I send multi response data using Netty?(Part-2)
I posted a question with the same title before,and after that, I improved it,but a new problem occurred,so I will post it as another question.
I want to return multiple response data to a client on a ...
2
votes
1answer
31 views
webflux netty with or without hyperthreading
I created simple Webflux (kotlin) app with reactive mongo. Controller has one GET method which is return Flow (2 objects from one collection).
I used Apache Benchmark and I noticed one thing:
I have ...
0
votes
0answers
42 views
Netty HttpClient Follow Relative Redirects
I'm using Spring WebClient to pull data from an endpoint, which involves a series of redirects. The final request returns a Location header of:
Location: ./Authentication/Login
The issue I'm having ...
0
votes
0answers
39 views
Java enum not mapped with Multi part form data in the post request Micronaut 2.3.4
I have the below java enum
@Introspected
public enum ProductOptionViewModel {
SIZE, COLOR, MATERIAL, STYLE, TITLE
}
And it is used in one of the Pojo
@Introspected
public record ...