Reamer commented on a change in pull request #4186: URL: https://github.com/apache/zeppelin/pull/4186#discussion_r685826902
########## File path: zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java ########## @@ -263,19 +263,17 @@ public void onMessage(NotebookSocket conn, String msg) { } TicketContainer.Entry ticketEntry = TicketContainer.instance.getTicketEntry(receivedMessage.principal); - if (ticketEntry != null && - (!ticketEntry.getTicket().equals(receivedMessage.ticket))) { + if (ticketEntry == null || StringUtils.isEmpty(ticketEntry.getTicket())) { + LOG.debug("{} message: invalid ticket {}", receivedMessage.op, receivedMessage.ticket); + return; + } else if (!ticketEntry.getTicket().equals(receivedMessage.ticket)) { /* not to pollute logs, log instead of exception */ if (StringUtils.isEmpty(receivedMessage.ticket)) { - LOG.debug("{} message: invalid ticket {} != {}", receivedMessage.op, - receivedMessage.ticket, ticketEntry.getTicket()); - } else { - if (!receivedMessage.op.equals(OP.PING)) { - conn.send(serializeMessage(new Message(OP.SESSION_LOGOUT).put("info", - "Your ticket is invalid possibly due to server restart. " - + "Please login again."))); - } + LOG.debug("{} message: invalid ticket {} != {}", receivedMessage.op, receivedMessage.ticket, ticketEntry.getTicket()); Review comment: Your screenshot shows a message that is logged at [line 466](https://github.com/apache/zeppelin/blob/eb0f8ab8c07c83f054a9de23aaa4edf9239e585c/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java#L466) with ERROR log level. The debug log level is turned off by default. I think we should remove the first `if` and always log the line in the debug log level. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org