doc: docker deploy

feat: support docker debug
This commit is contained in:
CaiHQ 2022-05-23 17:06:54 +08:00
parent 9f79db3a63
commit 90a9d8af37
2 changed files with 12 additions and 3 deletions

View File

@ -67,10 +67,14 @@ public class ContractClient {
isRunning = false;
}
public ContractClient(int startPort) {
this("127.0.0.1", startPort);
}
// Once the reconnect is called, all cp in the same node will reconnect to
// current ContractManager
// We only consider the.
public ContractClient(int startPort) {
public ContractClient(String host, int startPort) {
// LOGGER.info("ContractClient 构造器 : ");
contractMeta = new ContractMeta();
outputTracer = new ContractPrinter();
@ -82,7 +86,7 @@ public class ContractClient {
port = startPort;
// LOGGER.info("ContractClient----构造器----- 端口 " + startPort);
get = new SocketGet("127.0.0.1", startPort);
get = new SocketGet(host, startPort);
// LOGGER.info("ContractClient----构造器----- position---2");
String cpCMI = get.syncGet("", "isContractProcess", ""); // CMI

View File

@ -389,6 +389,11 @@ public class ContractStatusRecorder extends StatusRecorder<ContractMeta> {
@Override
public boolean visit(int i) {
return visit("127.0.0.1", i);
}
@Override
public boolean visit(String host, int i) {
if (i == ContractManager.cPort.getCMPort()) {
return false;
}
@ -396,7 +401,7 @@ public class ContractStatusRecorder extends StatusRecorder<ContractMeta> {
return true;
}
try {
ContractClient client = new ContractClient(i);
ContractClient client = new ContractClient(host, i);
// LOGGER.info("[CM重连] position-----1");
if (client.isRunning) {
LOGGER.debug("CP listened to port " + i + " is running");