• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF2016 uriworkermap.properties not loading in Apache2 Virtualhost

Explorer ,
Aug 03, 2016 Aug 03, 2016

Copy link to clipboard

Copied

Hello Community!

Working on application isolation paired with multi instance load balancing and came across what I would consider a bug.

The uriworkermap.properties file included in the mod_jk.conf for Apache on RHEL 7 is seemingly completely ignored by my virtualhost.

In all the documentation I came across, the uriworkermap.properties is where to specify the mount points for each of the workers.

What clued me into it not working as I had anticipated, was that every time I ran ab to test the load balancing between different application paths, the first worker listed in workers.properties->worker.list would always handle the requests.

The solutions I have come across so far :

1. Include the uriworkermap.properties inside of the <virtualhost> config

JkMountFile "/opt/coldfusion2016/config/wsconfig/1/uriworkermap.properties"

2. Or Add JkMount entries in the <virtualhost> config

#Load balanced application isolation

JkMount /mysecureapp1 secureapps

JKMount /mysecureapp1/* secureapps

JKMount /* generalapps

I am very curious if this is by design.

Here is the setup and configs (minus the tomcat instance's server.xml files) if anyone cares to have a look.

Setup :

RHEL 7 X64 Minimum install

Coldfusion2016 Enterprise Edition patched to 2016.0.02.299200

Tomcat Version 8.0.32.0

Java JRE Server 1.8.0_102

mod_jk shipped with cf2016

Config Files :

/etc/httpd/conf/httpd.conf  (tail end)

# Supplemental configuration

#

# Load config files in the "/etc/httpd/conf.d" directory, if any.

IncludeOptional conf.d/*.conf

Include "/etc/httpd/conf/mod_jk.conf"

/etc/httpd/conf/mod_jk.conf

# Load mod_jk module

LoadModule    jk_module  "/opt/coldfusion2016/config/wsconfig/1/mod_jk.so"

# Where to find workers.properties

JkWorkersFile "/opt/coldfusion2016/config/wsconfig/1/workers.properties"

JkMountFile "/opt/coldfusion2016/config/wsconfig/1/uriworkermap.properties"

# Where to put jk logs

JkLogFile "/opt/coldfusion2016/config/wsconfig/1/mod_jk.log"

# custom environment variables

JkEnvVar REDIRECT_URL

JkEnvVar REDIRECT_REMOTE_HOST

JkEnvVar REDIRECT_PATH

JkEnvVar REDIRECT_QUERY_STRING

JkEnvVar REDIRECT_HTTP_ACCEPT

JkEnvVar REDIRECT_HTTP_USER_AGENT

JkEnvVar REDIRECT_REMOTE_ADDR

JkEnvVar REDIRECT_SERVER_NAME

JkEnvVar REDIRECT_SERVER_PORT

JkEnvVar REDIRECT_SERVER_SOFTWARE

# Where to put jk shared memory

JkShmFile "/opt/coldfusion2016/config/wsconfig/1/jk_shm"

# Set the jk log level [debug/error/info]

JkLogLevel info

# Select the timestamp log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf

DirectoryIndex index.cfm

Alias /cf_scripts "/opt/coldfusion2016/cfusion/wwwroot/cf_scripts"

<Directory "/opt/coldfusion2016/cfusion/wwwroot/cf_scripts">

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

</Directory>

<Files ~ ".hbmxml$">

Require all denied

</Files>

/opt/coldfusion2016/config/wsconfig/1/workers.properties

worker.list=generalapps,secureapps,tomcatstatus

worker.cfusion1.type=ajp13

worker.cfusion1.host=localhost

worker.cfusion1.port=8012

worker.cfusion1.max_reuse_connections=250

worker.cfusion1.lbfactor=1

worker.cfusion1.cachesize=30

worker.cfusion1.route=cfusion1

worker.cfusion2.type=ajp13

worker.cfusion2.host=localhost

worker.cfusion2.port=8013

worker.cfusion2.max_reuse_connections=250

worker.cfusion2.lbfactor=1

worker.cfusion2.cachesize=30

worker.cfusion2.route=cfusion2

worker.cfusion3.type=ajp13

worker.cfusion3.host=wt-cf2016-2

worker.cfusion3.port=8012

worker.cfusion3.max_reuse_connections=250

worker.cfusion3.lbfactor=1

worker.cfusion3.cachesize=30

worker.cfusion3.route=cfusion3

worker.cfusion4.type=ajp13

worker.cfusion4.host=wt-cf2016-2

worker.cfusion4.port=8013

worker.cfusion4.max_reuse_connections=250

worker.cfusion4.lbfactor=1

worker.cfusion4.cachesize=30

worker.cfusion4.route=cfusion4

worker.tomcatstatus.type=status

worker.secureapps.type=lb

worker.secureapps.balance_workers=cfusion1,cfusion3

worker.secureapps.sticky_session=false

worker.generalapps.type=lb

worker.generalapps.balance_workers=cfusion2,cfusion4

worker.generalapps.sticky_session=false

/opt/coldfusion2016/config/wsconfig/1/uriworkermap.properties

/mysecureapp1=secureapps

/mysecureapp1/*=secureapps

/*=generalapps

Views

485

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation