Comments (11)
Not sure if my issue is now even more fundamental as the AS fails to run entirely before launching the AF.
The AS runs independently of the AF in MVP#2, so it should be possible to start them in any order.
from rt-5gms-application-server.
The error you posted indicates that the AS is having trouble creating a directory:
PermissionError: [Errno 13] Permission denied: '/run/rt-5gms'
Looks like the process lacks permissions to create the directory /run/rt-5gms
.
Does that directory already exist in your system, but is owned by root while you are trying to run the AS as a non-root user?
from rt-5gms-application-server.
fivegmag@NUC1:/run$ cd rt-5gms
bash: cd: rt-5gms: No such file or directory
It looks like it doesn't exist so it's actually not an issue of permission to access to it? Which process creates it?
from rt-5gms-application-server.
Reading the full error trace bottom to top suggests that the problem was encountered during a directory creation operation.
If the directory doesn't exist, that suggests that that AS process lacks sufficient permission to create it.
That's as far as I can help you. @davidjwbbc can take over from here!
from rt-5gms-application-server.
Thank you Richard!
For some more info, if useful. I've tried to run the AS as sudo:
fivegmag@NUC1:~$ sudo /home/fivegmag/.local/bin/5gms-application-server
Traceback (most recent call last):
File "/home/fivegmag/.local/bin/5gms-application-server", line 5, in <module>
from rt_5gms_as.app import main
ModuleNotFoundError: No module named 'rt_5gms_as'
from rt-5gms-application-server.
I've tried with another machine. What I've found now is the following problem:
fivegmag@NUC2:~/rt-5gms-application-server$ 5gms-application-server -h
Traceback (most recent call last):
File "/home/fivegmag/.local/bin/5gms-application-server", line 5, in <module>
from rt_5gms_as.app import main
File "/home/fivegmag/.local/lib/python3.10/site-packages/rt_5gms_as/app.py", line 37, in <module>
from .proxy_factory import WebProxy, list_registered_web_proxies
File "/home/fivegmag/.local/lib/python3.10/site-packages/rt_5gms_as/proxy_factory.py", line 438, in <module>
importlib.import_module('.proxies.'+module_name, __package__)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/fivegmag/.local/lib/python3.10/site-packages/rt_5gms_as/proxies/nginx.py", line 41, in <module>
from ..context import Context
File "/home/fivegmag/.local/lib/python3.10/site-packages/rt_5gms_as/context.py", line 36, in <module>
from .openapi_5g.models.content_hosting_configuration import ContentHostingConfiguration
ModuleNotFoundError: No module named 'rt_5gms_as.openapi_5g'
I remember this was reported by @dsilhavy here: #39
from rt-5gms-application-server.
So the No module named 'rt_5gms_as.openapi_5g'
error means that the openapi-generator failed to create the bindings. Running the script separately (build_scripts/generate_5gms_as_openapi
) will show you why it's failing.
The No module named 'rt_5gms_as'
when you tried to use sudo
was because the root user's default PYTHONPATH does not include include your user's ~/.local/lib/python3.10/site-packages
directory, so the installed rt_5gms_as module could not be found. You will probably find it will work if you do: sudo PYTHONPATH=/home/fivegmag/.local/lib/python3.10/site-packages:/home/fivegmag/.local/lib/python3.10 /home/fivegmag/.local/bin/5gms-application-server
The permissions issue with /run/rt-5gms
is because /run
is owned by root. To get around this edit/create an application server configuration file which redirects the application server to use directories that the user can write to, e.g. save the following into my-local-user-as.conf
:
[DEFAULT]
log_dir = /tmp/rt-5gms-as/logs
run_dir = /tmp/rt-5gms-as
[5gms_as]
cache_dir = /tmp/rt-5gms-as/cache
certificates_cache = /tmp/rt-5gms-as/certificates
http_port = 8080
https_port = 8443
[5gms_as.nginx]
root_temp = /tmp/rt-5gms-as
then run the application server as ~/.local/bin/5gms-application-server -c my-local-user-as.conf
The default configuration assumes that the application server is being installed by root as a system service, so you'll need to create an alternative configuration if you wish to run as a normal user. The default configuration file can be found in ~/rt-5gms-application-server/docs/example-application-server.conf
. You can either use your new configuration file by using the -c
command line parameter, as indicated above, or you can place it in ~/.rt-5gms/application-server.conf
to have it as the default configuration for that user.
from rt-5gms-application-server.
Thank you, David.
I cannot see anything when executing build_scripts/generate_5gms_as_openapi
in the PC where this is failing.
On the other PC this works: sudo PYTHONPATH=/home/fivegmag/.local/lib/python3.10/site-packages:/home/fivegmag/.local/lib/python3.10 /home/fivegmag/.local/bin/5gms-application-server
However,
fivegmag@NUC1:~/rt-5gms-application-function/src/5gmsaf$ ~/rt-5gms-application-function/install/bin/open5gs-msafd
02/01 11:49:29.001: [app] FATAL: cannot open file `/home/fivegmag/rt-5gms-application-function/install/etc/open5gs/msaf.yaml` (../subprojects/open5gs/lib/app/ogs-init.c:171)
02/01 11:49:29.001: [app] FATAL: Open5GS initialization failed. Aborted (../subprojects/open5gs/src/main.c:210)
There is no msaf.yaml in that directory.
from rt-5gms-application-server.
I copied it manually from the /src/5gmsaf
directory and now it works (doesnt complain)
from rt-5gms-application-server.
The AS shows me:
fivegmag@NUC1:~/rt-5gms-application-server/src$ sudo PYTHONPATH=/home/fivegmag/.local/lib/python3.10/site-packages:/home/fivegmag/.local/lib/python3.10 /home/fivegmag/.local/bin/5gms-application-server
[2023-02-01 12:04:53 +0100] [11102] [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)
The AF shows me (based on the yaml I copied from one folder to another):
fivegmag@NUC1:~/rt-5gms-application-function/src/5gmsaf$ ~/rt-5gms-application-function/install/bin/open5gs-msafd
Open5GS daemon v2.4.9-116-g24e20f2+
02/01 12:05:03.011: [app] INFO: Configuration: '/home/fivegmag/rt-5gms-application-function/install/etc/open5gs/msaf.yaml' (../subprojects/open5gs/lib/app/ogs-init.c:126)
02/01 12:05:03.012: [sbi] WARNING: [BSF:nbsf-management] has no NRF (../subprojects/open5gs/lib/sbi/context.c:1859)
02/01 12:05:03.013: [sbi] INFO: mhd_server() [127.0.0.22]:7777 (../subprojects/open5gs/lib/sbi/mhd-server.c:279)
02/01 12:05:03.013: [msaf] INFO: [46e09078-a220-41ed-9232-2bb1447ad6bf] MSAF Running (../src/5gmsaf/msaf-sm.c:52)
02/01 12:05:03.013: [app] INFO: 5GMSAF initialize...done (../src/5gmsaf/app.c:24)
However I dont see its getting configured, it doesnt give me the ID. The server is up and running as I can see http://127.0.0.22:7777/3gpp-m5/v2/service-access-information/
but cannot test it correctly as I dont have a provsessionID
from rt-5gms-application-server.
The development branch of the AS (v1.1.0) will work with the development branch of the AF (v1.1.0) as they both implement the M3 interface.
The development AS (v1.1.0) will not get configured by the AF 1.0.1-rc as that AF does not implement M3.
If you wish to test the ServiceAccessInformation returned from AF 1.0.1-rc then please use the AS release 1.0.1 (or v1.0.x branch) with the same ContentHostingConfiguration configured, as these versions are compatible with each other. The ProvisioningSessionId is set in the msaf.yaml file and will be d54a1fcc-d411-4e32-807b-2c60dbaeaf5f
unless you've changed it. The dynamic ProvisioningSessionId will only be coming in v1.1.0 (current development branch).
from rt-5gms-application-server.
Related Issues (20)
- Use OpenAPI to bindings script from 5G-MAG/rt-common-shared repository. HOT 3
- MVP#1 Application Server installation issues/observations HOT 21
- asyncio.create_task(..., name=...) doesn't work with Python 3.7 HOT 1
- Error, following the build instructions HOT 5
- Application Server crash on certificate upload HOT 3
- Content Hosting Configuration handling uplift in 5GMSd AS HOT 5
- Incorrect error response status code for M1_ContentHostingProvisioning_purgeContentHostingCache operation HOT 3
- Documentation updates after review on 23 Jan 2023 HOT 5
- Enhancement: Return number of cache entries purged in M3 response
- CI/CD - Automated deployment of 5GMS AS to Linode instance HOT 1
- Implement Server Health Check endpoint
- Uplift to TS 26.512 v17.4.0: Update M3 interface with new ContentHostingConfiguration structure HOT 1
- Feature: Media Streaming Data Reporting at reference point R4 HOT 1
- 5gms-application-server reports `Path parameters cannot have a default value` HOT 3
- Upstream redirects are passed to client HOT 9
- Redirection fails with recent OpenResty version HOT 1
- change in pydantic v2 HOT 3
- Development branch: Missing Nginx mime.types after clean installation HOT 2
- Updating PATH for launching Openresty HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rt-5gms-application-server.