no arquivo /etc/mongodb.conf Eu tenho essa configuração bindIp:
"127.0.0.1,192.168.1.51", 192.168.1.51 é o meu ip privado dado pelo meu roteador.
quando faço systemkll status mongodb:
mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/usr/lib/systemd/system/mongodb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2016-09-26 17:51:40 CST; 32s ago
Process: 1070 ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf (code=exited, status=48)
Main PID: 1070 (code=exited, status=48)
quando eu verifico /var/log/mongodb/mongod.log isto é o que eu recebo:
2016-09-26T17:55:05.129-0600 I CONTROL [main] ***** SERVER RESTARTED *****
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] MongoDB starting : pid=2916 port=27017 dbpath=/var/lib/mongodb 64-bit host=goku
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] db version v3.2.9
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] git version: 22ec9e93b40c85fc7cae7d56e7d6a02fd811088c
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2i 22 Sep 2016
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] allocator: tcmalloc
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] modules: none
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] build environment:
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] distarch: x86_64
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] target_arch: x86_64
2016-09-26T17:55:05.135-0600 I CONTROL [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,
192.168.1.51", port: 27017 }, processManagement: { pidFilePath: "/var/run/mongodb/mongod.pid" }, security: { authorization
: "enabled" }, storage: { dbPath: "/var/lib/mongodb", engine: "wiredTiger", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true } }
2016-09-26T17:55:05.163-0600 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=6G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),f
ile_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-09-26T17:55:05.521-0600 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2016-09-26T17:55:05.521-0600 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-09-26T17:55:05.522-0600 I NETWORK [initandlisten] waiting for connections on port 27017
no entanto eu posso executar o systemctl restart mongodb e tudo funciona
Eu editei /usr/lib/systemd/system/mongodb.service e adicionei estas duas linhas:
Requires=NetworkManager-dispatcher.service NetworkManager.service
After=syslog.target NetworkManager-dispatcher.service NetworkManager.service
então a pergunta de um milhão de dólares é, o que mais devo / eu poderia fazer para que funcione no tempo de inicialização?
obrigado pela sua ajuda: -)