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

Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.5
    • Component/s: WiredTiger
    • Linux

      When i am going to connect mongo it's give me below error :

      mongo
      MongoDB shell version: 3.2.5
      connecting to: test
      2018-02-26T04:51:31.527+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
      2018-02-26T04:51:31.527+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
      connect@src/mongo/shell/mongo.js:229:14
      @(connect):1:6
      exception: connect failed

      After that i am going to repair mongodb by following command :
      sudo mongod --dbpath /var/lib/mongodb/ --repair

      sudo mongod --dbpath /var/lib/mongodb/ --repair
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] MongoDB starting : pid=30365 port=27017 dbpath=/var/lib/mongodb/ 64-bit host=ip-172-31-0-51
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] db version v3.2.5
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] git version: 34e65e5383f7ea1726332cb175b73077ec4a1b02
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] allocator: tcmalloc
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] modules: none
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] build environment:
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] distmod: ubuntu1404
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] distarch: x86_64
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] target_arch: x86_64
      2018-02-26T04:59:50.459+0000 I CONTROL [initandlisten] options:
      Unknown macro:

      { repair}

      2018-02-26T04:59:50.481+0000 I - [initandlisten] Detected data files in /var/lib/mongodb/ created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
      2018-02-26T04:59:50.481+0000 I STORAGE [initandlisten] Detected WT journal files. Running recovery from last checkpoint.
      2018-02-26T04:59:50.481+0000 I STORAGE [initandlisten] journal to nojournal transition config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
      2018-02-26T04:59:50.487+0000 E STORAGE [initandlisten] WiredTiger (0) [1519621190:487846][30365:0x7f5429562cc0], file:WiredTiger.wt, connection: read checksum error for 4096B block at offset 36864: block header checksum of 2260760038 doesn't match expected checksum of 1188426859
      2018-02-26T04:59:50.487+0000 E STORAGE [initandlisten] WiredTiger (0) [1519621190:487937][30365:0x7f5429562cc0], file:WiredTiger.wt, connection: WiredTiger.wt: encountered an illegal file format or internal value
      2018-02-26T04:59:50.487+0000 E STORAGE [initandlisten] WiredTiger (-31804) [1519621190:487973][30365:0x7f5429562cc0], file:WiredTiger.wt, connection: the process must exit and restart: WT_PANIC: WiredTiger library panic
      2018-02-26T04:59:50.488+0000 I - [initandlisten] Fatal Assertion 28558
      2018-02-26T04:59:50.488+0000 I - [initandlisten]

      ***aborting after fassert() failure

      Please suggest me solution for this.
      Thanks!

        1. log.txt
          18 kB
          Palak Patel
        2. repair_attempt.tar.gz
          54 kB
          Kelsey Schubert
        3. WiredTiger.turtle
          0.9 kB
          Palak Patel
        4. WiredTiger.wt
          920 kB
          Palak Patel

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            palak007 Palak Patel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: