Stacktrace does not print in Glassfish 4.1 Cluster

2020-08-22 06:19发布

问题:

Doing our first cluster setup on Glassfish (4.1). Application(EAR) level logs (ex printing a stacktrace) don't seem to reach the server.log in (GF-dir)/domains//logs/server.log or (GF-dir)/nodes/(node-name)/(instance-name)/server.log

(There is no cluster.log as stated in documentation)

We didn't change any of the default logging options in logging.properties.

The current logs only show cluster and instance related information.

回答1:

I had similar probrem. server.log is not output after

MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is TCP

If the similar message is output in (GF-dir)/nodes/(node-name)/(instance-name)/imq/instances/(clustername instancename)/log/log.txt

 Invalid broker address for this broker to run in cluster: Loopback IP address is not allowed in broker address mq://127.0.1.1:27676/?instName=c1i1&brokerSessionUID=2263708429127912192&ha=false for cluster

Fixed the node server's /etc/hosts file to not to use the loopback to the node server.



回答2:

It seems that the node stops to output to the log file when JMS broker is configured as embedded (the default). I tried to change it to LOCAL (in the JMS configuration, plus turned on JMS availability service with defaults), and the log file is now output as expected.

This is not a solution per se, as I started to get other errors due to the change in JMS configuration. But I'm able to see error messages from my application which I was not able to see before.