После перенастройки mongod.conf при попытке запустить mongod.service я получаю сообщение об ошибке.
Я попытался запустить команду "mongod -f / path-to-configuration-file /
но все идет нормально, поэтому я попытался дать разрешения для папки db и log, запустив команды:
1 - chmod 777 / path-to-files
2 - chown mongod:mongod / path-to-files -R
После этого я попытался дать разрешение на порт 40017, но все еще получаю ошибку.
Мой файл mongod.conf:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /bin/rsmongo/log/mongod.log
# Where and how to store data.
storage:
dbPath: /bin/rsmongo/data/db
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
timeZoneInfo: /usr/share/zoneinfo
# network interfaces
net:
port: 40017
Статус Systemctl mongod.service результат:
● mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Ter 2018-12-18 14:02:01 BRST; 9s ago
Docs: https://docs.mongodb.org/manual
Process: 3880 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=1/FAILURE)
Process: 3877 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 3874 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 3872 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: Starting MongoDB Database Server...
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: 2018-12-18T14:02:01.128-0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: about to fork child process, waiting until server is ready for connections.
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: forked process: 3883
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: ERROR: child process failed, exited with error number 1
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: To see additional information in this output, start without the "--fork" option.
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: mongod.service: control process exited, code=exited status=1
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: Failed to start MongoDB Database Server.
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: Unit mongod.service entered failed state.
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: mongod.service failed.
Journalctl -xe результат:
Dez 18 14:01:01 bon-lap-srv01 CROND[3850]: (root) CMD (run-parts /etc/cron.hourly)
Dez 18 14:01:01 bon-lap-srv01 run-parts(/etc/cron.hourly)[3853]: starting 0anacron
Dez 18 14:01:01 bon-lap-srv01 run-parts(/etc/cron.hourly)[3859]: finished 0anacron
Dez 18 14:01:01 bon-lap-srv01 run-parts(/etc/cron.hourly)[3861]: starting 0yum-hourly.cron
Dez 18 14:01:01 bon-lap-srv01 run-parts(/etc/cron.hourly)[3865]: finished 0yum-hourly.cron
Dez 18 14:02:01 bon-lap-srv01 polkitd[1006]: Registered Authentication Agent for unix-process:3867:1091339 (system bus name :1.51 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/fr
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: Starting MongoDB Database Server...
-- Subject: Unidade mongod.service sendo iniciado
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade mongod.service está sendo iniciada.
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: 2018-12-18T14:02:01.128-0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: about to fork child process, waiting until server is ready for connections.
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: forked process: 3883
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: ERROR: child process failed, exited with error number 1
Dez 18 14:02:01 bon-lap-srv01 mongod[3880]: To see additional information in this output, start without the "--fork" option.
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: mongod.service: control process exited, code=exited status=1
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: Failed to start MongoDB Database Server.
-- Subject: A unidade mongod.service falhou
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade mongod.service falhou.
--
-- O resultado é failed.
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: Unit mongod.service entered failed state.
Dez 18 14:02:01 bon-lap-srv01 systemd[1]: mongod.service failed.
Dez 18 14:02:01 bon-lap-srv01 polkitd[1006]: Unregistered Authentication Agent for unix-process:3867:1091339 (system bus name :1.51, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, loc