Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low priority: sys.excepthook is missing on RHEL 7 #488

Open
LindsayHill opened this issue Aug 22, 2017 · 0 comments
Open

Low priority: sys.excepthook is missing on RHEL 7 #488

LindsayHill opened this issue Aug 22, 2017 · 0 comments

Comments

@LindsayHill
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant