Nethserver upgrade issues with the yum

mail2
yum
v7
mail

(Ivan) #13

Email service is installed but there no mark that it’s in the system.


(Marc) #14

Does yum works properly now?
Can you share the list of installed modules?

rpm -qa nethserver-*

(Ivan) #15

No, still not working.

output from command: rpm -qa nethserver-*

[root@server ~]# rpm -qa nethserver-*
nethserver-memcached-1.1.0-1.ns7.noarch
nethserver-openssh-1.2.2-1.ns7.noarch
nethserver-directory-3.3.0-1.ns7.noarch
nethserver-collectd-3.0.6-1.ns7.noarch
nethserver-lsm-1.2.3-1.ns7.noarch
nethserver-mail-common-1.6.7-1.ns7.noarch
nethserver-diagtools-1.0.2-1.ns7.noarch
nethserver-sssd-1.4.0-1.ns7.noarch
nethserver-sogo-1.7.3-1.ns7.noarch
nethserver-nethforge-release-7-2.ns7.noarch
nethserver-rh-php71-php-fpm-1.0.0-1.ns7.noarch
nethserver-letsencrypt-1.1.6-1.ns7.noarch
nethserver-backup-config-2.1.0-1.ns7.noarch
nethserver-roundcubemail-1.2.9-1.ns7.noarch
nethserver-mail-server-1.12.3-1.ns7.noarch
nethserver-base-3.4.0-1.ns7.noarch
nethserver-backup-data-1.3.4-1.ns7.noarch
nethserver-unbound-1.1.0-1.ns7.noarch
nethserver-vsftpd-1.1.0-1.ns7.noarch
nethserver-rh-php56-php-fpm-1.0.0-1.ns7.noarch
nethserver-mysql-1.1.3-1.ns7.noarch
nethserver-httpd-admin-2.3.2-1.ns7.noarch
nethserver-ejabberd-1.1.5-1.ns7.noarch
nethserver-firewall-base-ui-3.4.1-1.ns7.noarch
nethserver-smartd-1.1.0-1.ns7.noarch
nethserver-postgresql-1.1.0-1.ns7.noarch
nethserver-mail-smarthost-1.0.1-1.ns7.noarch
nethserver-httpd-3.2.5-1.ns7.noarch
nethserver-restore-data-1.2.4-1.ns7.noarch
nethserver-lib-2.2.7-1.ns7.noarch
nethserver-hosts-1.2.2-1.ns7.noarch
nethserver-spamd-1.0.1-1.ns7.noarch
nethserver-cgp-2.1.3-1.ns7.noarch
nethserver-lang-en-1.2.12-1.ns7.noarch
nethserver-mail-filter-1.4.4-1.ns7.noarch
nethserver-firewall-base-3.4.1-1.ns7.noarch
nethserver-ntp-1.1.3-1.ns7.noarch
nethserver-mail-disclaimer-1.6.7-1.ns7.noarch
nethserver-nextcloud-1.2.2-1.ns7.noarch
nethserver-getmail-1.0.3-1.ns7.noarch
nethserver-dnsmasq-1.6.6-1.ns7.noarch
nethserver-yum-1.4.1-1.ns7.noarch
nethserver-php-1.2.0-1.ns7.noarch
nethserver-antivirus-1.2.1-1.ns7.noarch
nethserver-phonehome-1.3.0-1.ns7.noarch
nethserver-duc-1.4.3-1.ns7.noarch
nethserver-lang-ru-1.2.12-1.ns7.noarch
nethserver-release-7-8.ns7.noarch
[root@server ~]#


(Marc) #16

To upgrade to mail2 would be as specified in the manual for the pop3connector upgrade procedure:

yum swap -- remove nethserver-mail-{common,disclaimer,filter,server} nethserver-getmail nethserver-spamd -- install nethserver-mail2-{common,disclaimer,filter,server,getmail}

But first we should find a way to make yum work again, and I’m not sure how.
Is there enough free space on the partitions for temp/cache files?

df -h

Probably it’s OK, but If you don’t mind sharing yum.conf file content:

cat /etc/yum.conf

Some other checks (share results):

