I'm having problems setting up a local mongo db.
I've installed it with apt-get and started it with
$ service mongod start
My mongod.log file then reads:
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] MongoDB starting : pid=23127 port=27017 dbpath=/var/lib/mongodb 64-bit host=laptop
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] db version v3.6.0-rc1
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] git version: 979ee612682b77d9cabaafae10787fbb578cd32a
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] allocator: tcmalloc
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] modules: none
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] build environment:
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] distmod: ubuntu1604
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] distarch: x86_64
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] target_arch: x86_64
2017-10-29T10:50:58.290+0100 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2017-10-29T10:50:58.291+0100 I - [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2017-10-29T10:50:58.291+0100 I STORAGE [initandlisten]
2017-10-29T10:50:58.291+0100 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2017-10-29T10:50:58.291+0100 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2017-10-29T10:50:58.291+0100 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3419M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2017-10-29T10:50:58.553+0100 I STORAGE [initandlisten] WiredTiger message [1509270658:553910][23127:0x7ff9d73459c0], txn-recover: Main recovery loop: starting at 3/31104
2017-10-29T10:50:58.615+0100 I STORAGE [initandlisten] WiredTiger message [1509270658:615079][23127:0x7ff9d73459c0], txn-recover: Recovering log 3 through 4
2017-10-29T10:50:58.619+0100 I STORAGE [initandlisten] WiredTiger message [1509270658:619671][23127:0x7ff9d73459c0], txn-recover: Recovering log 4 through 4
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten]
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten]
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2017-10-29T10:50:59.221+0100 I CONTROL [initandlisten]
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten]
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten]
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2017-10-29T10:50:59.222+0100 I CONTROL [initandlisten]
2017-10-29T10:50:59.248+0100 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2017-10-29T10:50:59.249+0100 I NETWORK [initandlisten] waiting for connections on port 27017
But when I try to access 127.0.0.1:27017 in a browser I'm just getting
"This site can’t be reached. The connection was reset."
And now my mongod.log file has the following lines appended to it:
2017-10-29T11:15:05.056+0100 I NETWORK [initandlisten] waiting for connections on port 27017
2017-10-29T11:15:49.780+0100 I NETWORK [listener] connection accepted from 127.0.0.1:35398 #1 (1 connection now open)
2017-10-29T11:15:49.780+0100 I NETWORK [listener] connection accepted from 127.0.0.1:35402 #2 (2 connections now open)
2017-10-29T11:15:49.853+0100 I NETWORK [conn1] Error receiving request from client: SSLHandshakeFailed: SSLHandshakeFailed. Ending connection from 127.0.0.1:35398 (connection id: 1)
2017-10-29T11:15:49.853+0100 I NETWORK [conn1] end connection 127.0.0.1:35398 (1 connection now open)
2017-10-29T11:15:49.853+0100 I NETWORK [conn2] Error receiving request from client: SSLHandshakeFailed: SSLHandshakeFailed. Ending connection from 127.0.0.1:35402 (connection id: 2)
2017-10-29T11:15:49.853+0100 I NETWORK [conn2] end connection 127.0.0.1:35402 (0 connections now open)
2017-10-29T11:15:49.853+0100 I NETWORK [listener] connection accepted from 127.0.0.1:35406 #3 (1 connection now open)
2017-10-29T11:15:49.853+0100 I NETWORK [conn3] Error receiving request from client: SSLHandshakeFailed: SSLHandshakeFailed. Ending connection from 127.0.0.1:35406 (connection id: 3)
2017-10-29T11:15:49.853+0100 I NETWORK [conn3] end connection 127.0.0.1:35406 (0 connections now open)
2017-10-29T11:15:49.943+0100 I NETWORK [listener] connection accepted from 127.0.0.1:35410 #4 (1 connection now open)
2017-10-29T11:15:49.943+0100 I NETWORK [conn4] Error receiving request from client: SSLHandshakeFailed: SSLHandshakeFailed. Ending connection from 127.0.0.1:35410 (connection id: 4)
2017-10-29T11:15:49.943+0100 I NETWORK [conn4] end connection 127.0.0.1:35410 (0 connections now open)
Do I need to run some additional program to host it as a web server? Or is it something else I'm missing here? It's weird that it's complaining about SSL since it's just runnig on localhost with default settings.