View Revisions: Issue #3733

Summary 0003733: Logging for authorization denied
Revision 2018-09-21 15:10 by elong
Description When the node password doesn't match, the logging for pull and push just logs the 403 code. Log a message about authorization is denied for the node to make it clear. Don't log a big stack trace either.

On a push, the "head" request for reservation succeeds, then the "put" request fails authentication, which results in this strange error:

2018-09-21 11:08:39,389 ERROR [client-001] [DataExtractorService] [client-001-push-default-5] Failed to extract batch server-122 (org.jumpmind.symmetric.service.impl.DataExtractorService.extract(DataExtractorService.java:838))
java.lang.RuntimeException: java.io.IOException: Error writing request body to server
    at org.jumpmind.symmetric.service.impl.DataExtractorService.transferFromStaging(DataExtractorService.java:1500)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.sendOutgoingBatch(DataExtractorService.java:1358)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.extract(DataExtractorService.java:764)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.extract(DataExtractorService.java:554)
    at org.jumpmind.symmetric.service.impl.PushService.pushToNode(PushService.java:203)
    at org.jumpmind.symmetric.service.impl.PushService.execute(PushService.java:165)
    at org.jumpmind.symmetric.service.impl.NodeCommunicationService$1.run(NodeCommunicationService.java:519)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Error writing request body to server
    at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3465)
    at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3448)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
    at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
    at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
    at java.io.BufferedWriter.flush(BufferedWriter.java:254)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.transferFromStaging(DataExtractorService.java:1423)

Change the order of interceptors to be the AuthenticationInterceptor first, then NodeConcurrencyInterceptor.
Revision 2018-09-21 14:40 by elong
Description When the node password doesn't match, the logging for pull and push just logs the 403 code. Log a message about authorization is denied for the node to make it clear. Don't log a big stack trace either.