Re: [Spacewalk-list] Agent issue on Debian 8.10

2018-03-15 Thread Andrei Popenta
Hi Sebastien,

I've had the same issue and found out that the problem is with
python-openssl version
apt install python-openssl=16.0.0-1~bpo8+1 , fixed the issue for me.

Andrei

On Tue, Mar 13, 2018 at 5:54 PM, Sébastien Genesta <
genesta.sebast...@gmail.com> wrote:

> Hi,
>
> I'm encountering issue using spacewalk agent on a Debian 8.10.
>
> My spacewalk server version is 2.7 installed on an CentOS 7.
>
> I've created a channel for my Debian servers (no repo defined on it).
>
> I've installed it following spacewalk documentation:
>
>1. apt-get update
>2. apt-get install apt-transport-spacewalk rhnsd
>3. download my CA cert from spacewalk server
>4. rhnreg_ks --serverUrl= --sslCACert=
>--activationkey=
>
> When I launch my rhnreg_ks command, following error is displayed:  'exceptions.TypeError'>
>
> Content of my /var/log/up2date logs:
>
> [Tue Mar 13 16:34:00 2018] up2date Warning: haldaemon or messagebus
> service not running. Cannot probe hardware and DMI information.
>
> [Tue Mar 13 16:34:04 2018] up2date
> Traceback (most recent call last):
>   File "/usr/sbin/rhn_check", line 425, in 
> cli.run()
>   File "/usr/share/rhn/up2date_client/rhncli.py", line 96, in run
> sys.exit(self.main() or 0)
>   File "/usr/sbin/rhn_check", line 86, in main
> self.__run_remote_actions()
>   File "/usr/sbin/rhn_check", line 187, in __run_remote_actions
> action = self.__get_action(status_report)
>   File "/usr/sbin/rhn_check", line 105, in __get_action
> ACTION_VERSION, status_report)
>   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
> return self.__send(self.__name, args)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
> ret = self._request(methodname, params)
>   File "/usr/lib/python2.7/dist-packages/rhn/rpclib.py", line 381, in
> _request
> self._handler, request, verbose=self._verbose)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 167, in
> request
> headers, fd = req.send_http(host, handler)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 698, in
> send_http
> self._connection.connect()
>   File "/usr/lib/python2.7/dist-packages/rhn/connections.py", line 183,
> in connect
> self.sock.init_ssl()
>   File "/usr/lib/python2.7/dist-packages/rhn/SSL.py", line 90, in init_ssl
> self._ctx.load_verify_locations(f)
>   File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 303, in
> load_verify_locations
> raise TypeError("cafile must be None or a byte string")
> : cafile must be None or a byte string
>
> -
>
> error displayed when I try an apt-get update
>
> Apt-Spacewalk: Updating sources.list
> Traceback (most recent call last):
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 84, in 
> update_sources_list()
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 70, in
> update_sources_list
> channels = get_channels()
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 41, in get_channels
> for channel in rhnChannel.getChannelDetails():
>   File "/usr/share/rhn/up2date_client/rhnChannel.py", line 71, in
> getChannelDetails
> sourceChannels = getChannels()
>   File "/usr/share/rhn/up2date_client/rhnChannel.py", line 98, in
> getChannels
> up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
>   File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
> return rpcServer.doCall(method, *args, **kwargs)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 203, in doCall
> ret = method(*args, **kwargs)
>   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
> return self.__send(self.__name, args)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
> ret = self._request(methodname, params)
>   File "/usr/lib/python2.7/dist-packages/rhn/rpclib.py", line 381, in
> _request
> self._handler, request, verbose=self._verbose)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 167, in
> request
> headers, fd = req.send_http(host, handler)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 698, in
> send_http
> self._connection.connect()
>   File "/usr/lib/python2.7/dist-packages/rhn/connections.py", line 183,
> in connect
> self.sock.init_ssl()
>   File "/usr/lib/python2.7/dist-packages/rhn/SSL.py", line 90, in init_ssl
> self._ctx.load_verify_locations(f)
>   File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 303, in
> load_verify_locations
> raise TypeError("cafile must be None or a byte string")
> TypeError: cafile must be None or a byte string
> E: Problem executing scripts APT::Update::Pre-Invoke
> '/usr/lib/apt-spacewalk/pre_invoke.py'
> E: Sub-process returned an error code
>
> Thanks for your help.
>
> Seb.
>
> ___
> Spacewalk-list mailing list
> Spacewalk-list@redhat.com
> https://www.redhat.com/mailman/li

Re: [Spacewalk-list] Agent issue on Debian 8.10

2018-03-15 Thread Sébastien Genesta
Hi,

