I have situation where a web server is having inte...
# box-products
r
I have situation where a web server is having intermittent issues with the site looking like it is down from a few minutes to a few seconds where Undertow is not accepting requests. This web server is using Commandbox, Lucee, and Undertow on an Ubuntu server. I do not have access to the server, yet, to look at logs and such, but I will have them in a day so and hopefully it will have a good indication as to what is going on. Has anyone experienced any issues similar to this before?
b
Nope. I'd start by working your way in from the outermost proxy. What is the exact error message/status code and where is it coming from?
r
Thanks, Brad
p
I’m having this exact same problem, so it’s good to know we’re not alone. It just stops responding for a few seconds to a few minutes…
It’s as though Undertow stops hearing incoming requests entirely, then starts back up.
b
@Peter Hoopes Fusion Reactor would code in very handy in reporting • The current web requests • A full thread dump
p
Agreed. FR would certainly be a big help and we may have to go that route. I was also wondering about finding logs for Undertow to start looking a possible issues…
b
@Peter Hoopes The CommandBox logs are all documented here: https://commandbox.ortusbooks.com/embedded-server/server-logs
p
I knew about those, but are they for Undertow or just the Lucee engine or both?
b
Undertow itself has no log files-- it's a service layer
Runwar has logs however
And that page of docs covers both Runwar's and the CF engine's logs
p
Awesome sauce. Thanks!
b
@Peter Hoopes Did you send me a message somewhere about the access logs? I saw the notification on my phone, but now that I'm on my computer, I can't find it.
Do you see that file on disk at all?
run
Copy code
restart --debug
and show me what the JVM args are that appear in the console while starting
p
No. In that folder are just server.out.txt logs - nothing called access.txt
b
If access logs are enabled, you should see the following JVM args being passed to the server when it starts
Copy code
--logaccess-enable
--logaccess-basename
--logaccess-dir
p
Nope - those are args are not present…
b
Also, are you sure you enabled the access logs for the correct server?
p
It’s the only one I have running on this machine…
b
I see the current working dir of your shell is a
www
folder, but you appear to be looking at a server in a sub folder
p
server show { “app”:{ “libDirs”:“lib” }, “name”:“Socrates49e”, “openBrowser”:“false”, “profile”:“staging”, “web”:{ “accessLogEngable”:“true”, “blockCFAdmin”:“false”, “directoryBrowsing”:“true”, “host”:“0.0.0.0", “http”:{ “port”:“80” }, “SSL”:{ “certFile”:“certs/_.standrews-de.org.2022.crt”, “enable”:“true”, “forceSSLRedirect”:“true”, “keyFile”:“certs/_.standrews-de.org.nopass.key”, “port”:“443" }, “webroot”:“socrates49e” } }
b
Show me the output of
server list
p
Socrates49e (running) http://0.0.0.0:80 https://0.0.0.0:443 CF Engine: lucee 5.3.9+141 Webroot: /home/phoopes/www/socrates49e/ Last Started: 26-Aug-2022 220709
I do have the webroot as a subfolder on purpose
b
Hmm, and you restarted the server for sure.
p
Multiple times
b
Can you show me the JVM args you see?
Like, paste them here
Or screenshot them
p
I know. It’s odd.
b
That's all of them in the screenshot?
p
I did notice that when this deafness happens, my VM also kills my SSH connection, so I’m wondering if it’s a bigger issue.
Full list: Runwar: args -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djdk.io.File.enableADS=true -jar /home/phoopes/.CommandBox/lib/runwar-4.7.7.jar --processname Socrates49e [lucee 5.3.9+141] --log-dir /home/phoopes/.CommandBox/server/1A76B70ECEBCBA8C15DD6B6E9A621B23-Socrates49e/lucee-5.3.9.141/logs --server-name Socrates49e --tray-enable false --dock-enable true --directoryindex true --timeout 240 --proxy-peeraddress false --cookie-secure false --cookie-httponly false --pid-file /home/phoopes/.CommandBox/server/1A76B70ECEBCBA8C15DD6B6E9A621B23-Socrates49e/lucee-5.3.9.141/.pid.txt --tray-icon /home/phoopes/.CommandBox/cfml/system/config/server-icons/trayicon-lucee.png --debug true --gzip-enable true --cfengine-name lucee -war /home/phoopes/www/socrates49e/ --web-xml-path /home/phoopes/.CommandBox/server/1A76B70ECEBCBA8C15DD6B6E9A621B23-Socrates49e/lucee-5.3.9.141/WEB-INF/web.xml --lib-dirs /home/phoopes/www/lib/ --http-enable true --ssl-enable true --ajp-enable false --http2-enable true --open-browser false --open-url https://0.0.0.0:443 --ssl-port 443 --ssl-cert /home/phoopes/www/certs/_.standrews-de.org.2022.crt --ssl-key /home/phoopes/www/certs/_.standrews-de.org.nopass.key --urlrewrite-enable false --predicate-file /home/phoopes/.CommandBox/server/1A76B70ECEBCBA8C15DD6B6E9A621B23-Socrates49e/lucee-5.3.9.141/.predicateFile.txt --host 0.0.0.0 --background false --port 80 --stop-port 38379
b
That sounds network related
p
It’s a VM in our cluster, but that’s the only other clue I have. I was trying to get these access logs up to compare to some pings, etc.
But the logaccess lines aren’t there despite the item in the server.json file
b
Hmm, can you run
Copy code
server info property=accesslogenable
Oh, you typed it wrong
Copy code
accessLogEngable
This is why we use tab complete 🙂
Remove the extra
g
p
ACK!!!
<wiping egg off face>
b
Type
Copy code
server set web.acc
and hit tab to let it auto-complete
p
Got it. Me = idiot.
b
no worries
I never trust myself to spell anything correctly
p
How to remove bad property?
b
Copy code
server clear xxx
p
👍
b
You'll find the same three trio of commands all over CommandBox • xxx set • xxx show • xxx clear
That's the same for
package
,
server
,
cfconfig
,
propertyFile
, etc
p
Right. I love this whole system. Not trying to butter you up, but it’s awesome.
Following the access log now. Thanks.
@ryan Just wanted to let you know that I’m 96.4% sure that this is a Linux issue. I’ve enabled the logs (as you can see above) and several times as soon as my web monitor detected the site being down my SSH connection died with a broken pipe as well. My Linux-fu isn’t good enough so I’m getting help, but there could be something messed up in the networking stack, or…? Just a head’s up.
r
Sounds good! Thank you, Peter!