Sensu config.json cannot be left blank

/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-settings-3.4.0/lib/sensu/settings/loader.rb:292:in `deep_merge': undefined method `each' for nil:NilClass (NoMethodError)
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-settings-3.4.0/lib/sensu/settings/loader.rb:96:in `load_file'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-settings-3.4.0/lib/sensu/settings.rb:17:in `load'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-settings-3.4.0/lib/sensu/settings.rb:38:in `get'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.23.2/lib/sensu/daemon.rb:104:in `load_settings'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.23.2/lib/sensu/daemon.rb:50:in `initialize'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.23.2/lib/sensu/server/process.rb:40:in `initialize'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.23.2/lib/sensu/server/process.rb:28:in `new'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.23.2/lib/sensu/server/process.rb:28:in `run'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.23.2/exe/sensu-server:10:in `'
from /opt/sensu/bin/sensu-server:22:in `load'
from /opt/sensu/bin/sensu-server:22:in `'

That's what it looks like when you put all your configuration information for sensu into /etc/sensu/conf.d and leave /etc/sensu/config.json empty.

To solve, you can just put the following into /etc/sensu/config.json and sensu will happily do a deep merge with your other files:

{
}

For more on how Sensu starts up, see Sensu Configuration Reference documentation.

Topic: 

Solved: postfix lost connection after EHLO on RHEL7

I needed to get some software from a lab that only distributes the software as .zip attachments by email. Let's ignore the wisdom of choosing that distribution method in 2016 (nowadays most mail setups strip out zipped attachments) and instead focus on the problem at hand.

I set up a local account on a RHEL7 server running Postfix. When the message was sent to me, this is what appeared in the logs:

mailserver postfix/smtpd[5416]: connect from mail.example.com[203.0.113.78]
mailserver postfix/smtpd[5416]: lost connection after EHLO from mail.example.com[203.0.113.78]
mailserver postfix/smtpd[5416]: disconnect from mail.example.com[203.0.113.78]

An immediate disconnection! But why? I sent test email messages from two different external email accounts and they were accepted and delivered just fine.

I turned on postfix's per-host debugging to get more information. I added the following to /etc/postfix/main.cf and did a postfix reload.

debug_peer_list = 203.0.113.78

I also changed debug_peer_level from its default of 2 to its maximum value of 3. Now I could see what postfix is telling the client when it connects:

mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-mailserver.fqdn
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-PIPELINING
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-SIZE 10240000
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-VRFY
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-ETRN
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-ENHANCEDSTATUSCODES
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-8BITMIME
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250 DSN

Aha. Maybe the message size limit is too small for the mail attachment and the client is just shaking its head and disconnecting. Added the following to /etc/postfix/main.cf and did postfix reload:

message_size_limit = 20480000

Hurrah! That was the problem. Now after the following being sent to the client it continues the connection and sends the mail:

mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-mailserver.fqdn
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-PIPELINING
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-SIZE 20480000
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-VRFY
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-ETRN
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-ENHANCEDSTATUSCODES
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250-8BITMIME
mailserver postfix/smtpd[6125]: > mail.example.com[203.0.113.78]: 250 DSN
...
mailserver postfix/smtpd[6125]: 80EAC40D6F56: client=mail.example.com[203.0.113.78]
mailserver postfix/cleanup[6129]: 80EAC40D6F56: message-id=<83748A32.egglDIEJFL@example.com>

Don't forget to turn debugging off afterwards!

Enabling Jumbo Frames on RHEL7 with nmcli

Use the NetworkManager command-line tool to see your connections:

# nmcli connection show --active
NAME UUID TYPE DEVICE
em1 7bb105a5-f663-4e5b-a8aa-fdeb2a16e1a0 802-3-ethernet em1

View the attributes of a single connection:

# nmcli connection show em1
...
802-3-ethernet.mtu: auto

Change the MTU to your new value (in this example, 9000):

# nmcli connection modify em1 802-3-ethernet.mtu 9000

Check for the change:

# nmcli connection show em1
...
802-3-ethernet.mtu: 9000

Topic: 

RHEL7 Core (Minimal Install) vs. Base (Infrastructure Server) Packages

Below is a list of packages installed on RHEL7 using the minimal install (@ Core option in Kickstart).

The additional packages installed by @ Base option in Kickstart are added into the list in bold with the package summary appended.

NetworkManager
NetworkManager-config-server
NetworkManager-libnm
NetworkManager-team
NetworkManager-tui
Red_Hat_Enterprise_Linux-Release_Notes-7-en-US
abrt - Automatic bug detection and reporting tool
abrt-addon-ccpp - abrt's C/C++ addon
abrt-addon-kerneloops - abrt's kerneloops addon
abrt-addon-pstoreoops - abrt's pstore oops addon
abrt-addon-python - abrt's addon for catching and analyzing Python exceptions
abrt-addon-vmcore - abrt's vmcore addon
abrt-addon-xorg - abrt's Xorg addon
abrt-cli - Virtual package to make easy default installation on non-graphical
abrt-console-notification - ABRT console notification script
abrt-dbus - ABRT DBus service
abrt-libs - Libraries for abrt
abrt-python - ABRT Python API
abrt-tui - abrt's command line interface

acl
aic94xx-firmware
alsa-firmware
alsa-lib
alsa-tools-firmware
at - Job spooling tools
attr - Utilities for managing filesystem extended attributes

audit
audit-libs
augeas-libs - Libraries for augeas
authconfig
avahi-autoipd
avahi-libs
basesystem
bash
bash-completion - Programmable completion for Bash
bc - GNU's bc (a numeric processing language) and dc (a calculator)
bind-libs - Libraries used by the BIND DNS packages

bind-libs-lite
bind-license
bind-utils - Utilities for querying DNS name servers
binutils
biosdevname
blktrace - Utilities for performing block layer IO tracing in the linux
boost-system - Run-Time component of boost system support library
boost-thread - Run-Time component of boost thread library
bridge-utils Utilities for configuring the linux ethernet bridge

btrfs-progs
bzip2 - A file compression utility
bzip2-libs
ca-certificates
chkconfig
chrony - An NTP client/server
coreutils
cpio
cracklib
cracklib-dicts
crda - Regulatory compliance daemon for 802.11 wireless networking
cronie
cronie-anacron
crontabs
cryptsetup - A utility for setting up encrypted disks
cryptsetup-libs
curl
cyrus-sasl-lib
cyrus-sasl-plain - PLAIN and LOGIN authentication support for Cyrus SASL
dbus
dbus-glib
dbus-libs
dbus-python
desktop-file-utils
device-mapper
device-mapper-event
device-mapper-event-libs
device-mapper-libs
device-mapper-persistent-data
dhclient
dhcp-common
dhcp-libs
diffutils
dmidecode
dmraid - dmraid (Device-mapper RAID tool and library)
dmraid-events - dmevent_tool (Device-mapper event tool) and DSO

dnsmasq
dosfstools - Utilities for making and checking MS-DOS FAT filesystems on Linux
dracut
dracut-config-rescue
dracut-network
dyninst - An API for Run-time Code Generation
e2fsprogs
e2fsprogs-libs
ebtables
ed - The GNU line editor
elfutils - A collection of utilities and DSOs to handle compiled objects

elfutils-libelf
elfutils-libs
emacs-filesystem
ethtool
expat
file
file-libs
filesystem
findutils
fipscheck
fipscheck-lib
firewalld
fprintd - D-Bus service for Fingerprint reader access
fprintd-pam - PAM module for fingerprint authentication

freetype
fxload
gawk
gdb - A GNU source-level debugger for C, C++, Fortran, Go and other languages
gdbm
gdk-pixbuf2 - An image loading library
gettext
gettext-libs
glib-networking
glib2
glibc
glibc-common
gmp
gnupg2
gnutls
gobject-introspection
gpgme
gpm-libs - Dynamic library for for the gpm (general purpose mouse)
grep
groff-base
grub2
grub2-tools
grubby
gsettings-desktop-schemas
gzip
hardlink
hostname
hunspell - A spell checker and morphological analyzer library
hunspell-en - English hunspell dictionaries
hunspell-en-GB - UK English hunspell dictionaries
hunspell-en-US - US English hunspell dictionaries

hwdata
info
initscripts
iproute
iprutils
iptables
iputils
irqbalance
ivtv-firmware
iw - A nl80211 based wireless configuration tool
iwl100-firmware
iwl1000-firmware
iwl105-firmware
iwl135-firmware
iwl2000-firmware
iwl2030-firmware
iwl3160-firmware
iwl3945-firmware
iwl4965-firmware
iwl5000-firmware
iwl5150-firmware
iwl6000-firmware
iwl6000g2a-firmware
iwl6000g2b-firmware
iwl6050-firmware
iwl7260-firmware
iwl7265-firmware
jansson
jasper-libs - Runtime libraries for jasper
jbigkit-libs - JBIG1 lossless image compression library
json-c
kbd
kbd-legacy
kbd-misc
kernel
kernel
kernel-tools
kernel-tools-libs
kexec-tools
keyutils-libs
kmod
kmod-libs
kpartx
kpatch - Dynamic kernel patch manager
krb5-libs
langtable - Guessing reasonable defaults for locale, keyboard layout, territory, and language.
langtable-data - Data files for langtable
langtable-python - Python module to query the langtable-data

ledmon
less
libX11 - Core X11 protocol client library
libX11-common - Common data for libX11
libXau - Sample Authorization Protocol for X

libacl
libaio
libassuan
libattr
libblkid
libcap
libcap-ng
libcgroup - Library to control and monitor control groups
libcgroup-tools - Command-line utility programs, services and daemons for libcgroup

libcom_err
libconfig - C/C++ configuration file library
libcroco
libcurl
libdaemon
libdb
libdb-utils
libdrm
libdwarf - Library to access the DWARF Debugging file format
libedit
libestr
libffi
libfprint - Toolkit for fingerprint scanner
libgcc
libgcrypt
libgomp
libgpg-error
libgudev1
libidn
libjpeg-turbo - A MMX/SSE2 accelerated library for manipulating JPEG image files
libmnl
libmodman
libmount
libndp
libnetfilter_conntrack
libnfnetlink
libnl
libnl3
libnl3-cli
libpcap
libpciaccess
libpipeline
libpng - A library of functions for manipulating PNG image format files
libproxy
libpwquality
libreport - Generic library for reporting various problems
libreport-cli - libreport's command line interface
libreport-filesystem - Filesystem layout for libreport
libreport-plugin-mailx - libreport's mailx reporter plugin
libreport-plugin-rhtsupport - libreport's RHTSupport plugin
libreport-plugin-ureport - libreport's micro report plugin
libreport-python - Python bindings for report-libs
libreport-rhel - Default configuration for reporting bugs via Red Hat infrastructure
libreport-web Library providing network API for libreport

libselinux
libselinux-python
libselinux-utils
libsemanage
libsepol
libsoup
libss
libssh2
libsss_idmap - FreeIPA Idmap library
libsss_nss_idmap - Library for SID based lookups

libstdc++
libstoragemgmt - Storage array management library
libstoragemgmt-python - Python client libraries and plug-in support for libstoragemgmt

libsysfs
libtar - Tar file manipulation API
libtasn1
libteam
libtiff - Library of functions for manipulating TIFF format image files
libunistring
libusb - A library which allows userspace access to USB devices
libusbx - Library for accessing USB devices

libuser
libutempter
libuuid
libverto
libxcb - A C binding to the X11 protocol
libxml2
libxml2-python
libxslt
linux-firmware
lm_sensors-libs - Lm_sensors core libraries
logrotate
lsof - A utility which lists open files on a Linux/UNIX system
lsscsi
lua
lvm2
lvm2-libs
lzo
m2crypto
mailx - Enhanced implementation of the mailx command
make
man-db
man-pages - Man (manual) pages from the Linux Documentation Project
man-pages-overrides - Complementary and updated manual pages

mariadb-libs
mdadm - The mdadm program controls Linux md devices (software RAID arrays)
microcode_ctl
mlocate - An utility for finding files by name
mozjs17
mtr - A network diagnostic tool
nano - A small text editor

ncurses
ncurses-base
ncurses-libs
net-tools - Basic networking tools
nettle
newt
newt-python
nspr
nss
nss-softokn
nss-softokn-freebl
nss-sysinit
nss-tools
nss-util
ntpdate - Utility to set the date and time via NTP
ntsysv - A tool to set the stop/start of system services in a runlevel

numactl-libs
openldap
openssh
openssh-clients
openssh-server
openssl
openssl-libs
os-prober
p11-kit
p11-kit-trust
pam
parted
passwd
pciutils - PCI bus related utilities
pciutils-libs
pcre
perl
perl-Carp
perl-Encode
perl-Exporter
perl-File-Path
perl-File-Temp
perl-Filter
perl-Getopt-Long
perl-HTTP-Tiny
perl-PathTools
perl-Pod-Escapes
perl-Pod-Perldoc
perl-Pod-Simple
perl-Pod-Usage
perl-Scalar-List-Utils
perl-Socket
perl-Storable
perl-Text-ParseWords
perl-Time-HiRes
perl-Time-Local
perl-constant
perl-libs
perl-macros
perl-parent
perl-podlators
perl-threads
perl-threads-shared
pinentry
pinfo - An info file viewer
pkgconfig
plymouth
plymouth-core-libs
plymouth-scripts
pm-utils - Power management utilities and scripts
policycoreutils
polkit
polkit-pkla-compat
popt
postfix
ppp
procps-ng
psacct - Utilities for monitoring process activities
pth
pyOpenSSL
pygobject2
pygobject3-base
pygpgme
pyliblzma
python
python-augeas - Python bindings to augeas
python-backports - Namespace for backported Python features
python-backports-ssl_match_hostname - The ssl.match_hostname() function from Python 3
python-chardet - Character encoding auto-detection in Python

