{"id":6469,"date":"2017-02-11T07:36:05","date_gmt":"2017-02-10T23:36:05","guid":{"rendered":"http:\/\/rmohan.com\/?p=6469"},"modified":"2017-02-11T07:36:05","modified_gmt":"2017-02-10T23:36:05","slug":"aws-centos7-error-countermeasure","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6469","title":{"rendered":"AWS CentOS7 error countermeasure"},"content":{"rendered":"<p><span id=\"result_box\" class=\"\" lang=\"en\"><span title=\"????????????????????????????????????\n\">If you type a command to check for errors, an error came out.<br \/>\n<\/span><span title=\"???????????????????????????????????\n\">When I typed a command to confirm the error, an error came out.<\/span><\/span><\/p>\n<p><code class=\"plain plain\">egrep -i \"warning|error\" \/var\/log\/messages<\/code><\/p>\n<p>[root@ip-172-31-30-74 log]# egrep -i &#8220;warning|error&#8221; \/var\/log\/messages<br \/>\nFeb 10 23:15:03 localhost rsyslogd-2307: warning: ~ action is deprecated, consider using the &#8216;stop&#8217; statement instead [try http:\/\/www.rsyslog.com\/e\/2307 ]<br \/>\n<strong>Feb 10 23:15:01 localhost kernel: Error: Driver &#8216;pcspkr&#8217; is already registered, aborting&#8230;<\/strong><br \/>\n[root@ip-172-31-30-74 log]#cd \/etc\/rsyslog.d\/<\/p>\n<p>[root@ip-172-31-30-74 rsyslog.d]# vi 21-cloudinit.conf<\/p>\n<p># Log cloudinit generated log messages to file<br \/>\n:programname, isequal, &#8220;cloud-init&#8221; \/var\/log\/cloud-init.log<\/p>\n<p># comment out the following line to allow CLOUDINIT messages through.<br \/>\n# Doing so means you&#8217;ll also get CLOUDINIT messages in \/var\/log\/syslog<br \/>\n&amp; ~<\/p>\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"plain plain\"># comment out the following line to allow CLOUDINIT messages through.<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"plain plain\"># Doing so means you'll also get CLOUDINIT messages in \/var\/log\/syslog<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"plain plain\">&amp; stop<\/code><\/div>\n<\/div>\n<div class=\"line number3 index2 alt2\"><\/div>\n<div class=\"line number3 index2 alt2\">cd \/etc\/modprobe.d<\/div>\n<div class=\"line number3 index2 alt2\">vi avoiderrot.list<\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"plain plain\">blacklist pcspkr<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><\/div>\n<div class=\"line number3 index2 alt2\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you type a command to check for errors, an error came out. When I typed a command to confirm the error, an error came out.<\/p>\n<p>egrep -i &#8220;warning|error&#8221; \/var\/log\/messages<\/p>\n<p>[root@ip-172-31-30-74 log]# egrep -i &#8220;warning|error&#8221; \/var\/log\/messages Feb 10 23:15:03 localhost rsyslogd-2307: warning: ~ action is deprecated, consider using the &#8216;stop&#8217; statement instead [try http:\/\/www.rsyslog.com\/e\/2307 ] [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6469"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6469"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6469\/revisions"}],"predecessor-version":[{"id":6470,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6469\/revisions\/6470"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}