Mod_cluster doesn't work with http-only flag
jmsantuci Aug 1, 2016 3:11 PMI'm trying to configure a WildFly 10 server with mod_cluster and http-only flag equals to true in session-cookie of undertow subsystem, but I get in error. To reproduce the problem execute the following steps:
1. Start WildFly 10 in domain mode
2. Setup the mod_cluster Apache proxies using CLI
/socket-binding-group=full-ha-sockets/remote-destination-outbound-socket-binding=mc-proxy-1:add(host=apache-server, port=6666)
/profile=full-ha/subsystem=modcluster/mod-cluster-config=configuration:write-attribute(name=proxies, value=[mc-proxy-1])
3. Start the server-three of original config using CLI
/host=master/server-config=server-three:start
The mod_cluster works properly, but if I setup the http-only flag in undertow session-cookie to true and restart the server, the following errors are generated in console:
2016-08-01 14:42:20,623 ERROR [org.jboss.modcluster] (UndertowEventHandlerAdapter - 1) MODCLUSTER000042: Error MEM sending STATUS command to apache-server/10.0.0.1:6666, configuration will be reset: MEM: Can't read node
2016-08-01 14:42:30,626 ERROR [org.jboss.mod_cluster.undertow] (UndertowEventHandlerAdapter - 1) null: java.lang.NullPointerException
at org.jboss.modcluster.mcmp.impl.DefaultMCMPRequestFactory.createConfigRequest(DefaultMCMPRequestFactory.java:128)
at org.jboss.modcluster.mcmp.impl.ResetRequestSourceImpl.getResetRequests(ResetRequestSourceImpl.java:89)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:399)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:365)
at org.jboss.modcluster.ModClusterService.status(ModClusterService.java:457)
at org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapter.run(UndertowEventHandlerAdapter.java:179)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
To setup undertown and restart the server I used the following CLI commands:
/profile=full-ha/subsystem=undertow/servlet-container=default/setting=session-cookie:add(http-only=true)
/host=master/server-config=server-three:restart
I attached the Apache and WildFly configuration files and log files of both.
I would like to know if it is possible to use mod_cluster with the flag HttpOnly in JSESSIONID cookie.
-
mod_cluster.conf.zip 495 bytes
-
domain.xml.zip 6.6 KB
-
error_log.zip 4.7 KB
-
access_log.zip 309 bytes
-
server.log.zip 6.8 KB