Goアプリ開発中にMongoDBを使用したのですが、起動ができず詰まっております。
macを使用しており、
brew install mongodb-community brew services start mongodb-community mongod
の順で実行したのですが、下のような結果が出力されて最後に実行が閉じられてしまっていて起動ができていないと思います。
どなたかわかる方おりましたらご教授お願いいたします。
mynameMacBook-Air:gotest myname$ mongod {"t":{"$date":"2021-04-28T23:17:48.209+09:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"} {"t":{"$date":"2021-04-28T23:17:48.218+09:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} {"t":{"$date":"2021-04-28T23:17:48.219+09:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."} {"t":{"$date":"2021-04-28T23:17:48.223+09:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":70993,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"tanakakenshounoMacBook-Air.local"}} {"t":{"$date":"2021-04-28T23:17:48.224+09:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.5","gitVersion":"ff5cb77101b052fa02da43b8538093486cf9b3f7","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}} {"t":{"$date":"2021-04-28T23:17:48.225+09:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"19.6.0"}}} {"t":{"$date":"2021-04-28T23:17:48.225+09:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{}}} {"t":{"$date":"2021-04-28T23:17:48.228+09:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Permission denied"}} {"t":{"$date":"2021-04-28T23:17:48.229+09:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":919}} {"t":{"$date":"2021-04-28T23:17:48.229+09:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"} mynameMacBook-Air:gotest myname$
また
mongo
を実行すると下記のようなエラーが出てしまっている状態です。
mynameMacBook-Air:gotest myname$ mongo MongoDB shell version v4.4.5 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:374:17 @(connect):2:6 exception: connect failed exiting with code 1 mynameMacBook-Air:gotest myname$
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/28 15:21
2021/04/28 16:39 編集
2021/04/29 01:07
2021/04/29 02:24
2021/04/29 03:00
2021/04/29 03:29
2021/04/29 03:41
2021/04/29 03:48
2021/04/29 04:04