What is http-remoting Protocol - java

I have set up an EJB on Wildfly and wrote a client to access it. With the protocol "http-remoting" it works fine.
Unfortunately, I am not sure about the functional details of http-remoting.
I guess this is a http-tunnel of the RMI protocol. But I can't find any suitable resources about this topic. So I am really unsure.
Does anybody know how http-remoting is working as a protocol?

It's a protocol implemented in JBoss Remoting. There is a GitHub repo for it as well.
Also depending on the version of WildFly you're using you may need to use remote+http or remote+https. The http-remoting protocol will still work, but is deprecated.

From JBoss Redhat solutions site (https://access.redhat.com/solutions/3259861)
remote: is the JBoss EAP 6 remoting protocol. It is not HTTP and cannot be used through a load balancer as it is designed to make a persistent connection to a host
http-remoting
http-remoting: / https-remoting: is the JBoss EAP 7.0+ remoting protocol that uses http-upgrade, it will connect via HTTP and then use http-upgrade and switch to the remoting protocol. Though it is HTTP, it cannot be used through a load balancer for load balancing, it is designed to make a persistent connection to the remote host and remain connected until the JVM is shut down or closed by the client.
remote+http
Works the same as http-remoting.
http
In JBoss EAP 7.2 this protocol can be used as an HTTP protocol that can be used through a load balancer as it does not use http-upgrade and it can be load balanced via an HTTP load balancer.

Related

How to configure Tomcat 8 as a go-between proxy?

A Tomcat server on my server is running on port 8080.
We are in need to use the Tomcat server to get user requests and forward those to corresponding proxy server running on another server (111.111.111.111:9090, user: XXX, pw: YYY).
So: We need to configure Tomcat to transfer requests to another server.
You can't do this out of the box with Tomcat. It does not include HTTP reverse proxy functionality. You'd either need to find a 3rd-party module to do this (I'm not aware of any) or code up something yourself - e.g. using Apache HttpClient.

Proxy for Tomcat outgoing HTTP requests

I have a JavaEE web application deployed in an Apache Tomcat 7.0.6 under Windows 7 which comunicates with a remote web service to request some data. I would like to intercept the comunication between them with an HTTP proxy, like BurpSuite (http://www.portswigger.net/burp/), so I can see the HTTP messages sent and received by the JavaEE application deployed in Tomcat. Already tried to set my BurpSuite (listening on port 8090/TCP) as a proxy system in Windows 7 and specifying some options for JVM when runs Tomcat (-Dhttp.proxyHost=10.0.2.16 -Dhttp.proxyPort=8091 -Dhttps.proxyHost=10.0.2.16 -Dhttps.proxyPort=8091).
I've been looking for a way to do this but I didn't find anything usefull. Could you please give me hand?
Greetings and thanks in advance.

Websocket on Tomcat 7.0.39 on openshift

I've just successfully installed Apache Tomcat 7.0.39 on my openshift account (tomcat-ngoanhtuanthesis.rhcloud.com/). I know that tomcat 7.0.39 has supported Websocket. In my local computer, I can run my web socket aplication properly, but I cannot run it in the openshift server. However, my web service application can run very well. I've searched over the Internet for the whole week but I couldn't find any solution. Can anyone help me? Thank you in advance!
Note: here is my Web service:
tomcat-ngoanhtuanthesis.rhcloud.com/TrueTrafficServerAlpha2/
And here are some websocket examples integrated in Tomcat 7.0.39. These examples cannot run even though they are very simple.
http://tomcat-ngoanhtuanthesis.rhcloud.com/examples/websocket/
Did you read this? https://www.openshift.com/blogs/paas-websockets
WebSockects are currently under staging on openshift, and are available on alternative ports.
How to access Preview WebSockets Support?
You will need to connect to
specific ports, as the main routing layer is still Apache based and
does not support WebSockets.
So, for plain WebSockets ws:// you will use port 8000 and for secured
connections wss:// port 8443. Here's an example:
http://app-lovingwebsockets.rhcloud.com/ <= your current HTTP URL
http://app-lovingwebsockets.rhcloud.com:8000/ <= WebSockets enables HTTP URL
https://app-lovingwebsockets.rhcloud.com/ <= your current HTTPs URL
https://app-lovingwebsockets.rhcloud.com:8443/ <= WebSockets enables HTTPs URL
So, just open your samples here, and they will just work (hopefully):
https://tomcat-ngoanhtuanthesis.rhcloud.com:8443/examples/websocket/

Jasperserver email scheduling and proxy server

I've having a slight problem and i'll like you so share you opinion experience on it.I've deployed a jasperserver on tomcat 6 in a environment where anything has to pass through the proxy server to have access to the internet.
i'm wondering about where to put the proxy params and credentials. at tomcat level or at jasperserver level ?I've seen that JavaMail does support retrieving or sending mail through proxy server.Another thing is that i've also seen that all Java Tcp can be configured using the Java Runtime to direct socket connection to the proxy server which can harm performance.
What other options do i have?
thanks for reading this!

Tomcat/IIS closes socket after http response has completed

I am using JBoss 4.0.4 GA, which has Tomcat Servlet Container 5.5.
I also have IIS 6.0 redirected to this JBoss. (via IIS tomcat connector, which is used as ISAPI filter in IIS).
All is working OK, configured the workers as described.
Here is a piece of workers.properties file of the connector:
#
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.jboss0_ajp13.port=8009
worker.jboss0_ajp13.type=ajp13
worker.jboss0_ajp13.host=localhost
worker.jboss0_ajp13.socket_keepalive=1
worker.jboss0_ajp13.socket_timeout=300
But when connecting to the application via IIS (port 80), for each completed HTTP response for HTTP request, the socket is closed (FIN is sent on the TCP layer).
This causes severe slowdowns, since the application is working over WAN. (for each closed socket, another one needed to be established, which takes 500ms).
This is not happening when connecting to JBoss web server directly, and also not happening when connecting to a different virtual directory on the same WebServer instanse of IIS (i.e. Keep-Alive in IIS is also configured).
This happens with the latest version of tomcat IIS connector.
Do you know if there is a bug in the connector, or there is a problem with my configuration?
Thanks in advance,
Henry.
I filed a bug in Bugzilla for tomcat IIS redirector, and this is the answer I've got:
Up until 1.2.27 this was the behaviour of the IIS connector (IIS forces all
ISAPI extensions to implement their own HTTP keep alive, and the IIS connector
didn't do this).
In 1.2.27 there's experimental, build-time, support for HTTP 1.1 chunked
encoding, which should permit persistent connections.
(I've been using pretty much the same code in production systems for about 4
years, but it should be considered experimental in the JK codebase until it's
been stable for a while).
Grab the -chunked binary from one of the download mirrors and read about how to
configure chunked encoding in the 1.2.27 release notes (you have to get the
right build, and enable it in your config).
You can verify that the connector is using chunked encoding with debug logging
on, and a TCP/Wireshark trace should show connections being reused.
If you're still getting closed connections, and the logs show that the
connector is attempting (or should be attempting) chunked encoding, then it's
probably best to discuss on the users list and then reopen with another
Wireshark trace + connector debug log once you're sure there's an issue.
So, what I did:
Put isapi_redirect.dll with chunking support.
Configured the isapi_redirect.properties with the following:
enable_chunked_encoding=1
Restarted IIS.
The socket is probably being closed by IIS. The connection between JBoss and IIS should be irrelevant to the HTTP socket being persisted or not. Ensure that IIS is configured to support persistent HTTP/1.1 sockets.
However, you point out that another virtual directory in IIS does not have the same problem. It could be a problem with the specific virtual directory that is having problems. However, it could also be something in the IIS/Tomcat connector.
To investigate whether it is the IIS/Tomcat connector, try setting
worker.jboss0_ajp13.connection_pool_size=10
worker.jboss0_ajp13.connection_pool_timeout=600
to see if it makes any difference at all. See Tomcat Workers Docs (including the section at the bottom "A sample worker.properties"). See if any of the parameters mentioned there help you out.

Categories