Mongodb php连接不可用
尝试过netstat -tlnp | grep 27017 然后杀死[root @ mongodb〜]#kill -9 2007
重新启动mongodb
ludo@aegir:~$ mongo
MongoDB shell version v4.0.9
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
2019-04-24T00:03:49.682+0100 I NETWORK [js] recv(): message msgLen
1347703880 is invalid. Min 16 Max: 48000000
2019-04-24T00:03:49.683+0100 E QUERY [js] Error: network error
while
attempting to run command 'isMaster' on host '127.0.0.1:27017' :
connect@src/mongo/shell/mongo.js:343:13
@(connect):2:6
exception: connect failed
尝试了来自Google的众多“修复”,没有一个能像How to repair my mongodb?一样有效
从我的错误日志中:
ludo@aegir:~$ sudo tail -n 25 /var/log/mongodb/mongod.log
Apr 24 00:09:44 aegir anacron[6294]: Updated timestamp for job `cron.daily' to 2019-04-24
Apr 24 00:09:54 aegir liblogging-stdlog: [origin software="rsyslogd" swVersion="8.24.0" x-pid="479" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Apr 24 00:09:54 aegir liblogging-stdlog: [origin software="rsyslogd" swVersion="8.24.0" x-pid="479" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Apr 24 00:09:55 aegir anacron[5961]: Job `cron.daily' terminated (exit status: 1) (mailing output)
Apr 24 00:09:55 aegir anacron[5961]: Normal exit (1 job run)
Apr 24 00:09:55 aegir systemd[1]: anacron.timer: Adding 2min 11.245122s random time.
Apr 24 00:09:55 aegir postfix/pickup[1041]: A5E082A0014: uid=0 from=<root>
Apr 24 00:09:55 aegir postfix/cleanup[6428]: A5E082A0014: message-id=<20190423230955.A5E082A0014@aegir.local.com>
Apr 24 00:09:55 aegir postfix/qmgr[1042]: A5E082A0014: from=<root@aegir.local.com>, size=761, nrcpt=1 (queue active)
Apr 24 00:09:55 aegir postfix/local[6431]: A5E082A0014: to=<root@aegir.local.com>, orig_to=<root>, relay=local, delay=0.13, delays=0.06/0.01/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
Apr 24 00:09:55 aegir postfix/qmgr[1042]: A5E082A0014: removed
Apr 24 00:10:01 aegir CRON[6432]: pam_unix(cron:session): session opened for user aegir by (uid=0)
Apr 24 00:10:01 aegir CRON[6433]: (aegir) CMD (/usr/bin/env php /usr/local/bin/drush '@hostmaster' hosting-dispatch )
Apr 24 00:10:04 aegir php: DIGEST-MD5 common mech free
Apr 24 00:10:04 aegir CRON[6432]: pam_unix(cron:session): session closed for user aegir
Apr 24 00:10:42 aegir dbus[485]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Apr 24 00:10:42 aegir systemd[1]: Starting Hostname Service...
Apr 24 00:10:43 aegir dbus[485]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 24 00:10:43 aegir systemd[1]: Started Hostname Service.
Apr 24 00:11:01 aegir CRON[6474]: pam_unix(cron:session): session opened for user aegir by (uid=0)
Apr 24 00:11:01 aegir CRON[6475]: (aegir) CMD (/usr/bin/env php /usr/local/bin/drush '@hostmaster' hosting-dispatch )
Apr 24 00:11:04 aegir php: DIGEST-MD5 common mech free
Apr 24 00:11:04 aegir CRON[6474]: pam_unix(cron:session): session closed for user aegir
Apr 24 00:11:13 aegir sudo: ludo : TTY=pts/1 ; PWD=/home/ludo ; USER=root ; COMMAND=/usr/bin/tail -n 25 /var/log/mongodb/mongod.log
Apr 24 00:11:13 aegir sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
当我尝试了很多所谓的修复程序后,很想知道出了什么问题