2016-03-31

python : disabling SSL verification on pyvmomi on python


  • self signed certificate ? 
  • RHEL6 ? python 2.6 and 2.7.10 mixed environment ?
  • pyvmomi 5.5+ ?

Looking for a quick fix ?
...
File "/usr/lib/python2.6/site-packages/requests/adapters.py", line 447, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

[root@fb7a3cd8c69d ~]# vim my_script.pyt
...
    context = None
    try:
        # Disabling SSL certificate verification       
        context = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
        context.verify_mode = ssl.CERT_NONE
    except AttributeError:
        rget = requests.get
        requests.get = lambda obj, *args,**kwargs: rget(obj,verify=False)
        requests.packages.urllib3.disable_warnings()

    si = SmartConnect(host=args.host,
            user=user,
            pwd=args.password,
            port=int(args.port), sslContext=context)


And you are good to go. This will resolve the issue, and allow you to focus on your life

PS: You would still need to fix this to use basic auth.

2016-03-28

BSNL redirecting to “http://domain-error.com”

To work around this ISP spam, I have forced NM to use google dns .

cat  /etc/NetworkManager/system-connections/Auto\ Ethernet 
...
[ipv4]
dns=8.8.8.8;8.8.4.4;
dns-search=
method=auto
ignore-auto-dns=true
...


Alternatively, install and use nmtui


refence: 
https://developers.google.com/speed/public-dns/ 
https://askubuntu.com/questions/708762/redirecting-to-http-domain-error-com 
https://www.hogarthuk.com/?q=node/8 

2016-03-23

Using zabbix 3.0 on EL6

zabbix 3.0 requires php5.4 or above, and consequently is not available on EL6. To workaround this, you would need to install php562 from webtatic.

I prefer to use mariadb , with php56u on my zabbix server.  The prebuilt packages can be downloaded from copr:ritz/zabbix30

 This is a rebuild against mariadb 10.1.x, with php56-5.6.19 for zabbix-3.0.1 .

Instructions for manual install - https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages

sql scripts can be grabbed from  svn - https://zabbix.org/wiki/Get_Zabbix

2016-03-13

Using C++ REST on Fedora Linux

Microsoft has release Casablanca ( C++ REST) to github. I have pushed Fedora packages for these to copr .

Happy -lcpprest




GitLab runner on Windows with bash shell on windows contianer on Docker

As part of your pipeline, you may need to perform browser testing across different platforms/environments. To minimize testing time, it'...