# 520 Connection Failed error during Java extension startup

OPA displays the following 520 Connection Failed error when it can't start a Java-based extension:

Failed to start SDK extension. 520 Connection Failed

This error appears during startup and indicates a failure to initialize the SDK handshake between the extension and the Workato platform.

# 520 Connection Failed error troubleshooting

Complete the following steps to resolve the issue:

1

Verify that your system uses JDK version 8. Other versions, including newer ones, may cause compatibility issues during the extension build or runtime.

2

Run the ./gradlew jar command in the root directory of your extension project to build the .jar file. For example:

/Users/your-user-name/Downloads/opa-extensions-master/gradlew jar

This creates the output .jar file in the build/libs/ directory.

3

Check both the test and action block in your extension code. The post() URLs must use the correct port number, such as localhost:3000. For example:

post("http://localhost:3000/ext/#{connection['profile']}/computeDigest", { payload: 'test' })

The OPA uses this port to connect to the extension. The agent may fail to connect and return a 520 error if the port is missing, incorrect, or blocked.


Last updated: 5/29/2025, 10:25:55 PM