https://issues.apache.org/bugzilla/show_bug.cgi?id=54596
Bug ID: 54596 Summary: Relative paths truncates last character of values Product: Tomcat Connectors Version: 1.2.37 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: isapi Assignee: dev@tomcat.apache.org Reporter: br...@rmt.com.au Classification: Unclassified Hi Team, Found the below issue on the following environment: Windows Server 2008 R2 Datacentee (64 bit) IIS 7.5 & Tomee 1.5.1 isapi_redirect.dll 1.2.37 (64 bit) Issue: Utilising relative paths in properties file for the various configuration files (log, workers.properties, uriworkermap.properties) truncates last character of the string value. ############################################################ ISAPI_REDIRECT.PROPERTIES # Configuration file for the Jakarta ISAPI Redirector # The path to the ISAPI Redirector Extension, relative to the website # This must be in a virtual directory with execute privileges extension_uri=/mywebapp/isapi_redirect.dll # Full path to the log file for the ISAPI Redirector log_file=jk_iis.log # Log level (debug, info, warn, error or trace) log_level=debug # Full path to the workers.properties file worker_file=workers.properties # Full path to the uriworkermap.properties file worker_mount_file=uriworkermap.properties ############################################################ ... all files do exist in the same C:\Tomee\connectors\ folder. If I specify absolute paths (C:\Tomee\connectors\uriworkermap.properties), everything works fine. If I use relative paths with log and config file outside of dll/properties files folder, no log file generated making it difficult to debug. If I use relative paths with all files in the same folder, a jk_iis.lo (missing the g) file is created with the following output: [Fri Feb 22 13:57:32.490 2013] [7920:7680] [debug] jk_set_time_fmt::jk_util.c (461): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] ' [Fri Feb 22 13:57:32.490 2013] [7920:7680] [info] init_jk::jk_isapi_plugin.c (2690): Starting Jakarta/ISAPI/isapi_redirector/1.2.37 [Fri Feb 22 13:57:32.490 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2701): Detected IIS version 7.5 [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2703): Using ini file C:\Tomee\connectors\isapi_redirect.properties. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2709): Using log file C:\Tomee\connectors\jk_iis.lo. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2710): Using log level 1. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2711): Using log rotation time 0 seconds. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2712): Using log file size 0 bytes. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2714): Using extension uri /mywebapp/isapi_redirect.dll. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2715): Using worker file C:\Tomee\connectors\workers.propertie. [Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2716): Using worker mount file C:\Tomee\connectors\uriworkermap.propertie. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2718): Using rewrite rule file . [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2720): Using uri select 3. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2721): Using no chunked encoding. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2723): Using notification event SF_NOTIFY_AUTH_COMPLETE (0x04000000) [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2733): Using uri header TOMCATURI0000000180000000:. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2734): Using query header TOMCATQUERY0000000180000000:. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2735): Using worker header TOMCATWORKER0000000180000000:. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2736): Using worker index TOMCATWORKERIDX0000000180000000:. [Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2737): Using translate header TOMCATTRANSLATE0000000180000000:. [Fri Feb 22 13:57:32.536 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c (2738): Using a default of 250 connections per pool. [Fri Feb 22 13:57:32.536 2013] [7920:7680] [error] uri_worker_map_load::jk_uri_worker_map.c (1241): Failed to load uri_worker_map file C:\Tomee\connectors\uriworkermap.propertie (errno=2, err=No such file or directory). Furthermore... if I use the following configuration: ############################################################ ISAPI_REDIRECT.PROPERTIES # Configuration file for the Jakarta ISAPI Redirector # The path to the ISAPI Redirector Extension, relative to the website # This must be in a virtual directory with execute privileges extension_uri=/mywebapp/isapi_redirect.dll # Full path to the log file for the ISAPI Redirector log_file=jk_iis.log # Log level (debug, info, warn, error or trace) log_level=debug # Full path to the workers.properties file worker_file=..\conf\workers.properties # Full path to the uriworkermap.properties file worker_mount_file=..\conf\uriworkermap.properties ############################################################ I get the output: [Fri Feb 22 14:06:06.888 2013] [7976:8040] [debug] jk_set_time_fmt::jk_util.c (461): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] ' [Fri Feb 22 14:06:06.888 2013] [7976:8040] [info] init_jk::jk_isapi_plugin.c (2690): Starting Jakarta/ISAPI/isapi_redirector/1.2.37 [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2701): Detected IIS version 7.5 [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2703): Using ini file C:\Tomee\connectors\isapi_redirect.properties. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2709): Using log file C:\Tomee\connectors\jk_iis.lo. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2710): Using log level 1. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2711): Using log rotation time 0 seconds. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2712): Using log file size 0 bytes. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2714): Using extension uri /mywebapp/isapi_redirect.dll. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2715): Using worker file C:\Tomee\connectors\conf\workers.properties. [Fri Feb 22 14:06:06.903 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2716): Using worker mount file C:\Tomee\connectors\conf\uriworkermap.properties. [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2718): Using rewrite rule file . [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2720): Using uri select 3. [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2721): Using no chunked encoding. [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2723): Using notification event SF_NOTIFY_AUTH_COMPLETE (0x04000000) [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2733): Using uri header TOMCATURI0000000180000000:. [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2734): Using query header TOMCATQUERY0000000180000000:. [Fri Feb 22 14:06:06.918 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2735): Using worker header TOMCATWORKER0000000180000000:. [Fri Feb 22 14:06:06.934 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2736): Using worker index TOMCATWORKERIDX0000000180000000:. [Fri Feb 22 14:06:06.934 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2737): Using translate header TOMCATTRANSLATE0000000180000000:. [Fri Feb 22 14:06:06.934 2013] [7976:8040] [debug] init_jk::jk_isapi_plugin.c (2738): Using a default of 250 connections per pool. [Fri Feb 22 14:06:06.934 2013] [7976:8040] [error] uri_worker_map_load::jk_uri_worker_map.c (1241): Failed to load uri_worker_map file C:\Tomee\connectors\conf\uriworkermap.properties (errno=2, err=No such file or directory). ... whereas the initial declaration of file location is correct but subsequent uri_worker_map load ignores the "..\" relative declaration. Workaround: 1. Use absolute paths. 2. Add a superfluous character in your isapi_redirect.properties file so it is truncated instead of the real value. e.g. "uriworkmap.propertiesx" I hope this enough information to find the issue. If I can help with other information or testing, let me know. Thanks Brad -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org