How is "jetty.http.idleTimeout=2000" used in jetty? - web-services

I am configuring this parameter jetty.http.idleTimeout to set the idle timeout in jetty. I would like to know how this parameter is used in jetty. I am referring to this repository below . thanks.
https://github.com/eclipse/jetty.project

The jetty.http.idleTimeout is a jetty-start property (not a parameter).
It can be configured in any jetty-start based Configuration Source (${jetty.base}, any jetty-dir, ${jetty.home}, or command line)
It's only used by the http module.
And is configuring Jetty via the jetty-http.xml file.
You can use github search to know all of this too.
https://github.com/eclipse/jetty.project/search?p=2&q=jetty.http.idleTimeout

Related

S3Client and Quarkus Native App Issueu with Runn

I am trying to create a lambda S3 listener leveraging Lambda as a native image. The point is to get the S3 event and then do some work by pulling the file, etc. To get the file I am using het AWS 2.x S3 client as below
S3Client.builder().httpClient().build();
This code results in
2020-03-12 19:45:06,205 ERROR [io.qua.ama.lam.run.AmazonLambdaRecorder] (Lambda Thread) Failed to run lambda: software.amazon.awssdk.core.exception.SdkClientException: Unable to load an HTTP implementation from any provider in the chain. You must declare a dependency on an appropriate HTTP implementation or pass in an SdkHttpClient explicitly to the client builder.
To resolve this I added the aws apache client and updated the code to do the following:
SdkHttpClient httpClient = ApacheHttpClient.builder().
maxConnections(50).
build()
S3Client.builder().httpClient(httpClient).build();
I also had to add:
[
["org.apache.http.conn.HttpClientConnectionManager",
"org.apache.http.pool.ConnPoolControl","software.amazon.awssdk.http.apache.internal.conn.Wrapped"]
]
After this I am now getting the following stack trace:
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:86)
... 76 more
I am running version 1.2.0 of qurkaus on 19.3.1 of graal. I am building this via Maven and the the provided docker container for Quarkus. I thought the trust store was added by default (in the build command it looks to be accurate) but am I missing something? Is there another way to get this to run without the setting of the HttpService on the S3 client?
There is a PR, under review at the moment, that introduces AWS S3 extension both JVM & Native. AWS clients are fully Quarkified, meaning configured via application.properties and enabled for dependency injection. So stay tuned as it most probably be available in Quarkus 1.5.0

Talend : modifying Webservice call timeout on a job

I have a job, using a tESBConsumer component to call a distant webservice.
This webservice takes between 55-65s to answer : default timeout is set to 60s : I have sometimes read Timeout on this webservice call, I want to push it a bit.
I am deploying the job on a jobserver (not on karaf, as we have split configuration : karaf is for services only, jobserver for the jobs).
Thus, talend advice on configuring timeout is to use the org.apache.cxf.http.conduits-common.cfg file, which is a file only available on a Karaf, not on a jobserver ! (See talend doc)
=> Is there a way to configure read timeout option on a jobserver ?
Actually, using the advanced settings of tESBConsumer works in this case, even if it says that it is only working on the studio.
So the "timeout" fields could be used for a deployment on a jobserver.

is there any option to give management or service port as system arguement in wso2 other than portOffset?

I wanted to pass the management console port(specified in catalina-server) and service http port(specified in axis2.xml) as system properties (using -DmgmntPort=9292 -DservPort=8282) while starting wso2 server. I tried -DhttpsPort but not working. please help
I don't think there is an option to allow such usage. I looked into startup script and found, that port always by default 9443, but you can configure offset.
It means if u have offset 10 then actual port number will be 9453 = 9443 + 10
example of such command bellow. Lets consider that u distribution located in /var/lib/wso2esb-4.9.0
rename WSO_HOME/repository/conf/carbon.xml to carbon.original.xml
then add to startup script handler for input variale of offset. Lets call it offset
command
sed "s/<Offset>0<\/Offset>/<Offset>$offset<\/Offset>/" /var/lib/wso2esb-4.9.0/repository/conf/carbon.original.xml > /var/lib/wso2esb-4.9.0./repository/conf/carbon.xml
will create new carbon.xml in proper directory and it will be used to configure ports.
Use -DportOffset= [offset value] when you start the server.
Ex:
./wso2server.sh -DportOffset=3

Web Service Data Stage

I get the following error:Service Invocation Exeption i am working with Version 8.7 IBM InfoSphere DataStage and QualityStage Designer and using a server job and there, i have 1 sequential file, web service, sequential file.
Any idea what could be the reason of this error ?
Make sure you have chosen proper DataStage job type and your stage that operates on web service is configured properly.
You should also check the DataStage logs to get more information about root cause of the error.

Setting Tomcat 7 sessionid and value to be identified via Hardware Load Balancing for session affinity

Although easily done from my perspective with IIS, I'm a total noob to Tomcat and have no idea how to set static values for cookie contents. Yes I've read the security implications and eventually will access via SSL so I'm not concerned. Plus I've read the Servlet 3.0 spec about not changing the value and I accept that.
In IIS I would simply set a HTTP Header named Set-Cookie with an arbitrary setting of WebServerSID and a value of 1001.
Then in the load balancer VIP containing this group of real servers, set the value WebServerSID at the VIP level, and for the first web server a cookie value of 1001 and so one for the remaining machines 1002 for server 2, 1003 for server 3.
This achieves session affinity via cookies until the client closes the browser.
How can this be done with Tomcat 7.0.22?
I see a great deal of configuration changes have occurred between Tomcat 6.x and 7.x with regard to cookies and how they're set up. I've tried the following after extensive research
over the last week.
In web.xml: (this will disable URL rewriting under Tomcat 7.x)
<tracking-mode>COOKIE</tracking-mode> under the default session element
In context.xml: (cookies is true by default but I was explicit as I can't get it working)
cookies=true
sessionCookiePath=/
sessionCookieName=WebServerSID
sessionCookieName=1001
I have 2 entries in context.xml for sessionCookieName because the equivalent commands from Tomcat 6.x look like they've been merged into 1.
See http://tomcat.apache.org/migration-7.html#Tomcat_7.0.x_configuration_file_differences
Extract:
org.apache.catalina.SESSION_COOKIE_NAME system property: This has been removed. An equivalent effect can be obtained by configuring the sessionCookieName attribute for the global context.xml (in CATALINA_BASE/conf/context.xml).
org.apache.catalina.SESSION_PARAMETER_NAME system property: This has been removed. An equivalent effect can be obtained by configuring the sessionCookieName attribute for the global context.xml (in CATALINA_BASE/conf/context.xml).
If this is not right then I simply do not understand the syntax that is required and I cannot find anywhere that will simply spell it out in plain black and white.
Under Tomcat 6.x, I would have used Java Options in the config like:
-Dorg.apache.catalina.SESSION_COOKIE_NAME=WebServerSID
-Dorg.apache.catalina.SESSION_PARAMETER_NAME=1001
The application I'm using does not have any of these values set elsewhere so it's not the application.
All these settings are in context/web/server.xml files at the Catalina base
At the end of the day what I need to see in the response headers under Set-Cookies: (as seen using Fiddler) is:
WebServerSID=1001
NOT
JSESSIONID=as8sd9787ksjds9d8sdjks89s898
thanks in advance
regards
The best you can do purely with configuration is to set the jvmRoute attribute of the Engine which will add the constant value to the end of the session ID. Most load-balancers can handle that. It would look like:
JSESSIONID=as8sd9787ksjds9d8sdjks89s898.route1
If that isn't good enough and you need WebServerSID=1001 you'll have to write a ServletFilter and configure that to add the header on every response.