几天后,MongoDB在AWS服务器

时间:2017-08-23 06:59:50

标签: angularjs node.js mongodb amazon-web-services

我使用mongo数据库链接到使用ubuntu 14.04的Amazon服务器上的AngularJS / NodeJS网站。

从1个月开始,每隔5或6天我的数据无法访问,我无法通过邮件/密码连接到网站。我需要关闭数据库并重新启动它以使其正常工作。并且存储的所有数据都将丢失。

我不明白为什么,日志文件看起来很正常。 这是错误出现时的完整日志

Thu Aug 17 00:38:52.947 [initandlisten] MongoDB starting : pid=1714 port=27017 dbpath=/home/ubuntu/data/db 64-bit host=ip-myIp
Thu Aug 17 00:38:52.947 [initandlisten] db version v2.4.9
Thu Aug 17 00:38:52.947 [initandlisten] git version: nogitversion
Thu Aug 17 00:38:52.947 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Thu Aug 17 00:38:52.947 [initandlisten] allocator: tcmalloc
Thu Aug 17 00:38:52.947 [initandlisten] options: { dbpath: "/home/ubuntu/data/db", fork: true, logpath: "/var/log/mongod.log" }
Thu Aug 17 00:38:52.952 [initandlisten] journal dir=/home/ubuntu/data/db/journal
Thu Aug 17 00:38:52.952 [initandlisten] recover : no journal files present, no recovery needed
Thu Aug 17 00:38:52.978 [initandlisten] waiting for connections on port 27017
Thu Aug 17 00:38:52.978 [websvr] admin web console waiting for connections on port 28017
Thu Aug 17 00:40:23.927 [initandlisten] connection accepted from 127.0.0.1:52328 #1 (1 connection now open)
Thu Aug 17 00:42:43.295 [conn1] end connection 127.0.0.1:52328 (0 connections now open)
Thu Aug 17 00:43:17.159 [initandlisten] connection accepted from 127.0.0.1:52329 #2 (1 connection now open)
Thu Aug 17 00:47:13.931 [initandlisten] connection accepted from 127.0.0.1:52330 #3 (2 connections now open)
Thu Aug 17 02:53:56.046 [initandlisten] connection accepted from 62.210.127.77:35059 #4 (3 connections now open)
Thu Aug 17 02:53:57.064 [conn4] end connection 62.210.127.77:35059 (2 connections now open)
Thu Aug 17 02:53:57.096 [initandlisten] connection accepted from 62.210.127.17:51812 #5 (3 connections now open)
Thu Aug 17 02:53:57.125 [initandlisten] connection accepted from 62.210.127.17:51816 #6 (4 connections now open)
Thu Aug 17 02:53:57.532 [conn5] end connection 62.210.127.17:51812 (3 connections now open)
Thu Aug 17 02:53:57.532 [conn6] end connection 62.210.127.17:51816 (2 connections now open)
Thu Aug 17 03:23:44.832 [initandlisten] connection accepted from 74.82.47.5:35734 #7 (3 connections now open)
Thu Aug 17 03:23:44.976 [conn7] end connection 74.82.47.5:35734 (2 connections now open)
Thu Aug 17 03:23:57.019 [initandlisten] connection accepted from 74.82.47.5:41550 #8 (3 connections now open)
Thu Aug 17 03:23:57.172 [conn8] end connection 74.82.47.5:41550 (2 connections now open)
Thu Aug 17 05:45:19.925 [initandlisten] connection accepted from 220.181.159.73:40602 #9 (3 connections now open)
Thu Aug 17 05:45:22.925 [conn9] end connection 220.181.159.73:40602 (2 connections now open)
Thu Aug 17 05:45:23.168 [initandlisten] connection accepted from 220.181.159.73:49766 #10 (3 connections now open)
Thu Aug 17 05:45:25.929 [conn10] end connection 220.181.159.73:49766 (2 connections now open)
Thu Aug 17 05:45:26.159 [initandlisten] connection accepted from 220.181.159.73:58268 #11 (3 connections now open)
Thu Aug 17 05:45:26.159 [conn11] end connection 220.181.159.73:58268 (2 connections now open)
Fri Aug 18 03:01:37.788 [initandlisten] connection accepted from 184.105.247.196:61094 #12 (3 connections now open)
Fri Aug 18 03:01:37.931 [conn12] end connection 184.105.247.196:61094 (2 connections now open)
Fri Aug 18 03:01:51.123 [initandlisten] connection accepted from 184.105.247.196:3532 #13 (3 connections now open)
Fri Aug 18 03:01:51.267 [conn13] end connection 184.105.247.196:3532 (2 connections now open)
Sat Aug 19 00:21:23.527 [initandlisten] connection accepted from 45.55.29.41:43416 #14 (3 connections now open)
Sat Aug 19 00:21:33.361 [conn14] end connection 45.55.29.41:43416 (2 connections now open)
Sat Aug 19 03:17:28.802 [initandlisten] connection accepted from 184.105.247.195:42566 #15 (3 connections now open)
Sat Aug 19 03:17:29.028 [conn15] end connection 184.105.247.195:42566 (2 connections now open)
Sat Aug 19 03:17:41.312 [initandlisten] connection accepted from 184.105.247.195:61782 #16 (3 connections now open)
Sat Aug 19 03:17:41.456 [conn16] end connection 184.105.247.195:61782 (2 connections now open)
Sat Aug 19 11:24:28.098 [initandlisten] connection accepted from 168.1.128.35:10000 #17 (3 connections now open)
Sat Aug 19 11:24:31.686 [conn17] end connection 168.1.128.35:10000 (2 connections now open)
Sun Aug 20 03:17:03.998 [initandlisten] connection accepted from 184.105.247.252:57362 #18 (3 connections now open)
Sun Aug 20 03:17:04.298 [conn18] end connection 184.105.247.252:57362 (2 connections now open)
Sun Aug 20 03:17:16.801 [initandlisten] connection accepted from 184.105.247.252:11208 #19 (3 connections now open)
Sun Aug 20 03:17:16.945 [conn19] end connection 184.105.247.252:11208 (2 connections now open)
Sun Aug 20 19:07:53.815 [initandlisten] connection accepted from 106.2.120.103:49396 #20 (3 connections now open)
Sun Aug 20 19:08:03.825 [conn20] end connection 106.2.120.103:49396 (2 connections now open)
Sun Aug 20 23:08:15.624 [initandlisten] connection accepted from 106.2.120.103:48933 #21 (3 connections now open)
Sun Aug 20 23:08:16.383 [conn21] end connection 106.2.120.103:48933 (2 connections now open)
Mon Aug 21 12:38:02.076 [initandlisten] connection accepted from 207.226.141.36:41710 #22 (3 connections now open)
Mon Aug 21 12:38:03.379 [conn22] end connection 207.226.141.36:41710 (2 connections now open)
Mon Aug 21 12:38:03.706 [initandlisten] connection accepted from 207.226.141.36:42522 #23 (3 connections now open)
Mon Aug 21 12:38:04.499 [conn23] dropDatabase BACKUP_DB starting
Mon Aug 21 12:38:04.500 [conn23] removeJournalFiles
Mon Aug 21 12:38:04.507 [conn23] dropDatabase BACKUP_DB finished
Mon Aug 21 12:38:05.037 [conn23] end connection 207.226.141.36:42522 (2 connections now open)
Mon Aug 21 12:38:05.361 [initandlisten] connection accepted from 207.226.141.36:43398 #24 (3 connections now open)
Mon Aug 21 12:38:06.166 [conn24] dropDatabase morethanwinebo starting
Mon Aug 21 12:38:06.166 [conn24] removeJournalFiles
Mon Aug 21 12:38:06.170 [conn24] dropDatabase morethanwinebo finished
Mon Aug 21 12:38:06.708 [conn24] end connection 207.226.141.36:43398 (2 connections now open)
Mon Aug 21 12:38:07.042 [initandlisten] connection accepted from 207.226.141.36:44336 #25 (3 connections now open)
Mon Aug 21 12:38:08.154 [FileAllocator] allocating new datafile /home/ubuntu/data/db/Warning.ns, filling with zeroes...
Mon Aug 21 12:38:08.154 [FileAllocator] creating directory /home/ubuntu/data/db/_tmp
Mon Aug 21 12:38:08.158 [FileAllocator] done allocating datafile /home/ubuntu/data/db/Warning.ns, size: 16MB,  took 0.001 secs
Mon Aug 21 12:38:08.158 [FileAllocator] allocating new datafile /home/ubuntu/data/db/Warning.0, filling with zeroes...
Mon Aug 21 12:38:08.161 [FileAllocator] done allocating datafile /home/ubuntu/data/db/Warning.0, size: 64MB,  took 0.002 secs
Mon Aug 21 12:38:08.161 [FileAllocator] allocating new datafile /home/ubuntu/data/db/Warning.1, filling with zeroes...
Mon Aug 21 12:38:08.163 [FileAllocator] done allocating datafile /home/ubuntu/data/db/Warning.1, size: 128MB,  took 0.001 secs
Mon Aug 21 12:38:08.165 [conn25] build index Warning.Readme { _id: 1 }
Mon Aug 21 12:38:08.166 [conn25] build index done.  scanned 0 total records. 0.001 secs
Mon Aug 21 12:38:08.724 [conn25] end connection 207.226.141.36:44336 (2 connections now open)
Mon Aug 21 12:53:15.501 [FileAllocator] allocating new datafile /home/ubuntu/data/db/morethanwinebo.ns, filling with zeroes...
Mon Aug 21 12:53:15.503 [FileAllocator] done allocating datafile /home/ubuntu/data/db/morethanwinebo.ns, size: 16MB,  took 0.001 secs
Mon Aug 21 12:53:15.503 [FileAllocator] allocating new datafile /home/ubuntu/data/db/morethanwinebo.0, filling with zeroes...
Mon Aug 21 12:53:15.505 [FileAllocator] done allocating datafile /home/ubuntu/data/db/morethanwinebo.0, size: 64MB,  took 0.001 secs
Mon Aug 21 12:53:15.508 [conn3] build index morethanwinebo.sessions { _id: 1 }
Mon Aug 21 12:53:15.508 [conn3] build index done.  scanned 0 total records. 0 secs
Mon Aug 21 12:53:15.508 [FileAllocator] allocating new datafile /home/ubuntu/data/db/morethanwinebo.1, filling with zeroes...
Mon Aug 21 12:53:15.510 [FileAllocator] done allocating datafile /home/ubuntu/data/db/morethanwinebo.1, size: 128MB,  took 0.001 secs
Tue Aug 22 03:05:13.792 [initandlisten] connection accepted from 74.82.47.2:27720 #26 (3 connections now open)
Tue Aug 22 03:05:14.026 [conn26] end connection 74.82.47.2:27720 (2 connections now open)
Tue Aug 22 03:05:27.955 [initandlisten] connection accepted from 74.82.47.2:52792 #27 (3 connections now open)
Tue Aug 22 03:05:28.099 [conn27] end connection 74.82.47.2:52792 (2 connections now open)

当我启动数据库时,我使用此命令

sudo mongod --fork --logpath /var/log/mongod.log --dbpath /home/ubuntu/data/db

是不是因为我使用sudo启动数据库?也许mongo需要一些读/写权限才能做某些事情,他不能出现错误?

我的第一个想法是因为服务器太小所以我把它从8Go增加到16Go但这没什么变化,昨天出现了这个bug

1 个答案:

答案 0 :(得分:1)

请查看8月21日星期一的IP地址207.226.141.36的活动。你有一位不请自来的访客:

https://www.abuseipdb.com/check/207.226.141.36