Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31219

Fix configuration of nuxeo.log.dir with nuxeoctl config on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2021.0
    • Fix Version/s: 2021.27
    • Component/s: Configuration, Launcher

      Description

      Pre-requisite : using the "cmd" terminal on MS WIndows

      Steps to reproduce:

      1. Set nuxeo.log.dir with "nuxeoctl config"
        nuxeoctl.bat config nuxeo.log.dir c:/log
      2. observe in nuxeo.conf that nuxeo.log.dir is set with the set value
      3. Set another parameter with "nuxeoctl config"
        nuxeoctl.bat config test test
      4. observe in nuxeo.conf that nuxeo.log.dir has been changed to a value with antislashes (which seems fine given the fact we are running Nuxeo on windows)
      5. Set a last parameter with "nuxeoctl config"
        nuxeoctl.bat config tes2t test2

      An error is displayed in the console

      Cannot execute command. Illegal char <
      > at index 2: C:
      uxeo-server-tomcat-2021log
      java.nio.file.InvalidPathException: Illegal char <
      > at index 2: C:
      uxeo-server-tomcat-2021log
              at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) ~[?:?]
              at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:?]
              at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[?:?]
              at sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) ~[?:?]
              at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) ~[?:?]
              at java.nio.file.Path.resolve(Path.java:515) ~[?:?]
              at org.nuxeo.launcher.config.ConfigurationHolder.makePathAbsolute(ConfigurationHolder.java:291) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.config.ConfigurationHolder.lambda$makePathAbsolute$2(ConfigurationHolder.java:285) ~[nuxeo-launcher-3809.jar:?]
              at java.util.concurrent.ConcurrentHashMap.replaceAll(ConcurrentHashMap.java:1616) ~[?:?]
              at java.util.Properties.replaceAll(Properties.java:1451) ~[?:?]
              at org.nuxeo.launcher.config.ConfigurationHolder.makePathAbsolute(ConfigurationHolder.java:285) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.config.ConfigurationHolder.putAll(ConfigurationHolder.java:273) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.config.ConfigurationGenerator.loadConfiguration(ConfigurationGenerator.java:293) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.config.ConfigurationGenerator.setProperties(ConfigurationGenerator.java:608) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.NuxeoLauncher.setConfigProperties(NuxeoLauncher.java:1588) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.NuxeoLauncher.config(NuxeoLauncher.java:1483) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.NuxeoLauncher.launch(NuxeoLauncher.java:1080) ~[nuxeo-launcher-3809.jar:?]
              at org.nuxeo.launcher.NuxeoLauncher.main(NuxeoLauncher.java:948) [nuxeo-launcher-3809.jar:?]
      

      Observe in nuxeo.conf that nuxeo.log.dir is set with another value where Nuxeo has tried to make an absolute path from the previous value. But the new value cannot be read because of the antislash which escapes the next character

      Expected behavior: nuxeo.log.dir is not modified in nuxeo.conf when another configuration parameter is set.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m