Ilya Gurenko
Ilya Gurenko

Reputation: 565

JFrog Artifactory HA cluster configuration

Im configuring 2 Artifactory servers (WinServer OS).

following the configuration its all nice and dandy, but the issue is regarding filestore. Filestore is where each ART server keep its Packages (Nugets,NPM,JAR etc..).

The basic configuration for single server is:

<config version="1">
    <chain template="file-system"/>
</config>

Cluster configuration, according to Gudielines is:

<config version="2">
    <chain template="cluster-file-system"/>
</config>

Which supposingly gives me redundancy, if one server is down. But while taking down NODE1 (which formly was the main single Artifactory server), i do get NODE2 to operate and resolvance is good.

Yet while running build that consumes artifactory i get "Internal server error 500". While looking into the error closely, it claims that some package is not found on NODE2.

I've checked the local "data\filestore" there is nothing, while on NODE1, it contains many packages.

TY guys !

Upvotes: 0

Views: 1628

Answers (2)

Ilya Gurenko
Ilya Gurenko

Reputation: 565

Well, after having a discussion with JFrog support. It seems that in order to have Node1 and Node2 replicating FILESTORE (where all packages reside). a flag should be raised.

This can be done by invoking a POST command:

curl -u username:password -X POST "https://servername:8443/artifactory/api/system/storage/optimize"

After that, and this is the most important thing, Garbage collection must be invoked 20 times (its the Default), in order to start the synching. Therefore, we have to run this command 20 times:

curl -u username:password -X POST "https://servername:8443/artifactory/api/system/storage/gc"

Alternatively, there is a configuration that can override this default. go to your Artifactory server, $artifactory_home/etc/artifactory.system.property and modify this file to have this line: artifactory.gc.skipFullGcBetweenMonitorIterations=1

This should be aplied to all Nodes Service restart is a must on all nodes in the cluster

After that Synch between Nodes will happen.

Upvotes: 1

Andrey Molfly
Andrey Molfly

Reputation: 52

Artifactory HA? The configurations must match. My config binarystore.xml:

<config version="2">
    <chain template="cluster-file-system"/>
</config>

Load balancing is carried out by the nginx or other reverse proxy. More: System Architecture - https://www.jfrog.com/confluence/display/JFROG/System+Architecture

Upvotes: 0

Related Questions