Fixing GlusterFS Geo-Replication Failure on Fedora

GlusterFS geo-replication can fail on Fedora due to a missing dynamic library symlink. Checking /var/log/glusterfs/geo-replication/gv0_node1/gsyncd.log reveals: class Changes(object): File "/usr/libexec/glusterfs/python/syncdaemon/libgfchangelog.py", line 19, in Changes use_errno=True) File "/usr/lib64/python2.7/ctypes/__init__.py", line 361, in __init__ self._handle = _dlopen(self._name, mode) OSError: /usr/lib64/libgfchangelog.so: cannot open shared object file: No such file or directory Looking at /usr/libexec/glusterfs/python/syncdaemon/libgfchangelog.py: class Changes(object): libgfc = CDLL("/usr/lib64/libgfchangelog.so", mode=RTLD_GLOBAL, use_errno=True) On Fedora and RHEL, bare .so library symlinks (as opposed to versioned sonames like .so.0) are provided by the -devel development packages. To resolve this error, install the development package: ...

September 21, 2018 · 1 min

Building the Canon MF3010 Printer Driver on Fedora 25

To build the Canon imageCLASS MF3010 Linux driver from source, download the “UFR II/UFR II LT Printer Driver for Linux V3.20” archive from Canon’s support website. On Fedora 25, you need two adjustments to build the RPM cleanly: 1. Spec File Patch (cndrvcups-common.spec) Exclude internal dependency requirements and apply the gmodule patch: --- cndrvcups-common.spec.orig 2016-11-16 14:37:13.341877857 +0530 +++ cndrvcups-common.spec 2016-11-16 14:34:40.674461102 +0530 @@ -1,5 +1,6 @@ %define VERSION 3.60 %define RELEASE 1 +%global __requires_exclude ^libcaiousb.so$ %ifarch x86_64 %define libs32 /usr/lib @@ -19,6 +20,7 @@ Vendor: CANON INC. Group: Applications/Publishing Source: cndrvcups-common-%{version}-%{release}.tar.gz +Patch0: cndrvcups-common-gmodule.patch BuildRoot: %{_tmppath}/%{name}-root @@ -27,6 +29,8 @@ BuildRoot: %{_tmppath}/%{name}-root %prep %setup -q +%patch0 -p1 + cd buftool ./autogen.sh --prefix=%{_prefix} --enable-progpath=%{_bindir} --libdir=%{_libdir} --disable-shared --enable-static 2. Add gmodule Dependency Patch In modern Fedora releases, gmodule must be explicitly included in PKG_CHECK_MODULES: ...

November 16, 2016 · 1 min

Running Sky (tel.red) on Fedora 25

On Fedora 25, the Sky Skype for Business client crashes on launch inside its bundled Qt 5 runtime: Program received signal SIGABRT, Aborted. 0x00007ffff112692f in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff112692f in raise () at /lib64/libc.so.6 #1 0x00007ffff112852a in abort () at /lib64/libc.so.6 #2 0x00007ffff200dcb1 in () at /usr/lib/sky/lib/libQt5Core.so.5 #3 0x00007ffff24ee835 in QGuiApplicationPrivate::createPlatformIntegration() () at /usr/lib/sky/lib/libQt5Gui.so.5 #4 0x00007ffff24ee955 in QGuiApplicationPrivate::createEventDispatcher() () at /usr/lib/sky/lib/libQt5Gui.so.5 #5 0x00007ffff21cea64 in QCoreApplicationPrivate::init() () at /usr/lib/sky/lib/libQt5Core.so.5 #6 0x00007ffff24f2340 in QGuiApplicationPrivate::init() () at /usr/lib/sky/lib/libQt5Gui.so.5 #7 0x00007ffff2be62b9 in QApplicationPrivate::init() () at /usr/lib/sky/lib/libQt5Widgets.so.5 #8 0x0000000000434e41 in main () The issue stems from incompatible bundled Qt libraries. A reliable workaround is to force Sky to use Fedora’s system-provided qt5 packages: ...

September 1, 2016 · 1 min

Installing Splunk Universal Forwarder Using Ansible

Here is an automated approach to installing and initializing the Splunk Universal Forwarder with Ansible. Variables splunk_home: /opt/splunkforwarder splunk_exec: "{{ splunk_home }}/bin/splunk" Playbook Tasks - name: Install Splunk Universal Forwarder package yum: name: splunkforwarder state: latest become: yes - name: Check for first-time-run marker file stat: path: "{{ splunk_home }}/ftr" register: result_splunk_ftr_stat - name: Configure Splunk forwarder on initial installation block: - name: Ensure existing running splunkd process is stopped shell: ps aux | grep -v grep | grep splunkd && pkill -9 splunkd || true - name: Accept license agreement and start service shell: "{{ splunk_exec }} start --accept-license --answer-yes --no-prompt" - name: Enable Splunk forwarder boot-start service shell: "{{ splunk_exec }} enable boot-start" when: result_splunk_ftr_stat.stat.exists become: yes Run the playbook, and your forwarder is initialized and configured to start on boot.

