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

MongoRunner.runMongod() should return correct connection instance for octal port values

    XMLWordPrintable

Details

    Description

      Connection instance returned through MongoRunner.runMongod() for octal port value does not connect to decimal equivalent of octal value and throws "Failed to connect " error. Below is the stack trace:

      MongoDB shell version: 2.7.8
      connecting to: test
      > 
      > 
      > var port = "045000";
      > var conn = MongoRunner.runMongod( { port: port});
      Resetting db path '/data/db/mongod-045000'
      2014-10-28T14:55:02.137-0400 I -        shell: started program /Users/jalpatrivedi/code/mongo/mongod --port 045000 --dbpath /data/db/mongod-045000 --setParameter enableTestCommands=1
      2014-10-28T14:55:02.139-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] MongoDB starting : pid=48759 port=18944 dbpath=/data/db/mongod-045000 64-bit host=jalpamac
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] 
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] ** NOTE: This is a development version (2.7.8) of MongoDB.
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] **       Not recommended for production.
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] 
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] db version v2.7.8
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] git version: 0e9cb3b20498b9f167afaff7a5c4a4d1da7e06a2
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] build info: Darwin mci-osx108-8.build.10gen.cc 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] allocator: system
       m45000| 2014-10-28T14:55:02.165-0400 I -        [initandlisten] options: { net: { port: 18944 }, setParameter: { enableTestCommands: "1" }, storage: { dbPath: "/data/db/mongod-045000" } }
       m45000| 2014-10-28T14:55:02.168-0400 I JOURNAL  [initandlisten] journal dir=/data/db/mongod-045000/journal
       m45000| 2014-10-28T14:55:02.168-0400 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
       m45000| 2014-10-28T14:55:02.182-0400 I INDEXING [initandlisten] allocating new ns file /data/db/mongod-045000/local.ns, filling with zeroes...
       m45000| 2014-10-28T14:55:02.224-0400 I STORAGE  [FileAllocator] allocating new datafile /data/db/mongod-045000/local.0, filling with zeroes...
       m45000| 2014-10-28T14:55:02.224-0400 I STORAGE  [FileAllocator] creating directory /data/db/mongod-045000/_tmp
       m45000| 2014-10-28T14:55:02.301-0400 I STORAGE  [FileAllocator] done allocating datafile /data/db/mongod-045000/local.0, size: 64MB,  took 0.076 secs
       m45000| 2014-10-28T14:55:02.318-0400 I QUERY    [initandlisten] command local.$cmd command: create { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 numYields:0  reslen:37 135ms
       m45000| 2014-10-28T14:55:02.318-0400 I NETWORK  [initandlisten] waiting for connections on port 18944
      2014-10-28T14:55:02.340-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:02.541-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:02.743-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:02.945-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:03.146-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:03.348-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:03.549-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:03.751-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:03.952-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:04.153-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:04.354-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:04.556-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:04.757-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused
      2014-10-28T14:55:04.958-0400 W NETWORK  Failed to connect to 127.0.0.1:45000, reason: errno:61 Connection refused

      Attachments

        Issue Links

          Activity

            People

              backlog-server-tig DO NOT USE - Backlog - Test Infrastructure Group (TIG)
              jalpa.trivedi@mongodb.com Jalpa Trivedi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: