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

Make error message when passing a "mongodb://" URI to shell more friendly

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None

      This seems unfriendly:

      ./mongo "mongodb://localhost:27017/test?replicaSet=repl0"
      MongoDB shell version: 2.7.8-pre-
      connecting to: mongodb://localhost:27017/test?replicaSet=repl0
      2014-10-20T15:07:59.372-0400 I -        Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 230
      2014-10-20T15:07:59.374-0400 I -
       0x1002139aa 0x1001a4cdb 0x1001915ca 0x10006afe6 0x10004ed05 0x10014b4d2 0x10013ddd2 0x100333941 0x15f39d506362
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"100000000","o":"2139AA"},{"b":"100000000","o":"1A4CDB"},{"b":"100000000","o":"1915CA"},{"b":"100000000","o":"6AFE6"},{"b":"100000000","o":"4ED05"},{"b":"100000000","o":"14B4D2"},{"b":"100000000","o":"13DDD2"},{"b":"100000000","o":"333941"},{"b":"0","o":"15F39D506362"}],"processInfo":{ "mongodbVersion" : "2.7.8-pre-", "gitVersion" : "4e10def7b1ea9da02a5218d592073ff2587544cd", "uname" : { "sysname" : "Darwin", "release" : "13.4.0", "version" : "Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64", "machine" : "x86_64" }, "somap" : [ { "path" : "/Users/emptysquare/mongodb/mongo/./mongo", "machType" : 2, "b" : "100000000", "buildId" : "7CAB896A00533AF39333751B1F3E402B" }, { "path" : "/usr/lib/libssl.0.9.8.dylib", "machType" : 6, "b" : "7FFF8585F000", "buildId" : "51C844FFD7CD35259ABB84B8DD11D5E4" }, { "path" : "/usr/lib/libcrypto.0.9.8.dylib", "machType" : 6, "b" : "7FFF8E2BF000", "buildId" : "ED7F386510D4346B8C9CD968EB3B5D35" }, { "path" : "/usr/lib/libSystem.B.dylib", "machType" : 6, "b" : "7FFF90C31000", "buildId" : "E303F2F8A8CF3DF384B3F2D0EE41CCF6" }, { "path" : "/usr/lib/libstdc++.6.dylib", "machType" : 6, "b" : "7FFF90D4A000", "buildId" : "0241E6A4136833BE950BD0A175C41F54" }, { "path" : "/System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent", "machType" : 6, "b" : "7FFF85B5B000", "buildId" : "334A82F44AE43719A51186D0B0723E2B" }, { "path" : "/usr/lib/libz.1.dylib", "machType" : 6, "b" : "7FFF8B447000", "buildId" : "42E0C8C6CA383CA48619D24ED5DD492E" }, { "path" : "/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFF90FFB000", "buildId" : "BDC1E65B72A13DA3A57CB23159CAAD0B" }, { "path" : "/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFF8FE67000", "buildId" : "8C4F0CA0389C3EDCB155E62DD2187E1D" }, { "path" : "/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFF88634000", "buildId" : "4CD916B21B17362AB403EF24A1DAC141" }, { "path" : "/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFF85B53000", "buildId" : "CF29DFF605893590834C82E2316612E8" }, { "path" : "/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFF8DA1E000", "buildId" : "F3973C2814B63006BB2B00DD7F09ABC7" }, { "path" : "/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFF87A4A000", "buildId" : "C4E4A18D3C3B3C9C8709A4270D998DE7" }, { "path" : "/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFF8A538000", "buildId" : "7C9EC3B7DDE333FF953F4067C743951D" }, { "path" : "/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFF8A263000", "buildId" : "3AA8D85DCF003BD3A5A0E28E1A32A6D8" }, { "path" : "/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFF8F2E7000", "buildId" : "A40A0C7B321639B48AE0B5D3BAF1DA8A" }, { "path" : "/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFF87C6F000", "buildId" : "1D2910DFC0363A82A3FD44FF73B5FF9B" }, { "path" : "/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFF8E39C000", "buildId" : "7A1A2BCBC03D3A25BFA43E569B2D2C38" }, { "path" : "/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFF8D263000", "buildId" : "3543F917928E3DB2A2F47AB73B4970EF" }, { "path" : "/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFF84FC6000", "buildId" : "655FB34352CF3E2FB14DBEBF5AAEF94D" }, { "path" : "/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFF846CB000", "buildId" : "FB856CD12AEA39078E9B1E54B6827F82" }, { "path" : "/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFF8B316000", "buildId" : "6FD3A4004BB23B95B90CBE6E9D0D78FA" }, { "path" : "/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" : "7FFF8DC5A000", "buildId" : "4998CB6A9D54390A9F575D1AC53C135C" }, { "path" : "/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFF8B459000", "buildId" : "17B03FFD92C532829981EBB28B456207" }, { "path" : "/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFF8763E000", "buildId" : "7D41A156D2853849A2C3C04ADE797D98" }, { "path" : "/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFF8A246000", "buildId" : "9EDE872E2A9E3A788E1DAB790794A098" }, { "path" : "/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFF9089E000", "buildId" : "B7F0E2E4277733FCA787D6430B630D54" }, { "path" : "/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFF89327000", "buildId" : "A695B4E438E9332EA77229D31E3F1385" }, { "path" : "/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" : "7FFF908CE000", "buildId" : "8B1E1F1DA5CC3BAE8B1EABC84337A364" }, { "path" : "/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFF8E100000", "buildId" : "9B34B4FEF5AD3F09A5F046AFF3571323" }, { "path" : "/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" : "7FFF84E0A000", "buildId" : "3C3D3DA832B9324398ECD89B9A1670B3" }, { "path" : "/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" : "7FFF91B5D000", "buildId" : "AB498556B555310E9041F67EC9E00E2C" }, { "path" : "/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" : "7FFF8FD6E000", "buildId" : "0D0B13EA6B7A3AC8BE60B548543BEB77" }, { "path" : "/usr/lib/system/libsystem_stats.dylib", "machType" : 6, "b" : "7FFF90137000", "buildId" : "4E51D5B092A03D0DB90E495A1ED3E391" }, { "path" : "/usr/lib/system/libunc.dylib", "machType" : 6, "b" : "7FFF8A22C000", "buildId" : "62682455186236FE8A047A6B91256438" }, { "path" : "/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFF8A2E9000", "buildId" : "78DCC3582FC1302EB3950155B47CB547" }, { "path" : "/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFF8C6D8000", "buildId" : "AB40CD57F4543FD4B41563B3C0D5C624" }, { "path" : "/usr/lib/libobjc.A.dylib", "machType" : 6, "b" : "7FFF84E18000", "buildId" : "AD7FD984271E30F4A3616B20319EC73B" }, { "path" : "/usr/lib/libauto.dylib", "machType" : 6, "b" : "7FFF8E4BB000", "buildId" : "F45C36E8B6063886B5B1B6745E757CA8" }, { "path" : "/usr/lib/libc++abi.dylib", "machType" : 6, "b" : "7FFF8F08A000", "buildId" : "21A807D367323455B77F743E9F916DF0" }, { "path" : "/usr/lib/libc++.1.dylib", "machType" : 6, "b" : "7FFF85905000", "buildId" : "4F68DFC5207739A8A449CAC5FDEE7BDE" }, { "path" : "/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" : "7FFF88E01000", "buildId" : "4CDB0F7BC0AF3424BC39495696F0DB1E" } ] }}
       mongo(_ZN5mongo15printStackTraceERSo+0x3A) [0x1002139aa]
       mongo(_ZN5mongo10logContextEPKc+0xDB) [0x1001a4cdb]
       mongo(_ZN5mongo12verifyFailedEPKcS1_j+0x1DA) [0x1001915ca]
       mongo(_ZN5mongo16ConnectionStringC2ENS0_14ConnectionTypeERKSsS3_+0x186) [0x10006afe6]
       mongo(_ZN5mongo16ConnectionString5parseERKSsRSs+0x95) [0x10004ed05]
       mongo(_ZN5mongo17mongoConsExternalEPNS_7V8ScopeERKN2v89ArgumentsE+0x122) [0x10014b4d2]
       mongo(_ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE+0x52) [0x10013ddd2]
       mongo(_ZN2v88internalL30Builtin_HandleApiCallConstructENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE+0x231) [0x100333941]
       ??? [0x15f39d506362]
      -----  END BACKTRACE  -----
      2014-10-20T15:07:59.402-0400 I QUERY    Error: assertion src/mongo/client/dbclientinterface.h:230
          at connect (src/mongo/shell/mongo.js:181:14)
          at (connect):1:6 at src/mongo/shell/mongo.js:181
      exception: connect failed
      

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: