*** ERROR ***: cannot assign to cgroup site40: Cgroup is not mounted
no cgroup set! errno=1 errmsg=Cgroup is not mounted
Seeing this on Python Apps, Ruby Apps and it’s been reported by others that it happens for Node apps. The common issue is Passenger and I believe it may have something to do with cgroup vs cgroup2 on RHEL 10 but I am unsure.
Also, Passenger throws this error for Python apps using 3.11+
ModuleNotFoundError: No module named 'imp'
Passenger’s WSGI loader is trying to import Python’s imp module.
The imp module was removed in Python 3.12 and deprecated in 3.11 or earlier.
This implies that Passenger on the server is too old.
I’m not interested in compiling my own, I just need things to work out of the box.
I’m starting to think RHEL 10 is a big problem and shouldn’t be used considering the number of issues that there have been. It can’t just be me, so what’s the suggestion here?
Raw process output:
*** ERROR ***: cannot assign to cgroup site40: Cgroup is not mountedno cgroup set! errno=1 errmsg=Cgroup is not mounted
/.socket/passenger/src/helper-scripts/wsgi-loader.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno
Traceback (most recent call last):
File "/.socket/passenger/src/helper-scripts/wsgi-loader.py", line 325, in <module>
app_module = load_app()
^^^^^^^^^^
File "/.socket/passenger/src/helper-scripts/wsgi-loader.py", line 62, in load_app
return imp.load_source('passenger_wsgi', startup_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/share/python/pyenv/versions/3.11.11/lib/python3.11/imp.py", line 172, in load_source
module = _load(spec)
^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 721, in _load
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/var/www/pycms/passenger_wsgi.py", line 1, in <module>
from flask import Flask
ModuleNotFoundError: No module named 'flask'
passenger_wsgi.py
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
application.run()
.htaccess
PassengerEnabled On
PassengerAppRoot /var/www/pycms
PassengerPython /usr/local/share/python/pyenv/shims/python