Bug 41770 - JkWorkerProperties broken in mod_jk 1.2.21
Summary: JkWorkerProperties broken in mod_jk 1.2.21
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
: 42002 (view as bug list)
Depends on:
Reported: 2007-03-06 01:57 UTC by Ulf M
Modified: 2008-10-05 03:10 UTC (History)
2 users (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Ulf M 2007-03-06 01:57:34 UTC
As of mod_jk 1.2.21 it is no longer possible to define workers via 
JkWorkerProperties directives.

Configurations that worked with previous versions now get "Error in reading 
worker properties". When the properties are moved to a separate file, there is 
no error.
Comment 1 Rainer Jung 2007-03-06 07:10:08 UTC
I have a running config which uses workers.properties and JkWorkerProperty.

Could you please attach a test case, i.e. a small example configuration with
which we can reproduce the problem.
Comment 2 Mladen Turk 2007-03-06 07:33:43 UTC
You are correct.
If there is no define JkWorkersFile mo_jk on Windows shuts
down the httpd.
If there is a JkWorkersFile directive (even pointing to an empty file)
then everything works as expected. Not sure if you reported that exactly.
Comment 3 Rainer Jung 2007-03-06 08:00:49 UTC
Aha, it's the same on the other platforms. We check for return form
jk_map_read_properties() and this returns JK_FALSE, if the file name is NULL.

So either we return JK_TRUE in case the file nae is NULL and the given map is
non empty, or we need to use a multi value return code, which distinguishes
several kinds of anomalies.

Since IIS and Netscape have no JkWorkerProperty statement, a NULL file name
really is an error for them. But maybe (it seems so) we already check for
non-NULL filenames during config parsing of IIS and netscape?
Comment 4 Björn Wiberg 2007-03-06 10:00:42 UTC
As a temporary workaround for those of you on UNIX, you may try adding:

  JkWorkersFile /dev/null

...in addition to your JkWorkerProperty directives (which still seem to apply).

Best regards,
Comment 5 Jason Corley 2007-03-06 10:35:34 UTC
Not sure if it's related, but worker.<name>.local_worker will also now toss an
error where it wouldn't in 1.2.20.  Removing the local_worker directive fixed
the error, but was surprising in a point release to say the least.
Comment 6 Rainer Jung 2007-03-06 15:18:38 UTC
When we introduced the new check for valid attributes, we carefully included all
old obsolete attributes to not break old configs. Unfortunately if one goes back
until mod_jk 1.2.6, there are two attributes that got completely removed between
1.2.8 and 1.2.9: local_worker and local_worker_only. These two slipped our
attention. So if you still have them in your configuration, the validity check
for the config will detect an unknown attribute and the web server will not start.

We should have added those two to our deprecation list long ago, then the web
server would start but log a notice, that these two properties are deprecated.

As a workaround please remove these two attributes from your configuration. They
don't work since 1.2.9 in early 2005. You can use the distance attribute to
express proximity relations.

We will add local_worker and local_worker_only to our list of deprecated
attributes in the next release, so that other users upgrading from very old
versions will still be able to start their servers, but might need to optimize
their configurations with respect to all attributes logged as deprecated during

Thanks for reporting this and sorry for the inconvenience.

And: yes, I think we are not far from starting a new major release. We tried to
improve over a lot of dot releases and the functional break was not intentional.
Comment 7 Rainer Jung 2007-03-11 08:20:46 UTC
The startup error when no JkWorkersFile is given is fixed now.
I also deleted the check for an empty init_map, because it is never empty (we
add at least one entry inside mod_jk: "ServerRoot").

The most important check is during wc_open(), where we try to create the workers.

The other startup error because of the old local_worker attribute is also fixed now.

Both fixes will be part of or 1.2.22.

Comment 8 Mladen Turk 2007-03-31 00:00:53 UTC
*** Bug 42002 has been marked as a duplicate of this bug. ***
Comment 9 Rainer Jung 2008-01-01 16:32:31 UTC
Move a couple of fixed JK issues from resolved to closed.