Reputation: 63
I 've done a cluster with Payara Server composed by two instances, one is local ad resides onto a debian VM and the other one ,remote, resides also onto another debian VM. I deployed a test application and when I was looking to logs just wasn't able to find them. More precisely, I ment just one time almost randomly seem they appear and then nothing more. They show up into Admin Server-->View Logs File --> instance 1(local) -->log file --> server.log.
Below test application
package clusterTest;
import java.io.Serializable;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean
@SessionScoped
public class MySession implements Serializable {
private String val;
private static final Logger LOG = Logger.getLogger(MySession.class.getName());
public String getVal() {
LOG.log(Level.INFO, "getVal{0}", val);
System.out.println("getVal");
return val;
}
public void setVal(String val) {
LOG.log(Level.INFO, "setVal{0}", val);
System.out.println("setVal");
this.val = val;
}
}
Upvotes: 0
Views: 3435
Reputation: 63
As @nakag has already said here at https://stackoverflow.com/a/31783809/2946593, using the loopback address in /ect/hosts stop showing logs into cluster's instance. So just comment out this row :
in each node of the cluster solved the problem.
Upvotes: 0
Reputation: 7710
Payara Server creates a separate directory for each instance, so that it does not mix with the working directory of the domain admin server.
In short, if your domain name is domain1
, you should be able to find logs for your local instance in PAYARA_INSTALL/glassfish/nodes/localhost-domain1/instance1/logs/server.log
.
Payara Server, as well as GlassFish, creates instances and places them under nodes. Nodes represent the location of the instances - in your case you most probably have a local node and a node for the second remote instance. Their configuration is part of the domain.xml, but before instances are first started, Payara Server generates another separate directory with config and runtime data like logs, in a directory inside the glassfish/nodes
directory, which is in the same directory as domains
directory.
The files for remote instance should exist inside the remote Payara Server installation in a similar location.
Upvotes: 1