Today, I did an update using zypper up. I restarted the computer as the update said there were some running programs and it’s quicker to just reboot than find and restart them. I wanted to look at my network settings and, using yast (yast2? the graphical version under KDE), I got an error:
Network Configuration is corrupted. If you continue, resulting configuration can be malformed. Ageas parsing error: iterated lens matched less than it should at /etc/hosts:23:1, lens/usr/share/ageas/lenses/dist/hosts.aug:13.2-52:
I have absolutely no idea what this means except that it’s not good! What is ageas? What does it mean by lens? It refers to /etc/hosts but what is the meaning of :21:1? Does it mean my hosts file? And finally, and most important, what do I do to correct this?
As a follow up:
Line 23 in my hosts file was a blank line, followed by the obligatory 127.0.0.1 localhost. I placed a # at the beginning of that line. Didn’t help.
The netcfg package provides a default /etc/hosts file, and if you’ve modified /etc/hosts, then after an update of this package you may also have /etc/hosts.rpmnew present. You could use it to restore a working default /etc/hosts configuration if desired.
I have not seen that error message, and I don’t have any specific help on it.
It looks as if there is a package “augeas” installed as part of Leap 15.0. I’m still not sure what it does. But supposedly it has to do with managing configuration files and maybe keeping backups of such files. The word “lens” appears in the documentation for this package. There are a few related commands. One of them is “augtool” and it has a man page.
This is what has happened. (This is going to open up a whole can of worms ) I use a hosts file by MVPS HOSTS for the purpose of keeping unwanted connections from happening. I looked and sure enough, there is a hosts.rpmnew file in /etc. When I overwrite my hosts file with it, the error goes away. So, I copied all the lines that were different in the rpmnew file to my hosts file )I of course made copies first) and the error reoccurs. I looked at /usr/share/augeas/lenses/dist/hosts.aug and can’t make heads nor tails of it! I’m afraid this new augeas system is going to have to be used to make any changes to configuration files. Didn’t the authors learn anything by watching Microsoft when they implemented the famous registry in Windows?
Bottom line: I can eliminate the error by using the original or factory supplied hosts file. If I use the MVPS HOSTS file, I get the error. This leaves me with the question: Do I need the MVPS file? Is it really doing what I expect? (I am quite open to a discussion of this but perhaps it should be on the general chat forum.)
Then, if I don’t use the MVPS file, there still remains the question of how to modify configuration files such as /etc/hosts. (I really hate the registry concept!)
Did you check for a formatting error as I hinted at in post #2? In the event illustrated, somehow the parsed file was missing a line break after the last entry. Adding one fixed it apparently.
So, I copied all the lines that were different in the rpmnew file to my hosts file )I of course made copies first) and the error reoccurs.
Again, check if the original file is missing a line feed at the end, or any other problematic formatting perhaps.
I looked at /usr/share/augeas/lenses/dist/hosts.aug and can’t make heads nor tails of it! I’m afraid this new augeas system is going to have to be used to make any changes to configuration files. Didn’t the authors learn anything by watching Microsoft when they implemented the famous registry in Windows?
I don’ think there was any intention for you to look at Augeas. I haven’t seen others reporting such a problem. It seems to be directly related to your config file formatting.
Bottom line: I can eliminate the error by using the original or factory supplied hosts file. If I use the MVPS HOSTS file, I get the error. This leaves me with the question: Do I need the MVPS file?
Only you can make that decision. You added it in the first place.
Is it really doing what I expect? (I am quite open to a discussion of this but perhaps it should be on the general chat forum.)
You can start another thread for that I guess. I no little about it - in fact I had to google it to even know what you’ve installed here.
Then, if I don’t use the MVPS file, there still remains the question of how to modify configuration files such as /etc/hosts. (I really hate the registry concept!)
Bart
It’s just a single file. Edit it with a CLI editor as you would any other.
Somehow, I fixed my problem. I deleted /etc/hosts. As root, I created an new hosts file. I opened hosts.rpmnew using kate, and copied all the text in it and then pasted it to the new hosts file. Rebooted and checked network configuration using yast and all was well. I then copied all the text in the MVPS file, except for the beginning that would have duplicated what was there, and pasted it into the hosts file. Rebooted and all is well.
I can only assume there was some sort of corruption or unexpected characters in the original. I had no trouble until the upgrade to 15.0 and it didn’t seem that the file had been changed. So, I give up. At this point, It’s not broken, therefore so I’m not going to try and fix it!
Yes, as I already suggested was the case - hence the parsing error.
I had no trouble until the upgrade to 15.0 and it didn’t seem that the file had been changed. So, I give up. At this point, It’s not broken, therefore so I’m not going to try and fix it!