Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-31698

Replicator CLI: -debug option (and others) does not look like working

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.38.0
    • Fix Version/s: None
    • Component/s: Replication
    • Notability:
      3

      Description

      SYMPTOM:

      As per the doc https://help.sonatype.com/repomanager3/nexus-repository-administration/repository-management/repository-replication/running-replicator#RunningReplicator-StartingReplication, tried to use the -debug option but do not see any DEBUG, and also the beginning of output shows "debug=false":

      [root@node-nxrm-ha1 repository_replicator]# java -jar nexus-replicator-cli-3.38.0-01.jar -replicationconfigfile config.yml -debug
      01:03:39.683 INFO  c.s.n.replication.cli.ReplicatorCli - Replicator starting up
      01:03:39.685 INFO  c.s.n.replication.cli.ReplicatorCli - Cli system parameters {
        configurationFilePath=config.yml,
        logDirPath=logs
      }
      01:03:39.685 INFO  c.s.n.replication.cli.ReplicatorCli - Configuration {
        rsyncExecutable=rsync,
        awsExecutable=aws,
        syncBatchSize=10,
        debug=false,
      ...
      

      Adding below makes "debug=true" in the output, but do not see any DEBUG loggings after running the CLI for a while... (this added a few DEBUG lines when I uploaded a file)

      [root@node-nxrm-ha1 repository_replicator_as_root]# head config.yml
      debug:
        true
      ...
      

      Also tested -replicationconfigfile, and this option doesn't look like working either:

      [root@node-nxrm-ha1 repository_replicator]# realpath ../config.yml
      /root/config.yml
      [root@node-nxrm-ha1 repository_replicator]# java -jar nexus-replicator-cli-3.38.0-01.jar -replicationconfigfile /root/config.yml -debug
      23:12:15.048 ERROR c.s.n.replication.cli.ReplicatorCli - Error running replicator
      com.sonatype.nexus.replication.cli.exceptions.ReplicationConfigurationException: Can't process Replication Configuration File on config.yml
              at com.sonatype.nexus.replication.cli.ReplicatorCli.readReplicationConfiguration(ReplicatorCli.java:78)
              at com.sonatype.nexus.replication.cli.ReplicatorCli.main(ReplicatorCli.java:59)
      Caused by: java.io.FileNotFoundException: config.yml (No such file or directory)
              at java.io.FileInputStream.open0(Native Method)
              at java.io.FileInputStream.open(FileInputStream.java:195)
              at java.io.FileInputStream.<init>(FileInputStream.java:138)
              at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:354)
              at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:15)
              at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3494)
              at com.sonatype.nexus.replication.cli.ReplicatorCli.readReplicationConfiguration(ReplicatorCli.java:75)
              ... 1 common frames omitted
      

      NOTE: tried with relative path and also "-replicationconfigfile=/root/config.yml".

      EXPECTATION:

      The debug/verbose outputs are necessary for troubleshooting various replication issues, so if "-debug" has been replaced with another option, please update the doc. Otherwise, please fix this.
      Also same for "-replicationconfigfile", but for this option, it seems "java -Dconf.file=/root/config.yml ..." work.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hosako Hajime Osako
            Last Updated By:
            Hajime Osako Hajime Osako
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title