You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a little bit help from some AI I have managed to found the cause of this bug:
Description
When running Docspell with multiple JOEX nodes, authentication failures occur because the REST server node is missing from the node table in the database. This causes JOEX nodes to attempt token signing with an empty server secret, resulting in the following error:
java.lang.IllegalArgumentException: Empty key
at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySpec.java:107)
at docspell.common.util.SignUtil$.getMac(SignUtil.scala:21)
at docspell.common.util.SignUtil$.signString(SignUtil.scala:26)
...
Current Behavior
REST server starts with a configured docspell.server.auth.server-secret
At some point, the REST server node entry disappears from the node table
JOEX nodes can't find the REST server secret and default to an empty key
Authentication operations fail due to empty key in crypto operations
Database State
The node table only contains JOEX entries, missing the REST server:
REST server should maintain its registration in the node table
Potential Investigation Points
REST server node registration process
Node cleanup/maintenance processes that might incorrectly remove the REST server entry
Error handling when server secret is missing (currently silently falls back to empty key)
Environment
Multiple JOEX nodes in production setup
REST server configured with server-secret
Database shows only JOEX nodes, missing REST server entry
Additional Notes
This could be a race condition or timing issue where the REST server entry is being removed unexpectedly. The error handling could also be improved to fail fast with a clear error message when no server secret is available, rather than proceeding with an empty key.
The text was updated successfully, but these errors were encountered:
With a little bit help from some AI I have managed to found the cause of this bug:
Description
When running Docspell with multiple JOEX nodes, authentication failures occur because the REST server node is missing from the
node
table in the database. This causes JOEX nodes to attempt token signing with an empty server secret, resulting in the following error:Current Behavior
docspell.server.auth.server-secret
node
tableDatabase State
The
node
table only contains JOEX entries, missing the REST server:Expected Behavior
REST server should maintain its registration in the
node
tablePotential Investigation Points
Environment
server-secret
Additional Notes
This could be a race condition or timing issue where the REST server entry is being removed unexpectedly. The error handling could also be improved to fail fast with a clear error message when no server secret is available, rather than proceeding with an empty key.
The text was updated successfully, but these errors were encountered: