Search code examples
azure-identitymicrosoft-fabricoracle-golden-gateazure-sdk-for-javaoracle23ai

Golden Gate Replicate to Mirrored Database in Microsoft Fabric - Azure Identity Error


Golden Gate for Distributed Applications and Analytics v23.6

OS: oracle linux 8

SDK Dependencies:

  • onelake v12.20.0
  • hadoop v3.4.0
  • parquet v1.12.0

Issue

I'm trying to replicate a sample trail file from <OGG_HOME>/opt/AdapterExamples/trail into a Mirrored Database in a Microsoft Fabrics workspace. When I start the replicat process, I encounter the following error: Azure Identity => ERROR in getToken() call for scopes [https://storage.azure.com/.default]: java.io.UncheckedIOException: io.netty.channel.StacklessClosedChannelException

I checked credentials using the azure-identity (1.10.0) and azure-storage-file-datalake (12.8.0) libraries in a Python script, and it was successful in listing files in a Fabrics Lakehouse.

I have provided the properties file and the full error from the Replicat Report file below:


Properties File for Replicat test1

Configuration to load GoldenGate trail operation records into a Mirrored Database in Microsoft Fabric:

gg.target=fabric_mirrored_database
#TODO: Edit the Fabric workspace name.
gg.eventhandler.onelake.workspace=fabric
#TODO: Edit the Fabric mirror name.
gg.eventhandler.onelake.mirror=testfabricdb
#TODO: Edit the tenant ID of the application.
gg.eventhandler.onelake.tenantId=<tenant id>
#TODO: Edit the client ID of the application.
gg.eventhandler.onelake.clientId=<client id>
#TODO: Edit the client secret for the authentication.
gg.eventhandler.onelake.clientSecret=<secret>
#TODO: Edit the classpath to include Hadoop, Parquet, and Azure DataLake SDK dependencies.
gg.classpath=/u01/app/oracle/product/ogg/opt/DependencyDownloader/dependencies/hadoop_3.4.0/:/u01/app/oracle/product/ogg/opt/DependencyDownloader/dependencies/parquet_1.12.3/:/u01/app/oracle/product/ogg/opt/DependencyDownloader/dependencies/onelake/*
#TODO: Edit the proxy configuration.
#jvm.bootoptions=-Dhttps.proxyHost=some-proxy-address.com -Dhttps.proxyPort=80 -Djava.net.useSystemProxies=true

Full Error message sourcing from Replicat Report file:

propertiesERROR 2024-12-25 11:24:48.000991 [ForkJoinPool.commonPool-worker-5] - {"az.sdk.message":"Retry attempts have been exhausted.","exception":"io.netty.channel.StacklessClosedChannelException","tryCount":3} =ERROR 2024-12-25 11:24:48.000991 [ForkJoinPool.commonPool-worker-5] - io.netty.channel.StacklessClosedChannelException =ERROR 2024-12-25 11:24:48.000992 [ForkJoinPool.commonPool-worker-5] - Azure Identity => ERROR in getToken() call for scopes [https://storage.azure.com/.default]: java.io.UncheckedIOException: io.netty.channel.StacklessClosedChannelException =ERROR 2024-12-25 11:24:48.000992 [ForkJoinPool.commonPool-worker-5] - {"az.sdk.message":"Failed to acquire a new access token.","exception":"java.io.UncheckedIOException: io.netty.channel.StacklessClosedChannelException"} =ERROR 2024-12-25 11:24:48.000996 [TaskEngine_5(FileFinalizeTask)] - ONELAKE-00053 Error occurred while uploading a file to Microsoft Fabric OneLake. Inspect the replicat handler log file and the replicat report file for further troubleshooting. Contact Oracle support if you cannot resolve the error.


Solution

  • To be able to authenticate to Fabric Mirrored DB api, Azure App Registration platform has to be Web. I create a new app with Web Platform type and Replicat works. Below you can see the App registration page: enter image description here