Questions tagged [grizzly]
The Grizzly NIO and Web framework leverage Java™ NIO API capabilities. Grizzly's helps developers to build scalable and robust servers using NIO and we are also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.
478
questions
0
votes
0answers
13 views
How to enable monitoring on Grizzly http server?
I am trying to understand how to enable http monitoring and how do I add monitoring probes to the grizzly http server configuration. Also, which http REST endpoint will give me the monitored details. ...
0
votes
0answers
31 views
How to turn off glassfish (tyrus/grizzly) loggers
I want to turn off glassfish loggers. I researched documentation and nothing found...
13:31:27 [SEVERE] jan 17, 2021 1:31:27 PM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started ...
1
vote
0answers
18 views
backpressure support in grizzly websocket
Does the grizzly web socket library support flow control/back pressure ?
If so, which version of grizzly web socket library supports the back pressure ? please share the library /documentation links.
...
1
vote
0answers
8 views
How do I redirect any invalid links to index.html?
I am using grizzly glassfish to start my server. However, I cannot find a way to redirect invalid links. Any ideas?
0
votes
0answers
19 views
Glassfish grizzly fixed thread pool getTask blocking request execution
After recreating glassfish5 server from snapshot, requests started to take much longer time than on other environments (with same configuration).I fired up some sampling and found out that 80% of time ...
0
votes
1answer
17 views
How can I access the client certificate in a Grizzly server resource without a servlet context?
I'm using a Grizzly server to serve up my secure jersey resource. The resource expects client authentication and that the client certificate's subjectDN CN portion contains a username I can use for ...
0
votes
0answers
21 views
How to running a Grizzly-based application on port 80 without privileged user, using JSVC
I've developed a REST micro service using Jersey and Grizzly and I would like to run it on a Linux machine on port 80 using an unprivileged account, for security purposes. I already use JSVC to manage ...
0
votes
0answers
34 views
How to JUnit test a Jersey REST server while using Cucumber?
Needless to say I am new to Cucumber. In the past I have used Grizzly to test my API and is fantastic. However, it seems impossible to use Cucumber and Grizzly together to test. I keep getting ...
0
votes
1answer
60 views
Intercept SSL/TLS requests in HTTPS Grizzly server
I have set up an HTTPS server using grizzly 2.3.30 and jersey 2.25.1, which can be found here.
The server works well and I can curl to it with certificate-authority, certificate and key:
curl -v --...
1
vote
1answer
110 views
run java server from python and wait until it is up
So I run java server from terminal calling it with:
java =Xmx12G - jar jar.jar --build ../foo --inMemory
then it takes some time for the server to step up, sometimes a minute sometime more.
I want ...
1
vote
1answer
32 views
Sent many requests asynchonized to http server but it only serves a few request at a time
I'm facing to this issue:
I have a grizzly embedded http server running. By sending 200 asynchronous requests to the server (using ExecutorService in java), I thought it would serve all these request ...
1
vote
0answers
61 views
how to prevent Heroku H12 “request timeout” for long-running process on Java REST server
We have a Jersey/Grizzly server which serves as our REST backend. Certain requests can easily take longer than 30s to process, which is perfectly normal. Sadly, Heroku terminates the connection ...
1
vote
0answers
76 views
Java Grizzly HTTP Server working to capacity 100% CPU usage on some threads
Im using the Grizzly Http Server on my webserver to serve a REST API. After some time the server is working more and more to full capacity even there are no more users online.
In htop i can see that ...
0
votes
0answers
1k views
Jersey endpoint with SEVERE: An I/O error has occurred while writing a response message entity to the container output stream
I have a jersey v2.30 application using jersey-container-grizzly2-http and jersey-grizzly-connector. I have an endpoint which returns a pdf file, the endpoint seems to work which means the client gets ...
1
vote
0answers
73 views
Grizzly 2.4.4 Closed WebSockets Memory Leak
I was asked to analyze heap dump that caused out of memory on environment.
The project is using grizzly 2.4.4 websockets module.
The issue is that under high load (websocket connections) - when ...
0
votes
1answer
45 views
How to deploy Jersey+Grizzly jar to AWS
I was wondering how can you deploy a Jar file that contains a self-contained app (grizzly) with Jersey framework to AWS Elestic Bean, I've been trying to deploying it by choosing the genereated jar ...
1
vote
0answers
66 views
Will Servlet be better than reactive-bssed web framework when Fibers arrive?
It looks like new frameworks are being written on top of reactive-based libraries and framworks, ditching Servlet.
I'm writing ny own web framework on top of Grizzly HTTP framework (I could have ...
0
votes
1answer
64 views
Mulesoft - cloudhub runtime update issues - HTTP connector
I am updating the runtime version of an application in cloudhub(anypoint platform - mulesoft).
In detail, updated the runtime 3.9.0 -2018 release to runtime 3.9.0 - 2019 latest version. I am able to ...
1
vote
1answer
187 views
Jersey POST parameter values always null, but works fine with curl command
Jersey server code:
import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("test")
public class ...
0
votes
1answer
203 views
How to deploy a Jersey REST server to Heroku
The "getting started" example for Jersey uses Grizzly, so we went with that. This allowed us to configure authentication in a fairly straightforward manner, thusly:
private static final String ...
0
votes
1answer
138 views
Grizzly PRESERVE_HEADER_CASE
I need to make Grizzly not alter the headers keys.
I found this property PRESERVE_HEADER_CASE but no idea where to configure
Any idea?
Regards
0
votes
1answer
276 views
HTTP POST Angular to Java. Cannot send multiple parameters with different types
I am trying to send an uploaded file (FormData from Angular) and a string in the same HTTP POST request to backend (Java using Grizzly server and Ajax for REST services).
The problem is that I receive ...
1
vote
0answers
62 views
Always the same warnings while trying to get a basic sse grizzly/jersey server running
I'm trying to get better at java with a project that i wanted to try with SSE but while trying to implement the examples of jersey they always give the same 'warnings'.
I first tried to research it ...
0
votes
1answer
31 views
How to execute async calculation and handle other http requests at the same time?
I want to handle several http request simultaneously. What means that I want the thread that get the http request will move the handle of the request to another thread and will be available for ...
1
vote
0answers
57 views
SSE in Jersey: Could not find a suitable constructor in javax.ws.rs.sse.Sse class
I am implementing Server Sent Events with Jersey 2.28 and I can't get the basic examples to work.
Other answers mention a dependency problem, I've added all the necessary dependencies to no avail:
&...
0
votes
2answers
78 views
Recovering/ retrying in case of failed or stucked HTTP requests
I have a Java-based server managed by the kubernetes cluster. It's a distributed environment where the number of the instance is set to 4 to handle millions of request per minute.
The issue that I am ...
-1
votes
1answer
55 views
do I need to restart the server every time i change a resource?
I want to know if every time I make any changes to a resource, do I need to restart the server? I am inexperienced in the area, I would like content for best practice to build an API.
0
votes
1answer
427 views
JWT.decode(token) Fails Silently
I have written a JAX-RS ContainerRequestFilter to implement JWT-based access controls on a set of REST services but the application fails to decode the JWT id_token.
My web client successfully ...
0
votes
2answers
83 views
Sporadic 502 errors from java web application running on Grizzly
We are getting sporadic 502 errors from our web application; we can reproduce this by repeating the same call multiple times: at the 8th-12th time it hangs for ~30 seconds and then returns a "502 ...
0
votes
0answers
29 views
Unsupported media type exception while running simple rest service using grizzly HttpServer [duplicate]
I am trying to run a simple HttpService using grizzly HttpServer and jax-rs
But my post call to the service returns Unsupported Mediatype Error(Status code 415)
when I try to run the service by ...
1
vote
1answer
176 views
What are advantages of using servlets when building rest api in java
I have been working on several projects (and some of them were quite big) where we always used grizzly2-http server + jersey for building rest api and we never had any problems. Now, I have been ...
0
votes
0answers
50 views
How test HttpservletRequest with@Context parameter in JerseyTest? [duplicate]
I have a broken unit test after trying do get the HttpServletRequest that is passed as a parameter in a Jersey Web Service post call:
@RequestScoped
@Path("/por/req")
@Produces({ MediaType....
2
votes
1answer
180 views
Jersey resource @PreDestroy not getting called when Grizzley server is shut down
I'm running a simple Jersey/Grizzly HTTP server with a resource to handle server-sent events.
That resource needs to manually take care of a Timer instance to send some keep-alive data to all ...
1
vote
1answer
283 views
How to Turn off Grizzly Logging?
How can I turn off the Logging of Grizzly?
I'd like to turn off following Loggings:
Okt 18, 2018 8:42:24 AM org.glassfish.grizzly.http.server.NetworkListener start
INFORMATION: Started listener ...
0
votes
0answers
397 views
grizzly tutorial java.net.ConnectException
I followed this tutorial : https://javaee.github.io/grizzly/quickstart.html
(it contains 4 files: ClientFilter,EchoClient, EchoFilter, EchoServer)
The aim of this tuto is First that the server echo ...
3
votes
0answers
284 views
How do I get HTTP request logs on grizzly server console?
Following the tutorial on Jersey's user guide, I created a small jax-rs based REST web application. This is the main class that starts the server.
public class Main {
// Base URI the Grizzly HTTP ...
3
votes
1answer
2k views
“NoClassDefFoundError: javax/inject/Provider” even with javax.inject dependency included
After upgrading some Glassfish/Grizzly dependencies (in order to be compatible with the latest version of Azure's SDK IOT device client), I started getting an error because com.google.common.EventBus ...
0
votes
1answer
275 views
Jersey + Grizzly behind Apache reverse proxy - Resource not found
I am having a jersey based REST Application which is running on grizzly and configured it as follows behind an apache reverse proxy
e.g. www.example.com/base/json/helloworld/get should redirect to my ...
0
votes
1answer
158 views
How to add ServletContainerInitializer to Grizzly WebappContext?
I create Grizzly WebappContext this way:
WebappContext webContext = new WebappContext("WebappContext", "");
And I have MyInitializer that implements ServletContainerInitializer. How can I add this ...
1
vote
3answers
2k views
How to return a string in response that have @Produces(MediaType.APPLICATION_JSON)?
@GET
@Path("/paises/{id}")
@Produces(MediaType.APPLICATION_JSON)
public Response findCuntryList(@PathParam("id")int id){
try{
ArrayList<Country> lista = new ArrayList<>();
for(...
0
votes
2answers
884 views
Drools Guided Decision Table throws null pointer exception
When i create a guided decision table in kie workbench i get null pointer exception on execution of a stateless or statefull kie session. To be more specific i use drools 7 and i expose a simple rest ...
1
vote
0answers
183 views
Grizzly KeepAlive issue with filterchain
I've added a Filter to the filterchain in grizzly just before the httpserver filter to limit the amount of http requests that the server has to handle. This works fine until the user adds a Connection:...
1
vote
1answer
376 views
Allow DELETE requests with message body, using Grizzly servlet container
I was testing my REST API through Postman, with some dummy requests and I noticed when a DELETE request accidently had a message body, the server always returned with status code 400 (and no message). ...
1
vote
1answer
335 views
Making standalone grizzly2 JAX-RS accept an encoded URL in the URL?
I am experimenting with enclosing a possibly leaky library in its own standalone JVM and invoke it using REST. I have a Java EE 7 web app which does this, but I would like a stand alone version. To ...
0
votes
1answer
88 views
Why isn't Docker opening a port? (using Maven Grizzly Jenkins Blue-Ocean )
Modifying one of the tutorials in the jenkins/blue-ocean tutorial for java to create a webapp.
Jenkinsfile contains:
docker {
image 'maven:3-alpine'
args '-v /root/.m2:/root/.m2 -p 8050:8050'
}
...
1
vote
0answers
601 views
Netty vs Grizzly detailed differences
Looking for differences between these two. The most information i was able to find is about performance. Netty has much better community for sure they also a little differentiate in transport protcols....
0
votes
2answers
220 views
Rest API SSL With certs signed by ca
I have a problem with Secure Grizzly HttpServer, my method load the keystore file and truststore file and she works for the certs self-signed.
private static SSLContextConfigurator ...
0
votes
2answers
286 views
View Engine for Grizzly, Jersey, and Ozark MVC
I'm trying to create an MVC app using Java EE MVC API implementation - Ozark. I'm using Grizzly as embedded web server. Of course, with Ozark is a JAX-RS implementaion - Jersey.
This is my server ...
0
votes
2answers
1k views
Unable to start Grizzly http server
I am getting below error when I try starting Grizzly server from Java code. Please help.
javax.ws.rs.ProcessingException: Failed to start Grizzly HTTP server: Cannot assign requested address: bind
...
4
votes
0answers
357 views
Jersey + Grizzly Http Container + shared ServiceLocator + custom Worker Thread Pool
I need to change the thread pool of the underlying Grizzly transport layer.
According to the docs of GrizzlyHttpServerFactory:
Should you need to fine tune the underlying Grizzly transport layer, ...