Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16543

Wrong error message for net.http.port

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 2.8.0-rc2
    • Component/s: Usability
    • Labels:
      None
    • ALL

      Don't ask me why I tried it, but if I specify the net.http.port in my yaml config, I get the "Expected boolean switch but found string: 20001 for option: net.http.port" on startup.

      AD-MAC10G:fffx alexander$ cat config.yaml
      net:
        http:
          RESTInterfaceEnabled: true
          enabled: true
          port: 22222
      operationProfiling:
        mode: slowOp
      processManagement:
        fork: true
      replication:
        replSetName: rs0
      setParameter:
        internalQueryExecMaxBlockingSortBytes: 1073741824
      storage:
        dbPath: /tmp/fffx/db
        engine: wiredtiger
        journal:
          enabled: true
      systemLog:
        destination: file
        logAppend: true
        path: /tmp/fffx/log
      AD-MAC10G:fffx alexander$ mongod -f config.yaml --cpu true
      Expected boolean switch but found string: 20001 for option: net.http.port
      try 'mongod --help' for more information
      

      According to the source, the error should've been different:

              // Check options that are not yet supported
              if (params.count("net.http.port")) {
                  return Status(ErrorCodes::BadValue,
                                "The net.http.port option is not currently supported");
              }
      

            Assignee:
            matt.kangas Matt Kangas
            Reporter:
            alex.komyagin@mongodb.com Alexander Komyagin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: