st2-packages
st2-packages copied to clipboard
Low priority: `sys.excepthook is missing` on RHEL 7
When installing ST2 2.3 or 2.4dev on RHEL 7.4 with the one-line install script, early in the installation we see this output:
########################################################
Installing st2 stable
########################################################
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Package net-tools-2.0-0.22.20131004git.el7.x86_64 already installed and latest version
Nothing to do
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Package policycoreutils-python-2.5-17.1.el7.x86_64 already installed and latest version
Nothing to do
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Package yum-utils-1.1.31-42.el7.noarch already installed and latest version
Nothing to do
This comes from this line in the bootstrap script:
# Allow rabbitmq to use '25672' port, otherwise it will fail to start
sudo semanage port --list | grep -q 25672 || sudo semanage port -a -t amqp_port_t -p tcp 25672
When running this manually, we can see that this results in an error:
ec2-user@ip-10-0-4-161 ~]$ sudo semanage port --list | grep -q 25672
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
[ec2-user@ip-10-0-4-161 ~]$
It appears to be the same problem as referenced here
The underlying problem is related to semanage
, but it only shows up when passed to grep -q
.
As a workaround, we could do something like this:
sudo semanage port --list | grep 25672 > /dev/null || sudo semanage port -a -t amqp_port_t -p tcp 25672
Not quite as elegant, but it gets the job done.