Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
398 views
in Technique[技术] by (71.8m points)

MongoDB - can't run because of SELinux is preventing mongod from open access on the file /proc/sys/net/ipv4/tcp_fastopen

After install, my mongod server was running well. I have created user and restart the server without issue.

But now when modified gonfi file by adding 0.0.0.0 to bindip, server wont restart. Error message are

Jan 24 11:59:53 localhost.localdomain setroubleshoot[4656]: failed to retrieve rpm info for /proc/sys/net/ipv4/tcp_fastopen
Jan 24 11:59:54 localhost.localdomain setroubleshoot[4656]: SELinux is preventing mongod from open access on the file /proc/sys/net/ipv4/tcp_fastopen. For complete SELinux messag>
Jan 24 11:59:54 localhost.localdomain setroubleshoot[4656]: SELinux is preventing mongod from open access on the file /proc/sys/net/ipv4/tcp_fastopen.
                                                            
                                                            *****  Plugin catchall (100. confidence) suggests   **************************
                                                            
                                                            If you believe that mongod should be allowed open access on the tcp_fastopen file by default.
                                                            Then you should report this as a bug.
                                                            You can generate a local policy module to allow this access.
                                                            Do
                                                            allow this access for now by executing:
                                                            # ausearch -c 'mongod' --raw | audit2allow -M my-mongod
                                                            # semodule -X 300 -i my-mongod.pp

ausearch -c 'mongod' --raw | audit2allow -M my-mongod

semodule -X 300 -i my-mongod.pp

does not solved the problem.

Mongodb doc say that version 4 activate by default use of tcp_fastopen I can't find out how to apply semanage permissive to use tcp_fastopen.

Thanks in advance

question from:https://stackoverflow.com/questions/65870600/mongodb-cant-run-because-of-selinux-is-preventing-mongod-from-open-access-on

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Verify your operating system is supported by MongoDB.

Install a vanilla version of your operating system, do not change any settings, use published MongoDB documentation to install MongoDB and get it working.

Identify differences between your current installation and the vanilla installation.

Update your question with findings.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...