Thanks for your reply. It has been really helpful.

Below the process I've followed if it could help anybody else:

   - apt-get update


   - apt-get install apt-transport-spacewalk rhnsd


   - add following lines in my sources.list

deb http://ftp.debian.org/debian jessie-backports main

deb-src http://ftp.debian.org/debian jessie-backports main


   - apt-get update

   - apt-get install -t jessie-backports python-openssl

   - download my CA cert from spacewalk server


   - rhnreg_ks --serverUrl= --sslCACert=
   --activationkey=

Thanks again Ben!

Seb.

2018-03-13 17:11 GMT+01:00 Ben Myatt :

> Hi,
>
> This was a known bug.
> https://github.com/pimutils/vdirsyncer/issues/258
>
> What version of python-openssl are you using? I’m presuming version 0.14-1
>
> Fix is to uninstall your current version of python-openssl and install it
> from the Jessie backports repo because you get a newer version.
> Add to /etc/apt/sources.list:
> deb http://ftp.debian.org/debian jessie-backports main
>
> apt-cache showpkg python-openssl
> Package: python-openssl
> Versions:
> 16.0.0-1~bpo8+1 (/var/lib/apt/lists/ftp.debian.org_debian_dists_jessie-
> backports_main_binary-amd64_Packages) (/var/lib/dpkg/status)
>
>
> Kind Regards
> Ben
>
>
> On 13 Mar 2018, at 15:54, Sébastien Genesta 
> wrote:
>
> Hi,
>
> I'm encountering issue using spacewalk agent on a Debian 8.10.
>
> My spacewalk server version is 2.7 installed on an CentOS 7.
>
> I've created a channel for my Debian servers (no repo defined on it).
>
> I've installed it following spacewalk documentation:
>
>1. apt-get update
>2. apt-get install apt-transport-spacewalk rhnsd
>3. download my CA cert from spacewalk server
>4. rhnreg_ks --serverUrl= --sslCACert=
>--activationkey=
>
> When I launch my rhnreg_ks command, following error is displayed:  'exceptions.TypeError'>
>
> Content of my /var/log/up2date logs:
>
> [Tue Mar 13 16:34:00 2018] up2date Warning: haldaemon or messagebus
> service not running. Cannot probe hardware and DMI information.
>
> [Tue Mar 13 16:34:04 2018] up2date
> Traceback (most recent call last):
>   File "/usr/sbin/rhn_check", line 425, in 
> cli.run()
>   File "/usr/share/rhn/up2date_client/rhncli.py", line 96, in run
> sys.exit(self.main() or 0)
>   File "/usr/sbin/rhn_check", line 86, in main
> self.__run_remote_actions()
>   File "/usr/sbin/rhn_check", line 187, in __run_remote_actions
> action = self.__get_action(status_report)
>   File "/usr/sbin/rhn_check", line 105, in __get_action
> ACTION_VERSION, status_report)
>   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
> return self.__send(self.__name, args)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
> ret = self._request(methodname, params)
>   File "/usr/lib/python2.7/dist-packages/rhn/rpclib.py", line 381, in
> _request
> self._handler, request, verbose=self._verbose)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 167, in
> request
> headers, fd = req.send_http(host, handler)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 698, in
> send_http
> self._connection.connect()
>   File "/usr/lib/python2.7/dist-packages/rhn/connections.py", line 183,
> in connect
> self.sock.init_ssl()
>   File "/usr/lib/python2.7/dist-packages/rhn/SSL.py", line 90, in init_ssl
> self._ctx.load_verify_locations(f)
>   File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 303, in
> load_verify_locations
> raise TypeError("cafile must be None or a byte string")
> : cafile must be None or a byte string
>
> -
>
> error displayed when I try an apt-get update
>
> Apt-Spacewalk: Updating sources.list
> Traceback (most recent call last):
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 84, in 
> update_sources_list()
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 70, in
> update_sources_list
> channels = get_channels()
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 41, in get_channels
> for channel in rhnChannel.getChannelDetails():
>   File "/usr/share/rhn/up2date_client/rhnChannel.py", line 71, in
> getChannelDetails
> sourceChannels = getChannels()
>   File "/usr/share/rhn/up2date_client/rhnChannel.py", line 98, in
> getChannels
> up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
>   File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
> return rpcServer.doCall(method, *args, **kwargs)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 203, in doCall
> ret = method(*args, **kwargs)
>   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
> return self.__send(self.__name, args)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
> ret = self._request(methodname, params)
>   File "/usr/lib/python2.7/dist-packages/rhn/rpclib.py", line 381, in
> _request
> self._handler, request

