-
1. Re: EJB Client behind HTTP Proxy unable to connect to Wildfly 12
jewellgm Oct 1, 2018 12:34 PM (in response to nebeleben)I don't know whether you are using those exact properties listed above, or if they are a simple copy/paste error, but there is no "http.proxyProxyPort" or "https.proxyProxyPort" property. They should be "http.proxyPort" and "https.proxyPort", respectively.
Normally, if you set "java.net.useSystemProxies" to "true", Java will use the global proxy settings of the OS. Setting the other properties overrides this though. I don't know what happens if you override the "proxyHost" property, but don't override the "proxyPort" property. Based on your original post, it is possible that you are doing this.
Another thing to consider is whether the client is on the same network as the server. If it is, you'll typically want to bypass the proxy. You can do that by setting the "http.nonProxyHosts" property. There is no "https" version of that property -- the "http" version applies to both protocols. The values of this property are delimited with the "|" character, and may contain wildcard values.
-
2. Re: EJB Client behind HTTP Proxy unable to connect to Wildfly 12
nebeleben Oct 4, 2018 8:11 AM (in response to jewellgm)Yes there was a copy/paste error in the listed properties. I corrected it.
As already mentioned our connection trough a proxy server works just fine when connecting to the apache on port 8080, so the used proxy settings are correct.
What does not work, is the connection for the EJB Client using the wildfly-naming-client lib, which does work when not using a proxy
AuthenticationContext authContext = AuthenticationContext.empty().with(MatchRule.ALL.matchHost(config.getHost()), authConfig);
Callable<Void> callable = () -> {Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
properties.put(SCOPED_CONTEXT, true);
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS, password);
String address = config.getProtocol() + "://" + config.getHost() + ":" + config.getPort();
if (config.getEjbOverHttp()) {address = address + HTTP_SERVICES;
}properties.put(Context.PROVIDER_URL, address);
context = (Context) new InitialContext(properties).lookup("ejb:");};
authContext.runCallable(callable); -
3. Re: EJB Client behind HTTP Proxy unable to connect to Wildfly 12
nebeleben Oct 23, 2018 5:12 AM (in response to nebeleben)So in our opinion the Wildfly 12 stack does not support connection from EJB Client to server trough a forward proxy.
Therefor we are planning to offer our EJB services as well as Web Services trough javax-ws and adapt our datamodel so it will be possible to marshall/unmarshall with JAXB.
Seems to be quite a lot of work but at least this will work as well when a proxy is involved in client/server communication.