Monday, April 25, 2022

Authorization not available. Check if polkit service is running or see debug message for more information

Another comic situation which I've trapped into recently, was the huge delay when I logged into Oracle Linux server via ssh or on the console.

Analyzing boot.msg logfile led to the message from the post's title. The cause was actually wrong actions, applied during repairing operating system from bootable iso image. After some failures before I had had no run and lock directores inside /var, only run.rpmnew and lock.rpmnew. So I renamed them to run and lock respectively, and this was the main cause of the fault. Instead it I had to create symbolic links like these following :

# cd /var

# mv run run.old ; ln -s ../run 

# mv lock lock.old ; ln -s ../run/lock

That's it ! After reboot all services worked fine, there were no delays during logons and previously mentioned messages disappeared from boot.msg logfile :-) Good Luck !

Friday, April 22, 2022

ping: Name or service not known

Recently I encountered a stupid situation on Oracle Linux 8, when I wasn't unable to connect from OL8 server to another server via its dns name. For example

# ping www.google.com
ping: www.google.com: Name or service not known

The cause was very simple : the space before word 'nameserver' in the /etc/resolv.conf file. The contents looked like :

; nameserver 192.168.56.1
 nameserver 192.168.0.1

After correction the mentioned file started to look like :

; nameserver 192.168.56.1
nameserver 192.168.0.1

And all started to work as expected :)

# ping www.google.com                  
PING www.google.com (142.250.184.196) 56(84) bytes of data.
64 bytes from fra24s11-in-f4.1e100.net (142.250.184.196): icmp_seq=1 ttl=63 time=42.4 ms
64 bytes from fra24s11-in-f4.1e100.net (142.250.184.196): icmp_seq=2 ttl=63 time=42.1 ms

Good Luck !

 

Sunday, April 17, 2022

GRUB2 doesn't load OS and drills down into BASH-like prompt

There may be many situations with unworking GRUB2 configuration, where the OS can't be loaded. In my case I made an error, migrating old GRUB into new GRUB2 configuration, and created new config file with conf extension (like in the previous GRUB :-) ), but the right extension should be cfg.

So, when GRUB2 gave me the prompt, I entered the command :

GRUB2> configfile /grub2/grub.conf

Then, when OS booted, I generate new config file using command :

# grub2-mkconfig -o /boot/grub2/grub.cfg

That was enough for successful booting the OS after reboot. Enjoy !

Sunday, April 3, 2022

Traceback (most recent call last): File "/bin/yum-config-manager", line 205, in repo.cfg.options, repo.iteritems, repo.optionobj, AttributeError: 'RhnRepo' object has no attribute 'cfg'

I got this error after upgrading Oracle Linux 6.10 to 7.9. I tried to work with repositories - I was going to disable old of OL6 and enable some new of OL7. Any manipulations with repositories using yum-config-manager command, led to this strange error :

# yum-config-manager --enable '*'

...

Traceback (most recent call last):
 File "/bin/yum-config-manager", line 205, in <module>
   repo.cfg.options, repo.iteritems, repo.optionobj,
AttributeError: 'RhnRepo' object has no attribute 'cfg'

The solution was to disable the plugin rhn (set enabled=0) in the /etc/yum/pluginconf.d/rhnplugin.conf: and repeat failed yum-config-manager command after that. Below is the context of modified rhnplugin.conf file :

$ cat /etc/yum/pluginconf.d/rhnplugin.conf
[main]
enabled = 0
gpgcheck = 1
timeout = 120

# You can specify options per channel, e.g.:
#
#[rhel-i386-server-5]
#enabled = 1
#
#[some-unsigned-custom-channel]
#gpgcheck = 0


Good Luck !