fresh install configuration problem

Bot-Publishing Inc. info at botpublishing.com
Tue Jan 5 13:37:10 UTC 2021


Hello,

I installed the latest Unit package for RHEL 8.

When I try to configure a simple demo app, I am getting:

2021/01/05 13:27:07 [info] 13694#13694 "demo" application started
2021/01/05 13:27:07 [alert] 13694#13694 Python failed to import module
"temp" ModuleNotFoundError: No module named 'temp'
2021/01/05 13:27:07 [notice] 13630#13630 process 13694 exited with code 1
2021/01/05 13:27:07 [warn] 13633#13633 failed to start application "demo"
2021/01/05 13:27:07 [alert] 13633#13633 failed to apply new conf

The JSON config is as following
============================================
{
  "listeners": {
      "*:8080": {
          "pass": "applications/demo"
      }
  },
  "applications": {
      "demo": {
          "type": "python",
          "path": "/home/ec2-user/bp_tts/tmp/",
          "module": "temp",
          "protocol": "wsgi"
      }
  }
}

temp.py
============================================
def application(environ, start_response):
    start_response("200 OK", [("Content-Type", "text/plain")])
    return (b"Hello, Python on Unit!")


PWD of temp.py
============================================
/home/ec2-user/bp_tts/tmp

Would appreciate any advice.

Thank you,
gen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20210105/b8ed71a8/attachment.htm>


More information about the unit mailing list