I’m not sure where to raise this so I’m happy to m...
# cfml-general
r
I’m not sure where to raise this so I’m happy to move to a better channel on advice. I’m running CommandBox with multiple Lucee contexts on macOS with Apache and mod_cfml but I’m getting these failures [redacted] from the logs which renders an “Internal Server Error” in the browser.
Copy code
[Thu Jan 19 11:18:20.283069 2023] [modcfml:notice] [pid 11049] Handler Pattern Found => .cfm
[Thu Jan 19 11:18:20.283723 2023] [modcfml:notice] [pid 11049] Pattern Match TRUE: extension [.cfm] matches handler [.cfm]
[Thu Jan 19 11:18:20.283738 2023] [modcfml:notice] [pid 11049] Handler Pattern Found => .cfc
[Thu Jan 19 11:18:20.283749 2023] [modcfml:notice] [pid 11049] Handler Pattern Found => .cfml
[Thu Jan 19 11:18:20.283774 2023] [modcfml:notice] [pid 11049] Printing aliases: [1] found
[Thu Jan 19 11:18:20.283786 2023] [modcfml:notice] [pid 11049] 1. Alias: [/cgi-bin/] -> [/opt/homebrew/var/www/cgi-bin/]
[Thu Jan 19 11:18:20.283800 2023] [modcfml:notice] [pid 11049] URI => /index.cfm, filename => proxy:<ajp://localhost/index.cfm?page=dashboard&aId=7ba566594b1c2772f8008c1ac9a853c0>
[Thu Jan 19 11:18:20.283812 2023] [modcfml:notice] [pid 11049] Request header [Host] => <http://example.com|example.com>
[Thu Jan 19 11:18:20.283823 2023] [modcfml:notice] [pid 11049] Request header [Connection] => keep-alive
[Thu Jan 19 11:18:20.283832 2023] [modcfml:notice] [pid 11049] Request header [DNT] => 1
[Thu Jan 19 11:18:20.283847 2023] [modcfml:notice] [pid 11049] Request header [Upgrade-Insecure-Requests] => 1
[Thu Jan 19 11:18:20.283858 2023] [modcfml:notice] [pid 11049] Request header [User-Agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
[Thu Jan 19 11:18:20.283876 2023] [modcfml:notice] [pid 11049] Request header [Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
[Thu Jan 19 11:18:20.283887 2023] [modcfml:notice] [pid 11049] Request header [Accept-Encoding] => gzip, deflate
[Thu Jan 19 11:18:20.283897 2023] [modcfml:notice] [pid 11049] Request header [Accept-Language] => en-GB,en;q=0.9,es;q=0.8,en-US;q=0.7,fr-FR;q=0.6,fr-CH;q=0.5,fr-CA;q=0.4,fr;q=0.3
[Thu Jan 19 11:18:20.283907 2023] [modcfml:notice] [pid 11049] Request header [Cookie] => LUCEE_ADMIN_LANG=en; LUCEE_ADMIN_PW_5.3.4.77_SERVER=6a10b09acc3112eeba7afa420c117257878a4c3ba7ca89f63af39f3ddf09ba11; LUCEE_ADMIN_LASTPAGE=services.datasource; cfid=876215ca-18ba-4520-ae17-8a87b80ce6ee; cftoken=0; JSESSIONID=FHKsPmev45ADw376DKOMBdBYicuUdkTtZIDodSWD
[Thu Jan 19 11:18:20.283918 2023] [modcfml:notice] [pid 11049] Request header [sec-gpc] => 1
[Thu Jan 19 11:18:20.283929 2023] [modcfml:notice] [pid 11049] Request header [X-Tomcat-DocRoot] => /Volumes/websites/example.com/
[Thu Jan 19 11:18:20.283939 2023] [modcfml:notice] [pid 11049] Request header [X-Webserver-Context] => example-com-confl3
[Thu Jan 19 11:18:20.283948 2023] [modcfml:notice] [pid 11049] Request header [X-ModCFML-SharedKey] => **************
[Thu Jan 19 11:18:20.283958 2023] [modcfml:notice] [pid 11049] Request header [x-vdirs] => /cgi-bin,/opt/homebrew/var/www/cgi-bin;
[Thu Jan 19 11:18:20.616301 2023] [proxy_ajp:error] [pid 11049] AH01081: ajp_msg_check_header() incoming message is too big 11704, max is 8192
[Thu Jan 19 11:18:20.616470 2023] [proxy_ajp:error] [pid 11049] AH01031: ajp_ilink_receive() received bad header
[Thu Jan 19 11:18:20.616491 2023] [proxy_ajp:error] [pid 11049] [client 127.0.0.1:64568] AH00992: ajp_read_header: ajp_ilink_receive failed
[Thu Jan 19 11:18:20.616511 2023] [proxy_ajp:error] [pid 11049] (120007)APR does not understand this error code: [client 127.0.0.1:64568] AH00893: dialog to (null) (localhost:8009) failed
Thoughts or directions to further reading appreciated.
z
Copy code
AH01081: ajp_msg_check_header() incoming message is too big 11704, max is 8192
maybe bump up the modcfml logging to debug, to see what's being passed?
guessing that command box sometimes uses very long paths, which might lead to the headers being bigger than 8k?
r
I think I have all the modcfml logging setting on?
Copy code
CFMLHandlers ".cfm .cfc .cfml"
ModCFML_SharedKey "********"

# Optional, all for logging and debugging:
LogHeaders true
LogHandlers true
LogAliases true
VDirHeader true
Not sure how I could determine the CB path length?
z
ok, good that's logged to the apache logs...
r
That’s what I was quoting from.
z
ahh yeah, sorry,. been a while since i looked at this stuff
only thing which jumps out is the size of the cookies... do you get that error with a fresh incognito session (without the admin cookies?)
r
Okay, let me try, I might be a while…
Cookies don’t look huge?
I get this from the console…
z
Which versions are u running?
r
Of?
z
The whole stack, CB, Apache, modcfml etc
r
CommandBox: 5.6.1 Apache: 2.4.54 Lucee: 5.3.10+97 modcfml: 1.1.11 but I had to build my own as there’s not one for Apple Silicon in the repo macOS: 12.6.1 - Apple M1 Max
t
I have not had the problem with undertow but I have seen it with ajp and tomcat
b
I assume those are Apache logs above? What is in the CommandBox server logs?
I'm unclear if the header is being rejected by Apache or by Undertow's AJP listener.
Can you screenshot the error? Is it coming from Apache or CommandBox?
z
the logs are apache
👍 1
good morning mr wood
🙂 1
r
Sorry, got distracted…
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyiobuffersize
Yep, that fixed it! I kept upping the size as it kept hitting the limit I set until I thought, “blow it” and turned it up to the max
65536
and all seems good. Not sure what to do about the statement “_you must also change the
packetSize
attribute of your AJP connector on the Tomcat side!_“. I’ve not seen a setting in modcfml to do that? Thanks again @zackster for finding that setting! @thisOldDave I assume your suggestion is for when only using Undertow? @bdw429s As Zac said, those lines are from the Apache logs. Can I provide any more info?
t
if you are running through commandbox you are using undertow
☝️ 1
r
Understood, thanks, I’ll take a closer look at that docs page.
b
The docs say
default is 8192
r
Ah, thanks, that makes sense and that default matches up with the Apache doc that Zac provided. I’ll make sure I update them both in sync.
This doesn’t appear to be an issue when using IIS and BonCode or have I missed something?
b
No freaking clue, lol
😆 1
Perhaps @Bilal knows, or perhaps Boncode just has a larger default out of the box?
I'm not really clear on what specific information is pushing the AJP headers over the limit
Perhaps the addition of v-dirs which was a "recent" addition to mod_cfml, but Bilal still hasn't added support for that yet in Boncode.
r
Okay, thanks for that insight, I’ll do some more reading.