python-configobj
python-dateutil
python-decorator
python-dmidecode
python-ethtool
python-gudev
python-hwdata
python-iniparse
python-kitchen - Small, useful pieces of code to make python coding easier
python-libs
python-lxml
python-magic - Python bindings for the libmagic API
python-perf
python-pycurl
python-pyudev
python-requests - HTTP library, written in Python, for human beings
python-rhsm
python-setuptools
python-six - Python 2 and 3 compatibility utilities
python-slip
python-slip-dbus
python-urlgrabber
python-urllib3 - Python HTTP library with thread-safe connection pooling and file post
pyxattr
qrencode-libs
quota - System administration tools for monitoring users' disk usage
quota-nls - Gettext catalogs for disk quota tools
rdate - Tool for getting the date/time from a remote machine

rdma
readline
redhat-access-insights - Uploads Insights information to Red Hat on a periodic basis
redhat-indexhtml - Browser default start page for Red Hat Enterprise Linux

redhat-logos
redhat-release-server
redhat-support-lib-python
redhat-support-tool
rfkill - A tool for enabling and disabling wireless devices
rhn-check
rhn-client-tools
rhn-setup
rhnlib
rhnsd
rng-tools - Random number generator related utilities
rootfiles
rpm
rpm-build-libs
rpm-libs
rpm-python
rsync - A program for synchronizing files over a network
rsyslog
satyr Tools to create anonymous, machine-friendly problem reports
scl-utils - Utilities for alternative packaging

sed
selinux-policy
selinux-policy-targeted
setserial - A utility for configuring serial ports
setup
setuptool - A text mode system configuration tool
sg3_utils-libs - Shared library for sg3_utils
sgpio - SGPIO captive backplane tool

shadow-utils
shared-mime-info
slang
smartmontools - Tools for monitoring SMART capable hard disks
snappy
sos - A set of tools to gather troubleshooting information from a system
sqlite
sssd-client - SSSD Client libraries for NSS and PAM
strace - Tracks and displays system calls associated with a running process

subscription-manager
sudo
sysstat - Collection of performance monitoring tools for Linux

systemd
systemd-libs
systemd-python - Python 2 bindings for systemd
systemd-sysv
systemtap-runtime - Programmable system-wide instrumentation system - runtime
sysvinit-tools
tar
tcp_wrappers - A security tool which acts as a wrapper for TCP daemons
tcp_wrappers-libs
tcpdump - A network traffic monitoring tool
tcsh - An enhanced version of csh, the C shell

teamd
time - A GNU utility for monitoring a program's use of system resources
traceroute - Traces the route taken by packets over an IPv4/IPv6 network

trousers
tuned
tzdata
unzip - A utility for unpacking zip files
usb_modeswitch - USB Modeswitch gets mobile broadband cards in operational mode
usb_modeswitch-data - USB Modeswitch gets mobile broadband cards in operational mode (sic)
usbutils - Linux USB utilities

usermode
ustr
util-linux
vim-common - The common files needed by any version of the VIM editor
vim-enhanced - A version of the VIM editor which includes recent enhancements
vim-filesystem - VIM filesystem layout

vim-minimal
virt-what
wget
which
words - A dictionary of English words for the /usr/share/dict directory
wpa_supplicant
xdg-utils
xfsdump - Administrative utilities for the XFS filesystem
xfsprogs
xmlrpc-c - A lightweight RPC library based on XML and HTTP
xmlrpc-c-client - C client libraries for xmlrpc-c

xz
xz-libs
yajl - Yet Another JSON Library (YAJL)
yum
yum-langpacks
yum-metadata-parser
yum-rhn-plugin
yum-utils - Utilities based around the yum package manager
zip - A file compression and packaging utility compatible with PKZIP

zlib

Topic: 

Pages

Subscribe to SysArchitects RSS