Getting "Cannot open <nil> as a Reader" in Synchrony logs when editing a page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Users are unable to edit some or all Confluence pages. 

Environment

Confluence 7.19

Diagnosis

In the atlassian-synchrony.log  the following error message can be found: 

2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]] 2023-10-26 06:50:44,603 ERROR [async-dispatch-16] [synchrony.middleware.errors] error processing request {:id "uHL-hFlKENudoLvHatCRcQ", :throwable #error {
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]   :cause "Cannot open <nil> as a Reader."
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]   :via
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]   [{:type java.lang.IllegalArgumentException
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]     :message "Cannot open <nil> as a Reader."
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]     :at [clojure.java.io$fn__11520 invokeStatic "io.clj" 288]}]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]   :trace
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]   [[clojure.java.io$fn__11520 invokeStatic "io.clj" 288]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.java.io$fn__11422$G__11398__11429 invoke "io.clj" 69]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.java.io$reader invokeStatic "io.clj" 102]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.lang.RestFn applyTo "RestFn.java" 139]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.core$apply invokeStatic "core.clj" 667]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.core$slurp invokeStatic "core.clj" 6942]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.lang.RestFn invoke "RestFn.java" 439]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [tilt.bayeux.server$message_str_from_request_body invokeStatic "server.clj" 516]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [tilt.bayeux.server$request_handler$fn__33934$fn__34008 invoke "server.clj" 544]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [tilt.utils (take?) "utils.clj" 186]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [tilt.utils$wrap_simple_cors$fn__31466$fn__31507 invoke "utils.clj" 184]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [clojure.lang.AFn run "AFn.java" 22]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1128]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 628]
2023-10-26 08:50:44,603 DEBUG [253:StdOutHandler [/opt/java/openjdk/bin/java]]    [java.lang.Thread run "Thread.java" 834]]}}

Cause

From the exception above, It seems that Synchrony try to process a web socket connection request but the Reader to read request content is NULL. The assumption is that Synchrony tries to serve a request which is not aiming for Synchrony.

So the most suspicious resource that could cause this behaviour is the reverse proxy configured on top of Confluence/Synchrony. 

Solution

The best approach is to confirm if this is an issue related with the Load Balancer or Reverse Proxy configuration. You can make use of the indications outlined in our KB Data Center How to bypass a reverse proxy or SSL in Application Links to provide a direct connection to Confluence for your users, where to validate if the issue still happens or not.

If bypassing the LB/Proxy, the issue does not reoccurs and the users can edit the page(s), please check your configuration. You can make use of our multiple KBs depending on the situation and technology used: 


Last modified on Dec 14, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.