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

时间:2014-10-28 23:44:30

标签: php mongodb codeigniter

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

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

以下是信息:

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

该网站是Codeigniter。

The Site

如果我运行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

1 个答案:

答案 0 :(得分:0)

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

var $sessionArray = arsray();

没有什么能像你好arsray一样毁了你的一天!