diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ClusterPointRouter.java b/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ClusterPointRouter.java index f4f491824..1dfb7b05a 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ClusterPointRouter.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ClusterPointRouter.java @@ -128,6 +128,12 @@ public class ClusterPointRouter { TBase command = deserialize(payload); ChannelContext channelContext = profilerClusterPoint.getChannelContext(applicationName, agentId, -1); + if (channelContext == null) { + TResult result = new TResult(false); + result.setMessage(applicationName + "/" + agentId + " can't find suitable ChannelContext."); + channel.write(new ResponsePacket(requestPacket.getRequestId(), serialize(result))); + return; + } Map proeprties = channelContext.getChannelProperties(); String version = MapUtils.getString(proeprties, AgentPropertiesType.VERSION.getName()); diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ProfilerClusterPoint.java b/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ProfilerClusterPoint.java index b8bd0d901..82921c075 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ProfilerClusterPoint.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/ProfilerClusterPoint.java @@ -75,7 +75,7 @@ public class ProfilerClusterPoint implements ClusterPoint { if (startTimestamp <= 0) { // Fix Me // startTimestamp도 체크하게 변경해야함 - return false; + return true; } return true; diff --git a/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/TCommandTypeVersion.java b/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/TCommandTypeVersion.java index 00b1f0f35..628986ed4 100644 --- a/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/TCommandTypeVersion.java +++ b/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/TCommandTypeVersion.java @@ -50,7 +50,11 @@ public enum TCommandTypeVersion { } for (TCommandType eachCommand : supportCommandList) { - if (command.getClass().isInstance(eachCommand)) { + if (eachCommand == null) { + continue; + } + + if (eachCommand.getClazz() == command.getClass()) { return true; } }