pentaho/pentaho-kettle · error · KettleException

MODIFY_SLAVE_SERVER/MODIFY_CLUSTER_SCHEMA/MODIFY_PARTITION_S…

Error message

MODIFY_SLAVE_SERVER/MODIFY_CLUSTER_SCHEMA/MODIFY_PARTITION_SCHEMA : repository is read-only

What it means

validateAction groups MODIFY_SLAVE_SERVER, MODIFY_CLUSTER_SCHEMA and MODIFY_PARTITION_SCHEMA into one read-only check; any attempt to save or update these cluster/partition shared objects on a read-only file repository throws this KettleException.

Solutions

  1. Reconnect with read-only=false so MODIFY_* operations pass validation.
  2. Write the slave/cluster/partition definitions to a writable repository location.
  3. Fix mount/permission issues if the read-only state comes from the OS rather than configuration.
  4. Skip persistence and keep these objects local to the transformation metadata instead of the repository.

Example fix

// before
repoMeta.setReadOnly(true);
repo.save(clusterSchema, "update cluster", null, true);
// after
repoMeta.setReadOnly(false);
repo.connect();
repo.save(clusterSchema, "update cluster", null, true);
Defensive patterns

Strategy: try-catch

Validate before calling

if (repo.getSecurityProvider().isReadOnly()) {
  throw new IllegalStateException("Repository read-only; cannot save cluster/partition/slave definitions");
}

Type guard

boolean canSaveSharedObjects = repo != null
    && !repo.getSecurityProvider().isReadOnly();

Try / catch

try {
  repo.save(partitionSchema, comment, null, true);
} catch (KettleException e) {
  if (e.getMessage() != null && e.getMessage().contains("repository is read-only")) {
    // switch to writable repository or store locally
  } else { throw e; }
}

Prevention

When it happens

Trigger: Saving a SlaveServer, ClusterSchema or PartitionSchema via KettleFileRepository.save (which calls validateAction with the corresponding MODIFY_* operation) while capabilities.isReadOnly() is true.

Common situations: Deploying cluster or partition definitions into a shared, read-only repository directory; CI jobs connecting read-only; viewers in Spoon attempting to edit shared cluster config.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/3c7d81f03bb8177a. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepositorySecurityProvider.java:100

        case MODIFY_DATABASE:
          if ( capabilities.isReadOnly() ) {
            throw new KettleException( operation + " : repository is read-only" );
          }
          break;
        case DELETE_DATABASE:
          if ( capabilities.isReadOnly() ) {
            throw new KettleException( operation + " : repository is read-only" );
          }
          break;
        case EXPLORE_DATABASE:
          break;

        case MODIFY_SLAVE_SERVER:
        case MODIFY_CLUSTER_SCHEMA:
        case MODIFY_PARTITION_SCHEMA:
          if ( capabilities.isReadOnly() ) {
            throw new KettleException( operation + " : repository is read-only" );
          }
          break;
        case DELETE_SLAVE_SERVER:
        case DELETE_CLUSTER_SCHEMA:
        case DELETE_PARTITION_SCHEMA:
          if ( capabilities.isReadOnly() ) {
            throw new KettleException( operation + " : repository is read-only" );
          }
          break;

        default:
          throw new KettleException( "Operation [" + operation + "] is unknown to the security handler." );

      }
    }
  }

  public boolean isReadOnly() {

View on GitHub (pinned to f3058517a1)