MongoDB-重新启动VPS后,与数据库的连接丢失



我正在使用Digital Ocean,并重新启动了我的VPS,现在我的应用程序无法启动。

起初它说它失去了与我的数据库的连接,现在它只是一个白色屏幕。我不知道该怎么办。

这是消息:

Unable to connect to MongoDB: Failed to connect to: localhost:27017: Remote server has closed the connection

该站点是Codeigniter。

站点

如果我运行mongod,那么我会得到这个(不是说我需要运行这个):

Tue Oct 28 19:42:45.031 [initandlisten] MongoDB starting : pid=1240 port=27017 dbpath=/data/db/ 64-bit host=lucrum
Tue Oct 28 19:42:45.031 [initandlisten] db version v2.4.8
Tue Oct 28 19:42:45.031 [initandlisten] git version: a350fc38922fbda2cec8d5dd842237b904eafc14
Tue Oct 28 19:42:45.032 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Tue Oct 28 19:42:45.032 [initandlisten] allocator: tcmalloc
Tue Oct 28 19:42:45.032 [initandlisten] options: {}
Tue Oct 28 19:42:45.041 [initandlisten] journal dir=/data/db/journal
Tue Oct 28 19:42:45.042 [initandlisten] recover : no journal files present, no recovery needed
Tue Oct 28 19:42:45.166 [initandlisten] ERROR: listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017
Tue Oct 28 19:42:45.166 [initandlisten] ERROR:   addr already in use
Tue Oct 28 19:42:45.167 [initandlisten] now exiting
Tue Oct 28 19:42:45.167 dbexit: 
Tue Oct 28 19:42:45.167 [initandlisten] shutdown: going to close listening sockets...
Tue Oct 28 19:42:45.167 [initandlisten] shutdown: going to flush diaglog...
Tue Oct 28 19:42:45.168 [initandlisten] shutdown: going to close sockets...
Tue Oct 28 19:42:45.168 [initandlisten] shutdown: waiting for fs preallocator...
Tue Oct 28 19:42:45.168 [initandlisten] shutdown: lock for final commit...
Tue Oct 28 19:42:45.168 [initandlisten] shutdown: final commit...
Tue Oct 28 19:42:45.168 [websvr] ERROR: listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:28017
Tue Oct 28 19:42:45.169 [websvr] ERROR:   addr already in use
Tue Oct 28 19:42:45.172 [initandlisten] shutdown: closing all files...
Tue Oct 28 19:42:45.173 [initandlisten] closeAllFiles() finished
Tue Oct 28 19:42:45.173 [initandlisten] journalCleanup...
Tue Oct 28 19:42:45.173 [initandlisten] removeJournalFiles
Tue Oct 28 19:42:45.174 [initandlisten] shutdown: removing fs lock...
Tue Oct 28 19:42:45.174 dbexit: really exiting now

这很尴尬,但我可以自嘲。我最终进行了回滚并修复了问题,然后用新文件替换了我的所有应用程序,问题又回来了。所以我最终查看了我的一个模型文件,发现了这个。。。

var $sessionArray = arsray();

没有什么比一个好的arsray更能毁了你的一天了!

最新更新