[SERVER-33480] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused Created: 26/Feb/18  Updated: 27/Jul/18  Resolved: 09/Mar/18

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: 3.2.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Palak Patel Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: envns, rns, rps, trcf, wtc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File WiredTiger.turtle     File WiredTiger.wt     Text File log.txt     File repair_attempt.tar.gz    
Issue Links:
Duplicate
is duplicated by TOOLS-1958 Failed to connect to 127.0.0.1:27017,... Closed
Operating System: Linux
Participants:

 Description   

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!



 Comments   
Comment by Kelsey Schubert [ 28/Feb/18 ]

Hi palak007,

The logs previously uploaded after starting with the new files indicate that the mongod was started normally, without the --repair command line parameter specified. Would you please double check? If there is no other corruption, I would expect the repair operation to rebuild the indexes.

Thanks,
Kelsey

Comment by Palak Patel [ 28/Feb/18 ]

Hi Kelsey T Schubert,

mongod is running on other path but not only on /var/lib/mongodb.
there is index-.wt files are missing in above path. But my question is how can i recover these index-.wt files in given path?
your given solution is work for me.
Log for mongod --repair is in previously attached file log.txt.

Thanks.
Palak Patel

Comment by Kelsey Schubert [ 28/Feb/18 ]

Hi palak007,

Have you had any luck running mongod --repair with the new files? Would you show the output of that process if not?

Thank you,
Kelsey

Comment by Palak Patel [ 27/Feb/18 ]

Hi Kelsey T Schubert,

Thanks for your solution. after replacing your files there is no more block header checksum. But there is another issue might here.
I have found in log which is attached in log.txt file.
There is missing all of index-1-2111875094627348415.wt files in /var/lib/mongodb.
I log.txt s there any solution for this?

Thanks!
Palak Patel

Comment by Kelsey Schubert [ 26/Feb/18 ]

Hi palak007,

I've attached a repair attempt of the files you provided. Please extract these files and replace them in your $dbpath and let us know if it resolves the issue. If you are still seeing errors after replacing these files, please provide the complete logs from the affected node so that we can further investigate.

Thank you,
Kelsey

Comment by Palak Patel [ 26/Feb/18 ]

Hi Kelsey T Schubert,

Is there any updates on previous conversation? do you require anything else
to check which way to solve issue?


Palak Patel,
Thanks.

Comment by Palak Patel [ 26/Feb/18 ]

Hi Kelsey T Schubert,

Yes sure.. i have uploaded WiredTiger.turtle too. please look into it.

Thanks!
Palak

Comment by Kelsey Schubert [ 26/Feb/18 ]

Hi palak007,

So we can attempt to repair these files, would you please upload the wiredtiger.turtle file as well?

Thank you,
Kelsey

Generated at Thu Feb 08 04:33:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.