GithubHelp home page GithubHelp logo

Comments (21)

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024 1

Issues related to the Documentation (when Running)

generate_openapi should be generate_5gms_as_openapi

"generate_openapi" should be renamed to "generate_5gms_as_openapi" in section "Running the example without building" of /docs/README.md
FIXED

config file moved from /docs to /external

../docs/rt-common-shared/5gms/examples/ContentHostingConfiguration_Big-Buck-Bunny_pull-ingest.json
should be
../external/rt-common-shared/5gms/examples/ContentHostingConfiguration_Big-Buck-Bunny_pull-ingest.json
FIXED

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024 1

After a while I got a success.

fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server$ tests/m3_client_cli.py -H localhost:7777 add ps1 external/rt-common-shared/5gms/examples/ContentHostingConfiguration_Big-Buck-Bunny_pull-ingest.json
Success!

from rt-5gms-application-server.

davidjwbbc avatar davidjwbbc commented on September 14, 2024

The missing module is odd, it looks like the OpenAPI bindings were not created.

The build backend collects a dependencies list before it creates the distribution tar file. I suspect the build_scripts/backend.py may need to intercept the call to find the dependencies in the build backend and build the src/rt_5gms_as/openapi_5g directory before passing the call onto the setuptools backend. It already does this for the sdist command (to create the distribution tar), but maybe it needs to perform the action a little earlier in the build process.

I'll do some investigating and see if what I suspect is true.

from rt-5gms-application-server.

davidjwbbc avatar davidjwbbc commented on September 14, 2024

The application server should create any missing folders it sees from its configuration. But obviously can't if it doesn't have permission to do so. The defaults are set assuming the script will be run as root for a proper system service. Using an alternative configuration pointing to directories that the user can create/modify allows this to be run as an unprivileged user.

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

Issues when Running

'regex' not found

In the last step to run the example, I obtain a "ModuleNotFoundError: No module named 'regex'". It may be related to a problem finding the path but I'm not sure at the moment how to fix it
The issue is on the "import regex" inside proxies/nginx.py

fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server/src$ which pip
/usr/bin/pip
fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server/src$ which python3
/usr/bin/python3
fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server/src$ python3 -m pip install regex
Requirement already satisfied: regex in /home/fivegmag/.local/lib/python3.8/site-packages (2022.9.13)

from rt-5gms-application-server.

davidjwbbc avatar davidjwbbc commented on September 14, 2024

In the last step to run the example, I obtain a "ModuleNotFoundError: No module named 'regex'". It may be related to a problem finding the path but I'm not sure at the moment how to fix it The issue is on the "import regex" inside proxies/nginx.py

fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server/src$ which pip
/usr/bin/pip
fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server/src$ which python3
/usr/bin/python3
fivegmag@fivegmag-NUC8i7HVK:~/rt-5gms-application-server/src$ python3 -m pip install regex
Requirement already satisfied: regex in /home/fivegmag/.local/lib/python3.8/site-packages (2022.9.13)

I'm not sure why you are getting the import error, but judging from the output quoted above I have a couple of possible reasons:

  1. You are running the application server as a user other than fivegmag. The regex package is only installed to that local user (as seen from the site-packages path above), so if you try to run as another user it won't find the extra installed package. If this is the case then running sudo python3 -m pip install regex, or installing your distribution package for the module, e.g. sudo apt -y install python3-regex, should fix the import problem as that will install the regex module system wide.
  2. For some reason the version of python 3 being used for the application server is not 3.8, so the extra installed package is not being found.

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

David, thank you for checking. Actually I could finally fix it with sudo apt -y install python3-regex.

Regarding the 3 vs 3.8 I checked that it doesn't seem to make a difference and it is all executed correctly from the 3.8 folder.

from rt-5gms-application-server.

rjb1000 avatar rjb1000 commented on September 14, 2024

With the exception of the MacOS report, I think all problems have been solved, so now it's just a case of updating documentation, right, @davidjwbbc?

from rt-5gms-application-server.