rpm -qa python rpm* yum*    # get packages version
rpm -qaV python rpm* yum*   # verify file properties against rpm database
yum --noplugins check-update    # try yum without plugins (probably will make no difference, but just in case)
yum --setopt usercache=1 check-update    # try with the reported usercache attribute

Another idea is to check yum history for some mistype or copy/paste error that could have lead to this situation. See if you spot something:

yum history info <transaction ID number or * wildcard>

(Ivan) #17

cat /etc/yum.conf

[root@server ~]# cat /etc/yum.conf
#================= DO NOT MODIFY THIS FILE =================
#
#Manual changes will be lost when this file is regenerated.
#
#Please read the developer's guide, which is available
#at NethServer official site: https://www.nethserver.org
#
#
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=https://github.com/NethServer/dev
distroverpkg=centos-release
#
#20proxy - disabled
#

#
#30groups use compat group mode
#
group_command=compat

#This is the default, if you make this bigger yum won't see if the metadata
#is newer on the remote and so you'll "gain" the bandwidth of not having to
#download the new metadata and "pay" for it by yum not having correct
#information.
#It is esp. important, to have correct metadata, for distributions like
#Fedora which don't keep old packages around. If you don't like this checking
#interupting your command line usage, it's much better to have something
#manually check the metadata once an hour (yum-updatesd will do this).
#metadata_expire=90m

#PUT YOUR REPOS HERE OR IN separate files named file.repo
#in /etc/yum.repos.d


http_caching=none

rpm -qa python rpm* yum* # get packages version

[root@server ~]# rpm -qa python rpm* yum*
yum-plugin-fastestmirror-1.1.31-45.el7.noarch
yum-3.4.3-158.el7.centos.noarch
rpm-python-4.11.3-32.el7.x86_64
rpm-4.11.3-32.el7.x86_64
yum-metadata-parser-1.1.4-10.el7.x86_64
rpm-libs-4.11.3-32.el7.x86_64
yum-plugin-changelog-1.1.31-45.el7.noarch
rpm-build-libs-4.11.3-32.el7.x86_64
yum-cron-3.4.3-158.el7.centos.noarch
python-2.7.5-68.el7.x86_64

rpm -qaV python rpm* yum* # verify file properties against rpm database

[root@server ~]# rpm -qaV python rpm* yum*
S.5....T.  c /etc/yum.conf
S.5....T.  c /etc/yum/yum-cron.conf

yum --noplugins check-update # try yum without plugins (probably will make no difference, but just in case)

[root@server ~]# yum --noplugins check-update
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 170, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 295, in getOptionsConfig
    (opts, self.cmds) = self.optparser.setupYumConfig(args=args)
  File "/usr/share/yum-cli/cli.py", line 2311, in setupYumConfig
    if not self.base.conf.usercache and os.geteuid() != 0:
AttributeError: 'YumConf' object has no attribute 'usercache'

yum --setopt usercache=1 check-update # try with the reported usercache attribute

[root@server ~]# yum --setopt usercache=1 check-update
Loaded plugins: changelog, fastestmirror, nethserver_events
Main config did not have a usercache attr. before setopt
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 170, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 354, in getOptionsConfig
    self.parseCommands() # before we return check over the base command + args
  File "/usr/share/yum-cli/cli.py", line 396, in parseCommands
    self._set_repos_cache_req()
  File "/usr/share/yum-cli/cli.py", line 445, in _set_repos_cache_req
    if repo._matchExpireFilter():
AttributeError: 'YumRepository' object has no attribute '_matchExpireFilter'

yum history info <transaction ID number or * wildcard>

[root@server ~]# yum history info <transaction ID number or * wildcard>
-bash: syntax error near unexpected token `newline'

(Marc) #18

Only difference in /etc/yum.conf is:

Not present by default. I guess you added it to try to solve the problem.


Sorry for the confusion, the command would be using the transaction IDs you can get with yum history command, or all transactions with the wildcard:

yum history info *

This would just help if you spot some malformed command.

Python and packages versions are ok (I was suspecting a problem with the python version or some other required library).

Do you have custom repos?

yum repolist

Also note:


(Ivan) #19

**yum history info ***

[root@server ~]# yum history info *
Loaded plugins: changelog, fastestmirror, nethserver_events
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 375, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 170, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 295, in getOptionsConfig
(opts, self.cmds) = self.optparser.setupYumConfig(args=args)
File “/usr/share/yum-cli/cli.py”, line 2311, in setupYumConfig
if not self.base.conf.usercache and os.geteuid() != 0:
AttributeError: ‘YumConf’ object has no attribute ‘usercache’
[root@server ~]#

yum repolist

[root@server ~]# yum history info *
Loaded plugins: changelog, fastestmirror, nethserver_events
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 375, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 170, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 295, in getOptionsConfig
(opts, self.cmds) = self.optparser.setupYumConfig(args=args)
File “/usr/share/yum-cli/cli.py”, line 2311, in setupYumConfig
if not self.base.conf.usercache and os.geteuid() != 0:
AttributeError: ‘YumConf’ object has no attribute ‘usercache’
[root@server ~]#

There is no problem with repository


(Marc) #20

If yum reinstall yum didn’t succeed, as all yum commands are failing, you can try to install it with rpm command:

rpm -Uvh --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -Uvh --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm

Head scratching issue… disk health (file corruption)?, upstream bug? (have the same version but didn’t run into this issue)


(Ivan) #21

[root@server ~]# yum reinstall yum
Loaded plugins: changelog, fastestmirror, nethserver_events
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 375, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 170, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 295, in getOptionsConfig
(opts, self.cmds) = self.optparser.setupYumConfig(args=args)
File “/usr/share/yum-cli/cli.py”, line 2311, in setupYumConfig
if not self.base.conf.usercache and os.geteuid() != 0:
AttributeError: ‘YumConf’ object has no attribute ‘usercache’
[root@server ~]#

pm -Uvh --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -Uvh --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
doesn’t change anything

[root@server ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda 508G 437G 66G 87% /
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /dev/shm
tmpfs 15G 1.3G 14G 9% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
tmpfs 3.0G 0 3.0G 0% /run/user/0
[root@server ~]#

there is enough free space.


(Davide Principi) #22

Did you try to set in yum.conf?

 usercache=0

Or

 usercache=1

(Ivan) #23

I did it with “yum --setopt usercache=1 check-update” Nethserver upgrade issues with the yum before , and set it with your advice, doesn’t change anything.


(Marc) #24

Sorry to bother you again with more command requests, just trying to figure it out but this is a hard nut to crack.

List mostly python related packages:

rpm -qa *py*

Verify most of python related packages (if just returns something about cleanup.sh it’s ok):

rpm -qaV *py*

Did you find anything relevant in the logs?


(Ivan) #25

rpm -qa py

[root@server ~]# rpm -qa py
python2-gflags-2.0-5.el7.noarch
python-lockfile-0.9.1-4.el7.centos.noarch
python-ipaddress-1.0.16-2.el7.noarch
python2-certbot-0.25.1-1.el7.noarch
snappy-1.1.0-3.el7.x86_64
python-zope-event-4.0.3-2.el7.noarch
pyparsing-1.5.6-9.el7.noarch
python-enum34-1.0.4-1.el7.noarch
python2-requests-2.6.0-0.el7.noarch
python2-pyasn1-modules-0.1.9-7.el7.noarch
python2-google-api-client-1.6.3-1.el7.noarch
pytalloc-2.1.10-1.el7.x86_64
python-dateutil-1.5-7.el7.noarch
python2-rsa-3.4.1-1.el7.noarch
rpm-python-4.11.3-32.el7.x86_64
python2-cryptography-1.7.2-2.el7.x86_64
python-chardet-2.2.1-1.el7_1.noarch
newt-python-0.52.15-4.el7.x86_64
python2-pyasn1-0.1.9-7.el7.noarch
python-sssdconfig-1.16.0-19.el7.noarch
python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
pyxattr-0.5.1-5.el7.x86_64
python2-mock-1.0.1-9.el7.noarch
python-httplib2-0.9.2-1.el7.noarch
python-fasteners-0.9.0-2.el7.noarch
python2-future-0.16.0-6.el7.noarch
python-idna-2.4-1.el7.noarch
libsemanage-python-2.5-11.el7.x86_64
python2-configargparse-0.11.0-1.el7.noarch
python-slip-0.4.0-4.el7.noarch
python-urlgrabber-3.10-8.el7.noarch
python-firewall-0.4.4.4-14.el7.noarch
python-zope-interface-4.0.5-4.el7.x86_64
python-ndg_httpsclient-0.3.2-1.el7.noarch
python-requests-2.6.0-1.el7_1.noarch
libselinux-python-2.5-12.el7.x86_64
python-urllib3-1.10.2-5.el7.noarch
python2-simplejson-3.10.0-1.el7.x86_64
python2-boto-2.45.0-3.el7.noarch
python2-PyDrive-1.3.1-3.el7.noarch
python-backports-1.0-8.el7.x86_64
pygpgme-0.3-9.el7.x86_64
python-IPy-0.75-6.el7.noarch
audit-libs-python-2.8.1-3.el7.x86_64
python-zope-component-4.1.0-3.el7.noarch
python-requests-toolbelt-0.8.0-1.el7.noarch
python-configobj-4.7.2-7.el7.noarch
pytz-2016.10-2.el7.noarch
python-gobject-base-3.22.0-1.el7_4.1.x86_64
python2-acme-0.25.1-1.el7.noarch
python-perf-3.10.0-862.3.3.el7.x86_64
python-linux-procfs-0.4.9-3.el7.noarch
python-pycparser-2.14-1.el7.noarch
python2-paramiko-1.16.1-2.el7.noarch
python-six-1.9.0-2.el7.noarch
python2-parsedatetime-2.4-5.el7.noarch
python2-pyrfc3339-1.0-2.el7.noarch
pyOpenSSL-0.13.1-3.el7.x86_64
python2-psutil-2.2.1-3.el7.x86_64
python2-uritemplate-3.0.0-1.el7.noarch
python-cffi-1.6.0-5.el7.x86_64
dbus-python-1.1.1-9.el7.x86_64
python2-ecdsa-0.13-4.el7.noarch
python-setuptools-0.9.8-7.el7.noarch
python2-josepy-1.1.0-1.el7.noarch
python-tdb-1.3.15-1.el7.x86_64
python-ply-3.4-11.el7.noarch
python2-crypto-2.6.1-15.el7.x86_64
python2-keyring-5.0-3.el7.noarch
python-iniparse-0.4-9.el7.noarch
python2-six-1.9.0-0.el7.noarch
python-libs-2.7.5-68.el7.x86_64
python-decorator-3.4.0-3.el7.noarch
policycoreutils-python-2.5-22.el7.x86_64
python-pyudev-0.15-9.el7.noarch
python-GnuPGInterface-0.3.2-11.el7.noarch
python-pycurl-7.19.0-19.el7.x86_64
python-schedutils-0.4-6.el7.x86_64
python2-dialog-3.3.0-6.el7.noarch
python-slip-dbus-0.4.0-4.el7.noarch
pyliblzma-0.5.3-11.el7.x86_64
python2-oauth2client-4.0.0-2.el7.noarch
python-2.7.5-68.el7.x86_64
[root@server ~]#

rpm -qaV py

[root@server ~]# rpm -qaV py
.M… d /usr/share/doc/python-ply-3.4/example/cleanup.sh

Thanks for giving advices, because i want to resolve the issues. Otherwise i will probably move Nexcloud to the newly installed nethserver with all users , and then reinstall email server.


(Ivan) #26

New suggestions would be great


(Marc) #27

Looking into it.
Do you happen to use SDL / PUIAS repo?


(Ivan) #28

No, just in case unstalled(2017) it first in Linode , then moved it to local virtuall environment in Moscow. It’s worked fine, no extra manipulations.


(Marc) #29

Nothing wrong with the python packages.


(Markus Neuberger) #30

Found an actual similar issue:

https://access.redhat.com/solutions/3469361


(Ivan) #31

there is no /usr/lib/python2.7/site-packages/rhn/SSL.py file in the system .


(Markus Neuberger) #32

You’re right, it’s just a similar issue and they solved it by adapting the code, in your case it’s

Maybe you found a bug. I just wanted to point out that there seem to be no easy solutions in these cases.