ARTIFACTORY: How do I resolve the "The Federated repository settings are not synchronized" error?

ARTIFACTORY: How do I resolve the "The Federated repository settings are not synchronized" error?

AuthorFullName__c
Fadi Rouhana
articleNumber
000005783
ft:sourceType
Salesforce
FirstPublishedDate
2023-06-14T06:48:25Z
lastModifiedDate
2024-07-11
VersionNumber
2

You might run into the following error via the UI when working with federated repositories:
"The Federated repository settings are not synchronized"

Understanding the error:
This error typically occurs when one or more members of your Federation are out of sync. It may happen due to network failures or changes in the federated members.

Manually push the updated configuration:
You can manually synchronize the configuration with the target federated member using either of the following methods:

 
Method 1: Use the Synchronize Federated Member's Configuration REST API :
  • Send a POST request to `http://localhost:port/artifactory/api/federation/configSync/<repositoryKey>` to synchronize the configuration with the specific repository key.
Method 2: Use the JFrog Platform UI:
  • Navigate to the Administration module in the JFrog Platform.
  • Go to Repositories > Federated.
  • Select the relevant federated member and choose "Push Configuration" from the Actions list (located at the end of the list).

These methods will push the updated configuration and synchronize the repository settings among the federation members.

After initiating the configuration sync, you should observe the following log entries that confirm the initialization of the configuration sync:
2023-06-07T10:53:39.754Z [jfrt ] [INFO ] [3e181dd1982804ea] [ryConfigStorageServiceImpl:171] [http-nio-8081-exec-8] - About to update 1 repository configurations
2023-06-07T10:53:39.758Z [jfrt ] [INFO ] [3e181dd1982804ea] [epositoryConfigServiceImpl:768] [http-nio-8081-exec-8] - Calling onRepoConfigChange...

Enabling federated repository debug loggers:
If you encounter any issues after triggering the configuration sync, it can be beneficial to enable debug loggers for federated repositories. Enabling these loggers will provide more detailed information about the underlying processes at a lower log level. By doing so, you can gain better insight into any potential issues or errors that may be occurring. To enable detailed logging for federation processes, the below XML snippet goes in the $JFROG_HOME/artifactory/var/etc/artifactory/logback.xml file and does not require a restart for log changes to take effect:
<appender name="federated" class="ch.qos.logback.core.rolling.RollingFileAppender">
  <File>${log.dir}/artifactory-federated.log</File>
  <rollingPolicy class="org.jfrog.common.logging.logback.rolling.FixedWindowWithDateRollingPolicy">
    <FileNamePattern>${log.dir.archived}/artifactory-federated.%i.log.gz</FileNamePattern>
    <maxIndex>10</maxIndex>
  </rollingPolicy>
  <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
    <MaxFileSize>25MB</MaxFileSize>
  </triggeringPolicy>
  <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
    <layout class="org.jfrog.common.logging.logback.layout.BackTracePatternLayout">
      <pattern>%date{yyyy-MM-dd'T'HH:mm:ss.SSS, UTC}Z [jfrt ] [%-5p] [%-16X{uber-trace-id}] [%-30.30(%c{3}:%L)] [%-20.20thread] - %m%n</pattern>
    </layout>
  </encoder>
</appender>
 
<logger name="org.artifactory.queue" additivity="false">
  <level value="trace"/>
  <appender-ref ref="federated"/>
</logger>
 
<logger name="org.artifactory.addon.federated" additivity="false">
  <level value="DEBUG"/>
  <appender-ref ref="federated"/>
</logger>
 
<logger name="org.jfrog.storage.binstore.providers.federated.threads" additivity="false">
  <level value="DEBUG"/>
  <appender-ref ref="federated"/>
</logger>
 
<logger name="org.artifactory.addon.mirror" additivity="false">
  <level value="DEBUG"/>
  <appender-ref ref="federated"/>
</logger>

It is important to note that enabling verbose logs, as suggested above, can impact system performance. Therefore, it is highly recommended to add this for a limited duration, specifically during the debugging process of the issue, and disable the verbose logging right after to avoid any potential performance implications.

If the configuration sync process completes without any issues, the "The Federated repository settings are not synchronized" error should be resolved. It is highly recommended to actively monitor the synchronization status to ensure that the federated repositories remain in sync. By regularly monitoring the synchronization status, you can proactively identify and address any potential issues that may arise.

Monitoring synchronization status:
If you have Artifactory version 7.55.1 or later, administrators can check for significant synchronization delays between the federated repositories on the local JPD and other federation members on remote JPDs. To view the federation synchronization status, go to the Administration tab, select Platform Monitoring, and then choose Federation Status.

User-added image

For more information, see Monitor Federated Repositories.