If you get some error with some service that is start / stopped via systemctl you might be pondering how to debug further why the service is not up then then you'll be in the situation I was today.
While on one configured server with 8 eth0 configured ethernet network interfaces the network service was reporting errors, when atempted to restart the RedHat way via:
service network restart
to further debug what the issue was as it was necessery I had to find a way how to debug systemctl so here is how:
How to do a verbose messages status for sysctlct?
linux:~# systemctl status network
linux:~# systemctl status network
Another useful hint is to print out only log messages for the current boot, you can that with:
# journalctl -u service-name.service -b
if you don't want to have the less command like page separation ( paging ) use the –no-pager argument.
# journalctl -u network –no-pager
Jan 08 17:09:14 lppsq002a network[8515]: Bringing up interface eth5: [ OK ]
Jan 08 17:09:15 lppsq002a network[8515]: Bringing up interface eth6: [ OK ]
Jan 08 17:09:15 lppsq002a network[8515]: Bringing up interface eth7: [ OK ]
Jan 08 17:09:15 lppsq002a systemd[1]: network.service: control process exited, code=exited status=1
Jan 08 17:09:15 lppsq002a systemd[1]: Failed to start LSB: Bring up/down networking.
Jan 08 17:09:15 lppsq002a systemd[1]: Unit network.service entered failed state.
Jan 08 17:09:15 lppsq002a systemd[1]: network.service failed.
Jan 15 11:04:45 lppsq002a systemd[1]: Starting LSB: Bring up/down networking…
Jan 15 11:04:45 lppsq002a network[55905]: Bringing up loopback interface: [ OK ]
Jan 15 11:04:45 lppsq002a network[55905]: Bringing up interface eth0: RTNETLINK answers: File exists
Jan 15 11:04:45 lppsq002a network[55905]: [ OK ]
Jan 15 11:04:45 lppsq002a network[55905]: Bringing up interface eth1: RTNETLINK answers: File exists
Jan 15 11:04:45 lppsq002a network[55905]: [ OK ]
Jan 15 11:04:46 lppsq002a network[55905]: Bringing up interface eth2: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth2 has different MAC address than expected, ignoring.
Jan 15 11:04:46 lppsq002a network[55905]: [FAILED]
Jan 15 11:04:46 lppsq002a network[55905]: Bringing up interface eth3: RTNETLINK answers: File exists
Jan 15 11:04:46 lppsq002a network[55905]: [ OK ]
Jan 15 11:04:46 lppsq002a network[55905]: Bringing up interface eth4: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth4 does not seem to be present, delaying initialization.
Jan 15 11:04:46 lppsq002a network[55905]: [FAILED]
Jan 15 11:04:46 lppsq002a network[55905]: Bringing up interface eth5: RTNETLINK answers: File exists
Jan 15 11:04:46 lppsq002a network[55905]: [ OK ]
Jan 15 11:04:46 lppsq002a network[55905]: Bringing up interface eth6: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: [ OK ]
Jan 15 11:04:47 lppsq002a network[55905]: Bringing up interface eth7: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: [ OK ]
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a network[55905]: RTNETLINK answers: File exists
Jan 15 11:04:47 lppsq002a systemd[1]: network.service: control process exited, code=exited status=1
Jan 15 11:04:47 lppsq002a systemd[1]: Failed to start LSB: Bring up/down networking.
Jan 15 11:04:47 lppsq002a systemd[1]: Unit network.service entered failed state.
Jan 15 11:04:47 lppsq002a systemd[1]: network.service failed.
Jan 15 11:08:22 lppsq002a systemd[1]: Starting LSB: Bring up/down networking…
Jan 15 11:08:22 lppsq002a network[56841]: Bringing up loopback interface: [ OK ]
Jan 15 11:08:22 lppsq002a network[56841]: Bringing up interface eth0: RTNETLINK answers: File exists
Jan 15 11:08:22 lppsq002a network[56841]: [ OK ]
Jan 15 11:08:26 lppsq002a network[56841]: Bringing up interface eth1: RTNETLINK answers: File exists
Jan 15 11:08:26 lppsq002a network[56841]: [ OK ]
Jan 15 11:08:26 lppsq002a network[56841]: Bringing up interface eth2: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth2 has different MAC address than expected, ignoring.
Jan 15 11:08:26 lppsq002a network[56841]: [FAILED]
Jan 15 11:08:26 lppsq002a network[56841]: Bringing up interface eth3: RTNETLINK answers: File exists
Jan 15 11:08:27 lppsq002a network[56841]: [ OK ]
Another useful thing debug arguments is the -xe to do:
# journalctl -xe –no-pager
- -x (– catalog)
Augment log lines with explanation texts from the message catalog.
This will add explanatory help texts to log messages in the output
where this is available. - -e ( –pager-end ) Immediately jump to the end of the journal inside the implied pager
tool.
Finally after fixing the /etc/sysconfig/networking-scripts/* IP configuration issues I had all the 8 Ethernet interfaces to work as expected
# systemctl status network
2. Adding a new IP alias to eth0 interface
Further on I had to add an IP Alias on the CenOS via its networking configuration, this is done by editing /etc/sysconfig/network-scripts/ifcfg* files.
To create an IP alias for first lan interface eth0, I've had to created a new file named ifcfg-eth0:0
linux:~# cd /etc/sysconfig/network-scripts/
linux:~# vim ifcfg-eth0:0
with below content
NAME="eth0:0"
ONBOOT="yes"
BOOTPROTO="none"
IPADDR="10.50.10.5"
NETMASK="255.255.255.0"
Adding this IP address network alias works across all RPM based distributions and should work also on Fedora and Open SuSE as well as Suse Enterprise Linux.
If you however prefer to use a text GUI and do it the CentOS server administration way you can use nmtui (Text User Interface for controlling NetworkManager). tool.
linux:~# nmtui
Remove URL from comments in WordPress Blogs and Websites to mitigate comment spam URLs in pages
Friday, February 20th, 2015If you're running a WordPress blog or Website where you have enabled comments for a page and your article or page is well indexing in Google (receives a lot of visit / reads ) daily, your site posts (comments) section is surely to quickly fill in with a lot of "Thank you" and non-sense Spam comments containing an ugly link to an external SPAM or Phishing website.
Such URL links with non-sense message is a favourite way for SPAMmers to raise their website incoming (other website) "InLinks" and through that increase current Search Engine position.
We all know a lot of comments SPAM is generally handled well by Akismet but unfortunately still many of such spam comments fail to be identified as Spam because spam Bots (text-generator algorithms) becomes more and more sophisticated with time, also you can never stop paid a real-persons Marketers to spam you with a smart crafted messages to increase their site's SEO ).
In all those cases Akismet WP (Anti-Spam) plugin – which btw is among the first "must have" WP extensions to install on a new blog / website will be not enough ..
To fight with worsening SEO because of spam URLs and to keep your site's SEO better (having a lot of links pointing to reported spam sites will reduce your overall SEO Index Rate) many WordPress based bloggers, choose to not use default WordPress Comments capabilities – e.g. use exnternal commenting systems such as Disqus – (Web Community of Communities), IntenseDebate, LiveFyre, Vicomi …
However as Disqus and other 3rd party commenting systems are proprietary software (you don't have access to comments data as comments are kept on proprietary platform and shown from there), I don't personally recommend (or use) those ones, yes Disqus, Google+, Facebook and other comment external sources can have a positive impact on your SEO but that's temporary event and on the long run I think it is more advantageous to have comments with yourself.
A small note for people using Disqos and Facebook as comment platforms – (just imagine if Disqos or Facebook bankrupts in future, where your comments will be? 🙂 )
So assuming that you're a novice blogger and I succeeded convincing you to stick to standard (embedded) WordPress Comment System once your site becomes famous you will start getting severe amount of comment spam. There is plenty of articles already written on how to remove URL comment form spam in WordPress but many of the guides online are old or obsolete so in this article I will do a short evaluation on few things I tried to remove comment spam and how I finally managed to disable URL link spam to appear on site.
1. Hide Comment Author Link (Hide-wp-comment-author-link)
This plugin is the best one I found and I started using it since yesterday, I warmly recommend this plugin because its very easy, Download, Unzip, Activate and there you're anything typed in URL field will no longer appear in Posts (note that the URL field will stay so if you want to keep track on person's input URL you can get still see it in Wp-Admin). I'm using default WordPress WRC (Kubrick), but I guess in most newer wordpress plugins is supposed to work. If you test it on another theme please drop a comment to inform whether works for you. Hide Comment Author Link works on current latest Wordpress 4.1 websites.
A similar plugin to hide-wp-author-link that works and you can use is Hide-n-Disable-comment-url-field, I tested this one but for some reason I couldn't make it work.
Whatever I type in Website field in above form, this is wiped out of comment once submitted 🙂
2. Disable hide Comment URL (disable-hide-comment-url)
I've seen reports disable-hide-comment-url works on WordPress 3.9.1, but it didn't worked for me, also the plugin is old and seems no longer maintaned (its last update was 3.5 years ago), if it works for you please please drop in comment your WP version, on WP 4.1 it is not working.
3. WordPress Anti-Spam plugin
WordPress Anti-Spam plugin is a very useful addition plugin to install next to Akismet. The plugin is great if you don't want to remove commenter URL to show in the post but want to cut a lot of the annoying Spam Robots crawling ur site.
Anti-spam plugin blocks spam in comments automatically, invisibly for users and for admins.
Plugin is easy to use: just install it and it just works.
Anti bot works fine on WP 4.1
4. Stop Spam Comments
Stop Spam Comments is:
Stop Spam Comments works fine on WP 4.1.
I've mentioned few of the plugins which can help you solve the problem, but as there are a lot of anti-spam URL plugins available for WP its up to you to test and see what fits you best. If you know or use some other method to protect yourself from Comment Url Spam to share it please.
Import thing to note is it usually a bad idea to mix up different anti-spam plugins so don't enable both Stop Spam Comments and WordPress Anti Spam plugin.
5. Comment Form Remove Url field Manually
This (Liberian) South) African blog describes a way how to remove URL field URL manually
In short to Remove Url Comment Field manually either edit function.php (if you have Shell SSH access) or if not do it via Wp-Admin web interface:
Paste at the end of file following PHP code:
Now to make changes effect, Restart Apache / Nginx Webserver and clean any cache if you're using a plugin like W3 Total Cache plugin etc.
Other good posts describing some manual and embedded WordPress ways to reduce / stop comment spam is here and here, however as it comes to my blog, none of the described manual (code hack) ways I found worked on WordPress v. 4.1.
Thus I personally stuck to using Hide and Disable Comment URL plugin to get rid of comment website URL.
Tags: article, bloggers, btw, data, interface, lot, page, php, platform, problem, running, Search Engine, SEO, spam, Spam Robots, Stop Spam Comments, theme, URLs, use, website, Wordpress Comments, wordpress plugins, wp
Posted in Curious Facts, Various, Web and CMS, Wordpress | 2 Comments »