Product

Deserialization issue workaround

arrow leftBack to blog
userReportPortal Team
calendarSeptember 16, 2023

We would like to highlight that in version 5.7.5 of API Service and Authorization Service we have updated the dependencies.

Unfortunately, the same dependency found its way into different versions, causing a Java error that looks like this: "AuthUtils$SerialUidReplacingInputStream: Potentially Fatal Deserialization Operation" when serializing/deserializing a user class or token.

Note 1

This issue has already been fixed in version 23.2.

Example of a stack trace from logs:

AuthUtils$SerialUidReplacingInputStream : Potentially Fatal Deserialization Operation. java.io.InvalidClassException: Overriding serialized class version mismatch: local serialVersionUID = 550 stream serialVersionUID = 520 at com.epam.ta.reportportal.auth.util.AuthUtils$SerialUidReplacingInputStream.readClassDescriptor(AuthUtils.java:105) at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1992) at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1870) at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2201) at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1687) at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:489) at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:447) at java.base/java.util.TreeSet.readObject(TreeSet.java:524) at java.base/jdk.internal.reflect.GeneratedMethodAccessor226.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Everything is functioning well; however, since users are verified for all requests, including reporting, many errors are filling up the Service API log. To prevent this log from excessively cluttering the Docker, additional logging rules need to be configured in Docker's configuration.

We recommend using the following settings in the Docker compose file for the ReportPortal services containers:

Settings in the Docker compose file

Please make sure, that you configured the default logging driver by adding the following values to the /etc/docker/daemon.json (create this file if it doesn’t exist):

/etc/docker/daemon.json file

Here is the link to the raw version for a quick copy.

Note 2

This is a default recommendation from Docker, and you may need to adjust it to fit your project's specific requirements.

If your installation is via Kubernetes, you don't need to worry about log rotation because Kubernetes already has it configured by default. However, Docker doesn't have log rotation enabled by default, and its JSON log format can quickly consume all available space.

We plan to update Docker compose in the future, so these log settings will be included in the compose file automatically. Until then, if you are using version 5.7.5 or 23.1 with Docker installed, please check how much space the logs are occupying and update the Docker compose file accordingly.

Default paths for checking logs:

Linux: /var/lib/docker/containers/

Windows: path depends on the way you’ve installed Docker. Please, check Docker documentation.