Re: [Spacewalk-list] Agent issue on Debian 8.10

2018-03-13 Thread Ben Myatt
Hi,

This was a known bug.
https://github.com/pimutils/vdirsyncer/issues/258 
 

What version of python-openssl are you using? I’m presuming version 0.14-1

Fix is to uninstall your current version of python-openssl and install it from 
the Jessie backports repo because you get a newer version. 
Add to /etc/apt/sources.list:
deb http://ftp.debian.org/debian jessie-backports main

apt-cache showpkg python-openssl
Package: python-openssl
Versions: 
16.0.0-1~bpo8+1 
(/var/lib/apt/lists/ftp.debian.org_debian_dists_jessie-backports_main_binary-amd64_Packages)
 (/var/lib/dpkg/status)


Kind Regards
Ben


> On 13 Mar 2018, at 15:54, Sébastien Genesta  
> wrote:
> 
> Hi,
> 
> I'm encountering issue using spacewalk agent on a Debian 8.10.
> 
> My spacewalk server version is 2.7 installed on an CentOS 7.
> 
> I've created a channel for my Debian servers (no repo defined on it).
> 
> I've installed it following spacewalk documentation:
> apt-get update
> apt-get install apt-transport-spacewalk rhnsd
> download my CA cert from spacewalk server
> rhnreg_ks --serverUrl= --sslCACert= 
> --activationkey=
> When I launch my rhnreg_ks command, following error is displayed:  'exceptions.TypeError'>
> 
> Content of my /var/log/up2date logs:
> 
> [Tue Mar 13 16:34:00 2018] up2date Warning: haldaemon or messagebus service 
> not running. Cannot probe hardware and DMI information.
> 
> [Tue Mar 13 16:34:04 2018] up2date
> Traceback (most recent call last):
>   File "/usr/sbin/rhn_check", line 425, in 
> cli.run()
>   File "/usr/share/rhn/up2date_client/rhncli.py", line 96, in run
> sys.exit(self.main() or 0)
>   File "/usr/sbin/rhn_check", line 86, in main
> self.__run_remote_actions()
>   File "/usr/sbin/rhn_check", line 187, in __run_remote_actions
> action = self.__get_action(status_report)
>   File "/usr/sbin/rhn_check", line 105, in __get_action
> ACTION_VERSION, status_report)
>   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
> return self.__send(self.__name, args)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
> ret = self._request(methodname, params)
>   File "/usr/lib/python2.7/dist-packages/rhn/rpclib.py", line 381, in _request
> self._handler, request, verbose=self._verbose)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 167, in 
> request
> headers, fd = req.send_http(host, handler)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 698, in 
> send_http
> self._connection.connect()
>   File "/usr/lib/python2.7/dist-packages/rhn/connections.py", line 183, in 
> connect
> self.sock.init_ssl()
>   File "/usr/lib/python2.7/dist-packages/rhn/SSL.py", line 90, in init_ssl
> self._ctx.load_verify_locations(f)
>   File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 303, in 
> load_verify_locations
> raise TypeError("cafile must be None or a byte string")
> : cafile must be None or a byte string
> 
> -
> 
> error displayed when I try an apt-get update
> 
> Apt-Spacewalk: Updating sources.list
> Traceback (most recent call last):
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 84, in 
> update_sources_list()
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 70, in update_sources_list
> channels = get_channels()
>   File "/usr/lib/apt-spacewalk/pre_invoke.py", line 41, in get_channels
> for channel in rhnChannel.getChannelDetails():
>   File "/usr/share/rhn/up2date_client/rhnChannel.py", line 71, in 
> getChannelDetails
> sourceChannels = getChannels()
>   File "/usr/share/rhn/up2date_client/rhnChannel.py", line 98, in getChannels
> up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
>   File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
> return rpcServer.doCall(method, *args, **kwargs)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 203, in doCall
> ret = method(*args, **kwargs)
>   File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
> return self.__send(self.__name, args)
>   File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
> ret = self._request(methodname, params)
>   File "/usr/lib/python2.7/dist-packages/rhn/rpclib.py", line 381, in _request
> self._handler, request, verbose=self._verbose)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 167, in 
> request
> headers, fd = req.send_http(host, handler)
>   File "/usr/lib/python2.7/dist-packages/rhn/transports.py", line 698, in 
> send_http
> self._connection.connect()
>   File "/usr/lib/python2.7/dist-packages/rhn/connections.py", line 183, in 
> connect
> self.sock.init_ssl()
>   File "/usr/lib/python2.7/dist-packages/rhn/SSL.py", line 90, in init_ssl
> self._ctx.load_verify_locations(f)
>   File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 303, in 
> load_verify_location