August 7, 2016 · 1 min

phpIPAM Behind a Load Balancer with SSL Offloading

phpIPAM supports SSL offloading via standard X-Forwarded-Proto and X-Forwarded-For HTTP request headers: public function createURL () { // Reset URL for base if ($_SERVER['SERVER_PORT'] == "443") { $url = "https://$_SERVER[HTTP_HOST]"; } // Reverse proxy doing SSL offloading elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { $url = "https://$_SERVER[SERVER_NAME]"; } elseif (isset($_SERVER['HTTP_X_SECURE_REQUEST']) && $_SERVER['HTTP_X_SECURE_REQUEST'] == 'true') { $url = "https://$_SERVER[SERVER_NAME]"; } // Custom port elseif ($_SERVER['SERVER_PORT'] != "80") { $url = "http://$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]"; } // Normal HTTP ... However, if your load balancer does not forward this header or SSL offloading is misconfigured, phpIPAM may generate broken HTTP redirect loops or fail to load CSS and JavaScript assets. ...

May 7, 2016 · 1 min

Disabling SSL Verification in pyVmomi with Python

Working with self-signed vCenter certificates in an enterprise environment (such as RHEL 6 running mixed Python 2.6/2.7 and pyvmomi 5.5+) often leads to this error: 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 If you need a quick workaround to bypass certificate verification in development scripts: import ssl import requests from pyVim.connect import SmartConnect context = None try: # Disable SSL certificate verification via standard library context = ssl.SSLContext(ssl.PROTOCOL_SSLv3) context.verify_mode = ssl.CERT_NONE except AttributeError: # Fallback monkey-patch for older Python/requests environments rget = requests.get requests.get = lambda obj, *args, **kwargs: rget(obj, verify=False) requests.packages.urllib3.disable_warnings() # Connect to ESXi / vCenter si = SmartConnect( host=args.host, user=user, pwd=args.password, port=int(args.port), sslContext=context ) This bypasses certificate validation issues so you can get back to writing your automation scripts. ...

March 31, 2016 · 1 min

Fixing BSNL DNS Redirection to domain-error.com

BSNL’s default DNS servers hijack unresolved domain queries and redirect users to ad-laden spam pages like http://domain-error.com. To prevent this ISP hijacking, configure NetworkManager to ignore ISP-assigned DNS servers and use Google Public DNS instead. Edit your NetworkManager connection profile in /etc/NetworkManager/system-connections/: [ipv4] dns=8.8.8.8;8.8.4.4; dns-search= method=auto ignore-auto-dns=true Alternatively, you can configure this graphically or via the terminal interface with nmtui: sudo nmtui References Google Public DNS Guide Ask Ubuntu: Redirecting to http://domain-error.com

March 28, 2016 · 1 min

Using Zabbix 3.0 on Enterprise Linux 6 (EL6)

Zabbix 3.0 requires PHP 5.4 or above and is consequently not officially available in base RHEL/CentOS 6 repositories. To run Zabbix 3.0 with MariaDB 10.1 and PHP 5.6 (php56u), I built packages for EL6 on Fedora COPR: COPR: ritz/zabbix30 These RPMs are built for Zabbix 3.0.1 linked against MariaDB 10.1.x and PHP 5.6.19. Useful Resources Official Zabbix 3.0 Installation Manual Zabbix Database Creation SQL Scripts

March 23, 2016 · 1 min

Using C++ REST SDK (Casablanca) on Fedora Linux

Microsoft has open-sourced Casablanca (the C++ REST SDK) on GitHub. To make it easy to use on Fedora, I packaged and published RPMs on Fedora COPR: COPR: ritz/cpprestsdk To enable the repository and install: sudo dnf copr enable ritz/cpprestsdk sudo dnf install cpprest-devel Happy compiling with -lcpprest!

March 13, 2016 · 1 min

Lync on Linux

If you are looking to run Microsoft Lync (aka Skype for Business) on Linux, you’re in luck: Fisil maintains a Linux client hosted at tel.red. However, I ran into an issue running the client on Fedora 23 (Rawhide), as the Sky package bundles its own older X11 libraries: $ sky /opt/sky_linux/sky: symbol lookup error: /lib64/libXxf86vm.so.1: undefined symbol: _XEatDataWords _XEatDataWords was added to fix an upstream X.Org vulnerability (commit details). The workaround is to preload your distribution’s native libX11 library: ...

July 13, 2015 · 1 min