rjb1000 avatar rjb1000 commented on September 14, 2024

Anything more to be done on this issue @davidjwbbc?

Can we link it to documentation update PR(s) before closing?

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

Hello, my issues have been resolved in the latest updates (all running on Ubuntu). For the issues raised by @dsilhavy, we may need to check with him, though I think the documentation regarding the ports was updated

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

I'm trying to redo the rt-5gms-application-server from scratch to check the development branch. I'm getting "bad substitution" after Regenerating the 5G API bindings

~/rt-5gms-application-server/build_scripts/generate_5gms_as_openapi
/home/fivegmag/rt-5gms-application-server/build_scripts/generate_5gms_as_openapi: 33: Bad substitution

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

I used "#! /bin/bash" instead of "#! /bin/sh" and it run

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

I'm stuck with (apparently) the Nginx configurations.
On the sites-enabled or sites-available I can only see default. Default comes with port 80.
This seems to be always active, as when trying to launch the rt_5gms_as.app there is a conflict that says address already in use. I'm wondering when is any other configuration used to change ports.

If I manually change the port of the nginx default to 8080 and do systemctl restart nginx, then I can run rt_5gms_as.app
If I then launch the m3_client_cli.py I get:
INFO:rt-5gms-as:Adding content hosting configuration ps1...
INFO:rt-5gms-as:Reloading proxy daemon...
but no success! message. I'm also unable to retrieve the mpd nor the video from neither port 80 nor 8080

from rt-5gms-application-server.

davidjwbbc avatar davidjwbbc commented on September 14, 2024

I'm stuck with (apparently) the Nginx configurations. On the sites-enabled or sites-available I can only see default. Default comes with port 80. This seems to be always active, as when trying to launch the rt_5gms_as.app there is a conflict that says address already in use. I'm wondering when is any other configuration used to change ports.

By default the 5GMS Application server will try to use port 80 for HTTP and port 443 for HTTPS. If you have the nginx service running, it too will use port 80 or 443 by default. Therefore one of these will need to move and personally, since the 5GMS Application Server is under test I'd change that one.

The 5GMS Application Server default ports can be can be easily changed by setting the appropriate values in the configuration file, for example:

[5gms_as]
http_port = 8080
https_port = 8443

These can either be set in the default configuration file (/etc/rt-5gms/application-server.conf or ~/.rt-5gms/application-server.conf) or you can put them in a separate file and use the -c command line option to use a different configuration file. Personally I have the following in local-dev.conf:

### Defaults for the 5G-MAG Reference Tools: 5GMS applications
[DEFAULT]
log_dir = /tmp/rt-5gms-as/logs
run_dir = /tmp/rt-5gms-as

### 5GMS Application Server specific configurations
[5gms_as]
log_level = debug
cache_dir = /tmp/rt-5gms-as/cache
certificates_cache = /tmp/rt-5gms-as/certificates
http_port = 8080
https_port = 8443
#access_log = %(log_dir)s/application-server-access.log
#error_log = %(log_dir)s/application-server-error.log
#pid_path = %(run_dir)s/application-server.pid

### 5GMS Application Server nginx specific configuration
[5gms_as.nginx]
#root_temp = /var/cache/rt-5gms/as
root_temp = /tmp/rt-5gms-as
#client_body_temp = %(root_temp)s/client-body-tmp
#proxy_temp = %(root_temp)s/proxy-tmp
#fastcgi_temp = %(root_temp)s/fastcgi-tmp
#uwsgi_temp = %(root_temp)s/uwsgi-tmp
#scgi_temp = %(root_temp)s/scgi-tmp
#pid_path = %(root_temp)s/5gms-as-nginx.pid

...and use venv/bin/5gms-application-server -c local-dev.conf to run the application server while testing. This redirects all logs and caches to /tmp and runs the application using ports 8080 and 8443.

If I manually change the port of the nginx default to 8080 and do systemctl restart nginx, then I can run rt_5gms_as.app If I then launch the m3_client_cli.py I get:

INFO:rt-5gms-as:Adding content hosting configuration ps1...
INFO:rt-5gms-as:Reloading proxy daemon...

but no success! message. I'm also unable to retrieve the mpd nor the video from neither port 80 nor 8080

That is strange, as though it got part way through deploying, but never replied to the M3 client. It's difficult to know what's going on there, I've not seen that before.

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

Will check.
this is how my ./rt_5gms/application-server.conf looks like:

[DEFAULT]
log_dir = /tmp/rt-5gms-as/logs
run_dir = /tmp/rt-5gms-as

### 5GMS Application Server specific configurations
[5gms_as]
log_level = info
cache_dir = /tmp/rt-5gms-as/cache
certificates_cache = /tmp/rt-5gms-as/certificates
http_port = 8080
https_port = 8443
m3_listen = localhost
m3_port = 7777
m4d_path_prefix = /m4d/provisioning-session-{provisioningSessionId}/

### 5GMS Application Server nginx specific configuration
[5gms_as.nginx]
root_temp = /tmp/rt-5gms-as

I'm going to create the local-dev version

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

I've checked the entire AS instructions. All seems to work subject to:

from rt-5gms-application-server.

davidjwbbc avatar davidjwbbc commented on September 14, 2024

I've got a fix pending for the first one of those.

The second is a documentation update, however most of those should automatically get installed when you do python3 -m pip install . as they're listed dependencies in the pyproject.toml file. The only prerequisites are up to date pip, setuptools and build modules, the rest should be automatic.

The -nodes option is an older (now deprecated) version of the -noenc option, I'll take a look at the script to make self signed certificates and see if I can make it pick the right one depending on your local installed version of openssl. This should be a relatively easy fix.

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

David,
I think it is very good to have the dependencies in the install. In that case we should remove the installation of those from the documentation.
The -nodes comes because in Ubuntu 20.04 the OpenSSL version is 1.1.1f and I was able to update to 1.1.1s. Not to 3.0 though. What you propose, making this able to pick the right option, would be ideal.

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

Hello, I can confirm that in Ubuntu 22.04.1 the OpenSSL is version 3.
I'm in the process of testing the AS with AF.

When building the AS I get the following:

jordijoan@jordijoan:~/rt-5gms-application-server/dist$ sudo python3 -m pip install rt-5gms-application-server-1.1.0.tar.gz
Processing ./rt-5gms-application-server-1.1.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (pyproject.toml) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-0.0.0-py3-none-any.whl size=5520 sha256=6b90aa35205d38b47af9a98f9da2e8f5ebfd954c1b0e1939c13f81014aba7f04
  Stored in directory: /root/.cache/pip/wheels/19/6c/6a/cebf80ee955ce3814f93d3ce407fbf4bf97fbaa24d80792249
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
  Attempting uninstall: UNKNOWN
    Found existing installation: UNKNOWN 0.0.0
    Uninstalling UNKNOWN-0.0.0:
      Successfully uninstalled UNKNOWN-0.0.0
Successfully installed UNKNOWN-0.0.0

Is that UNKNOWN something to worry about?

I'm unable to execute 5gms-application-server -h. I can only play with the AS using python3 -m rt_5gms_as.app from /src/

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

This has been solved by:

  • trying python3 -m pip install --upgrade pip build setuptools
  • then delete src/rt_5gms_application_server.egg-info before doing the python3 -m pip install . (as it may contain bad package metadata from the previous build with the old setuptools)
  • The installation may warn about the need to update the PATH:
WARNING: The script 5gms-application-server is installed in '/home/fivegmag/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

from rt-5gms-application-server.

jordijoangimenez avatar jordijoangimenez commented on September 14, 2024

I've opened a new issue (#57) related to the MVP#2 testing (which I'm doing with AS "development" and AF "1.0.1-rc"). The error I'm getting is happening always. I've just launched 5gms-application-server -c ../tests/examples/ContentHostingConfiguration_Big-Buck-Bunny_pull-ingest.json and I obtain the same issue

from rt-5gms-application-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.