5G-MAG/rt-5gms-application-server

Updating PATH for launching Openresty

Closed this issue · 3 comments

Describe the bug
When running the Application Server following the instructions it looks like the export PATH is not taking effect and running the AS produces the error of the "lua_package_path" missing.

Talking to @aaronmontilla, he experienced the same issue, just reported here:

aamonvi@aamonvi:~/rt-5gms-application-server$ sudo 5gms-application-server
[2024-05-22 13:26:53 +0200] [3977] [INFO] Running on http://127.0.0.1:7777/ (CTRL + C to quit)
INFO:hypercorn.error:Running on http://127.0.0.1:7777/ (CTRL + C to quit)
INFO:NginxWebProxy:
ERROR:NginxWebProxy:nginx: [emerg] unknown directive "lua_package_path" in /tmp/rt_5gms_as.conf:48
INFO:rt-5gms-as:Web proxy process exited, has been restarted

Remedy
We are able to solve this by executing the following:
sudo PATH="/usr/local/openresty/nginx/sbin:$PATH" 5gms-application-server (probably also works without sudo).

Not sure if we are doing something wrong that makes executing PATH="/usr/local/openresty/nginx/sbin:$PATH" export PATH have no effect.

Adjust the documentation here: https://github.com/5G-MAG/rt-5gms-application-server?tab=readme-ov-file#running

  • Execute as sudo
  • Add path to path of sudo user
  • Create a dedicated issue to handle this as part of the startup process. AS sets the path. Python alters env variable.

Closed by PR #90