I have found that the submgr is malfunction. The submgr connot perform the subscribtion function. I test this function by hw-c++ and hw-python xApp using rmr route. Did somebody meet this problem?
The service name is "service-ricplt-submgr-http.ricplt" or in a typical kubernetes installation the full domain name service-ricplt-submgr-http.ricplt.svc.cluster.local . This follows the syntax pod-ip-address.service-name.my-namespace.svc.cluster-domain.local. This resolves to the pod IP (which you see in "kubectl get pod -A -o wide", and which changes over a pod redeploy). There's typically no unique ClusterIP assigned to submgr, i.e., it is a headless service.
using kubectl you see the mapped IP address via the endpoints API: "kubectl get endpoints -n ricplt |grep submgr" like in the example below, but within the submgr client pod the DNS name should be used.
Your reply to the previous post was very useful! I was wondering if you can help on assembling the request.
I design a json request following the format specified in https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-submgr/en/latest/user-guide.html which also matches the one in the xapp_rest_api.yaml (the swagger definition) in the xapp-frame.go and I aways get an error from the json unpacking in the subscription manager (see figure bellow)
I also notice a similar error happening in the bouncer xapp in the ric_benchmark e2 simulator.
Can you help on any way on this matter?
Thank you in advance!
PS.: This screenshoot was taken using ipython on a dummy xapp just to have access to the submgr service. I find it very very useful to have an interactive prompt with all the xapp-frame, rmr, sdl, etc infrastructure.
If you do a GET on it, you read the subscriptions. If you do a POST, you subscribe the gnodeb indicated in the json you send in the request body.
I'm having problem with that json... I follow exactly the same format in the documentation but I aways get an error as a response (see figure in my previous post).
If you have more luck in subscribing, I would appreciate if you post the json you sent here.
I can't see what is the problem. It seems like that json body string in the request is not correctly formulated or the request path in not correct. I think that the request does not reach Submgr code but is rejected already in Swagger generated code part. It does basic message validation. To see does message reach Submgr, logger level in Submgr config map would need to be change to 4. Submgr user guide has instructions how to edit the config map.
I quickly repeated the test using Curl command. I generated the json body data using Golang code. Json data is sent from a file. Note that the elements in the message may not be in same order! Request itself worked but as there was no running simulator in my test environment, Submgr did not accepted the request. E2 interface was down for the Meid. Also when I used the Curl tool, there is no real xapp. Message in this case would require to have RMRRoutingNeeded = false, otherwise request will fail due to missing real xapp, where route would be tried to create.
Thank so much for your answer! Your example was perfect!! I tested with curl to the subscription manager and it worked like a charm!! Now the problem I'm having is that it still does not work using a request from python (see figure). Its like requests.post is "formatting" the json in a way that the swagger parser rejects is... I'll do more tests. But anyway, thank you very very much for your help!!!
Regarding my previous response, I figured the problem.. I was a silly mistake... python requests need a dict object I was passing a string so the subscription manager was receiving a "escaped" json string instead of a pure one.
I'm using D release with everything setup to use helm3 (I don't even have helm2 installed). dms_cli for all deployments and a local repository for the charts
During F release we will remove the RMR support for subscriptions - and the only xapp subsciption interface is the REST interface. xapp framework for go already supports only teh REST based one.
I'm using a REST based subscription but Im having the following error in the submgr:
(CREATE routeinfo(2/[service-ricxapp-bouncer-xapp-rmr.ricxapp:4500]) failed with error: [POST /handles/xapp-subscription-handle][400] provideXappSubscriptionHandleBadRequest ")
I checked the body of the post the is seems to pass the swagger validation. Since either REST (out xapp) and rmr bouncer xapp) are having the same error. I wonder if it is something on my deployment...
When running the HWxApp, I encountered the same issue as Allen mentioned above, as the issue comes from the routing manager, I also checked the log from it, the error message is:
{"ts":1647367600487,"crit":"ERROR","id":"rtmgr","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"1","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2022-03-15T18:06:40"},"msg":"XApp instance not found: service-ricxapp-hwxapp-rmr.ricxapp:4560"} {"ts":1647367600487,"crit":"ERROR","id":"rtmgr","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"1","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2022-03-15T18:06:40"},"msg":"RoutingManager->SubManager Add Request Failed: XApp instance not found: service-ricxapp-hwxapp-rmr.ricxapp:4560"}
Seems the rtmgr doesn't recognize the xApp, but I am sure the xApp is running (I can see it by kubectl get pods -A).
So I tried to manually get xApp list from appmgr, the list is empty:
root@lianjun:~# curl -i -X GET http://10.244.0.138:8080/ric/v1/xapps HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 16 Mar 2022 19:54:49 GMT Content-Length: 3 Connection: close
[] root@lianjun:~#
Is there some issue with the appmgr? any pointer would be appreciated.
One thing to mention is that I modified the routes file in HWxAPP as below, so the RIC-SUB-REQ message will be forwarded to submgr instead of directly to E2-terminal.
In your guide, we can get pod IP using 'kubectl get pod -A -o wide' and port info from "line 69 ~~~~~~, host = fmt.Sprintf("service-%s-submgr-http.%s:8088", pltnamespace, pltnamespace)'
But it's too dificult to know the port info from code.
So is there any easy way to get port info? Something like 'kubectl get pod -A -o wide' for pod id.
I think there's no standard way to handle this. I think this would typically be a matter of the owner of the container documenting it or make it visible in the container/pod configuration.
The HW xApp can be onboarded and installed successfully, but seems it is not registered in the appmgr, I can not find any documentation regarding how to register xApp in the appmgr, actually, I can not find any documentation talks about appmgr, could you give me a pointer on this, really appreciated.
Hello Lianjun Li. Could you share how are you subscribing? In my case I am registering the app but my subscription still fails. Actually, even the route manager is not accepting routes via API. If I raise the app without a routing table, the app gets stuck because the route manager does not accept the route I create for the app.
In short, I am using HWxApp, while initializing, it creates a subscription-handler, and send subscription request through the subscription-handler member function. You can modify the RIC-SUB-REQ content there, e.g., I am testing the REPORT service, so I set the ric-action-type to 0.
Also, I modified the hw/init/routes.txt file in HWxAPP as below, so the RIC-SUB-REQ message will be forwarded to submgr instead of directly to E2-terminal.
After registering the HWxApp in the appmgr, I first connect the E2 agent (in gNB) to RIC, then start the xApp. I can see the RIC-SUB-REQ and RIC-SUB-RESPONSE success message in the submgr log. And I can see the Indication messages received at the xApp.
I am using Dawn release for both near-real-time RIC and HWxApp.
The E2 agent and gNB in my platform are from OAI Mosaic5G team.
Thank you very much for the reply! I'll see why my version does not work (since I have a setup close to what you are describing). One thing that is different is that I'm using the python version of the substitution library.
Another case is when we are closer to the production setup (no routes.txt) did you try something like that? (use no route table at al?)
You are welcome, I will try hw-python next, after all, python is much easier to write xApps.
Regarding the routing, I am not an expert on the routing manager mechanism, so I just use this default setting with routes.txt file.
I think this routes.txt is just for the initial routing table, later the routing manager will create a dynamic routing table, which is much larger than the initial one.
Lianjun Li i'm also working with E2 agent and gNB from OAI Mosaic5G team.
Currently, i'm trying to get subscription between osc kpimon and e2-agent. For HWxAPP, i got successfull subscription exchange. i'm trying to collect KPI metrics from OAI gNodeB to test Anomaly Detection Use Case with real data. maybe you already run it successfully? (what is need to be add here that we don't connected UE yet to OAI due to RACH problems)
where KPImon sends subscription request with default value ran_func_id == 0 "err := c.sendRicSubRequest(1001, 1001, 0)"
i also checked other ran_func_id (1,142,143,144,145) i got some output data from E2-agent
//(printf("ran_func.id from SETUP %d\n", ran_func[i].id);) ran_func.id from SETUP 142 ran_func.id from SETUP 143 ran_func.id from SETUP 144 //(for this ID return after sub_req: test_agent: /root/flexric/flexric/test/test_agent.c:37: read_RAN: Assertion `rd_if->type == MAC_STATS_V0 || rd_if->type == RLC_STATS_V0' failed.) ran_func.id from SETUP 145 //(for this ID return after sub_req: test_agent: /root/flexric/flexric/test/test_agent.c:37: read_RAN: Assertion `rd_if->type == MAC_STATS_V0 || rd_if->type == RLC_STATS_V0' failed.) [E2AP] Sending setup request [E2-AGENT]: SETUP-RESPONSE received
for ran_func_id = 1 test_agent: /root/flexric/flexric/src/agent/plugin_agent.c:324: sm_plugin_ag: Assertion `it != end_it && "RAN function ID not found in the RAN"' failed.
I haven't looked into the KPIMON xApp, but I don't think any xApp from ORAN-SC can work with FlexRIC E2 agent out-of-the-box, because the SM, which expose RAN functions to xApp, should come in pair, one in the E2 agent (in gNB), one in the SC-RIC (xApp), so you need to either modify the SM in E2 agent, or modify the SM in the KIPMON, so they can understand each other.
The error message is an example, the FlexRIC E2 agent currently only supports RAN function ID 142, 143, 144, but the xApp asks for ID 0, the E2 agent doesn't understand the request from xApp.
I just modified the HWxApp, it receives the indication message from E2 agent, depending on which RAN function ID (142/143/144) you are requesting, the indication message has all MAC/RLC/PDCP KPIs.
Hi Lianjun Li, can you share command for run rfsimulator that will deliver KPI data to RIC? currently, i'm not sure if i running simulator with correct settings:
I´m trying to interconnect E2Agent from OAI (Mosaic5G) with nearRT RIC from OSC.
Do you have any idea how I can interconect both components?
Now, I have OAI´s RIC deploy in the same server of OSC´s RIC. I suposse that I need to interconnect OAI´s E2Agent with the interface E2Term from OSC, but I don´t have any idea.
However, in appmgr and submgr registry, http endpoint is requested, which is not found in xApps D version in config-file.json (rmr endpoint only) but in other versions
"From xApp point of view xApp instance id identifies response REST notification for the E2 subscription in the REST request..... xApp need to be able preserve Subscription Manager allocated REST request id over xApp restart. The id is needed for deletion of the REST subscription and if there is need to resend the same REST request."
I.e., anything that is unique over time within that xapp instance will do. E.g., a increasing counter. If you generate lots of long-valid subscriptions, then you need to manage the instance IDs in a more sophisticated way than a counter as the counter will quickly wrap around (range 0...2^16-1)
XappEventInstanceID identifies E2 subscription inside REST Subscription Request. One request can contain multiple E2 subscriptions. XappEventInstanceID is returned to xApp in notification when E2 subscription is ready. xApp knows for which E2 subscription the notification belongs. xApp A and xApp B can use the same value.
I think we eventually will develop it in a direction that the ricRequestorID is used by xApps to identify themself when sending, for example, control messages.
In relation to subscriptions (created by the sub mgr - acting a bit like an xApp) we always use the static ricRequestorID=123 just because we have to fill one in.
But currently ricRequestorID isn't really used and we will in 123 for messages that are send by the sub mgr and for xApps, I think, it should currently not matter what they actually fill in when sending control messages.
Currently we use static 123 value from sub mgr in the meantime. But it will be change to using the value from each xApp. (we don't know when it be coming)
when that times come, XappEventInstanceID is used to send ricRequestorID value from xApp to subMgr through Rest Subscription Message?
59 Comments
菜芽
Could somebady tell me where i can find the source code of submgr? Thank you very much!
Thoralf Czichy
check under "submgr" in this list: Scope of the near-RT RIC platform and its components (summary)
菜芽
I have found that the submgr is malfunction. The submgr connot perform the subscribtion function. I test this function by hw-c++ and hw-python xApp using rmr route. Did somebody meet this problem?
菜芽
Why i cannot find the subscription RESTful URL? How can I make a subscription?
Thoralf Czichy
The service name is "service-ricplt-submgr-http.ricplt" or in a typical kubernetes installation the full domain name service-ricplt-submgr-http.ricplt.svc.cluster.local . This follows the syntax pod-ip-address.service-name.my-namespace.svc.cluster-domain.local. This resolves to the pod IP (which you see in "kubectl get pod -A -o wide", and which changes over a pod redeploy). There's typically no unique ClusterIP assigned to submgr, i.e., it is a headless service.
line 69 in https://gerrit.o-ran-sc.org/r/gitweb?p=ric-plt/xapp-frame.git;a=blob;f=pkg/xapp/subscription.go in the xapp framework for go does construct it like this, for example:
host = fmt.Sprintf("service-%s-submgr-http.%s:8088", pltnamespace, pltnamespace)
using kubectl you see the mapped IP address via the endpoints API: "kubectl get endpoints -n ricplt |grep submgr" like in the example below, but within the submgr client pod the DNS name should be used.
service-ricplt-submgr-http 10.244.0.43:3800 110d
service-ricplt-submgr-rmr 10.244.0.43:4560,10.244.0.43:4561 110d
菜芽
Thank you reply very much!
allan martins
Hello there,
Your reply to the previous post was very useful! I was wondering if you can help on assembling the request.
I design a json request following the format specified in https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-submgr/en/latest/user-guide.html which also matches the one in the xapp_rest_api.yaml (the swagger definition) in the xapp-frame.go and I aways get an error from the json unpacking in the subscription manager (see figure bellow)
I also notice a similar error happening in the bouncer xapp in the ric_benchmark e2 simulator.
Can you help on any way on this matter?
Thank you in advance!
PS.: This screenshoot was taken using ipython on a dummy xapp just to have access to the submgr service. I find it very very useful to have an interactive prompt with all the xapp-frame, rmr, sdl, etc infrastructure.
菜芽
Could you tell me what is the subscribe url? I cannot find the subscribe request url in https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-submgr/en/latest/user-guide.html .
Thank you in advance!
allan martins
Hello,
The url to subscribe seems to be this one:
url = "http://service-ricplt-submgr-http.ricplt:8088/ric/v1/subscriptions"
If you do a GET on it, you read the subscriptions. If you do a POST, you subscribe the gnodeb indicated in the json you send in the request body.
I'm having problem with that json... I follow exactly the same format in the documentation but I aways get an error as a response (see figure in my previous post).
If you have more luck in subscribing, I would appreciate if you post the json you sent here.
Thanks!
菜芽
Your reply is very helpful for me. I will try make a http subscription request as you say and check the problem.
Anssi Mannila
Hi,
I can't see what is the problem. It seems like that json body string in the request is not correctly formulated or the request path in not correct. I think that the request does not reach Submgr code but is rejected already in Swagger generated code part. It does basic message validation. To see does message reach Submgr, logger level in Submgr config map would need to be change to 4. Submgr user guide has instructions how to edit the config map.
I quickly repeated the test using Curl command. I generated the json body data using Golang code. Json data is sent from a file. Note that the elements in the message may not be in same order! Request itself worked but as there was no running simulator in my test environment, Submgr did not accepted the request. E2 interface was down for the Meid. Also when I used the Curl tool, there is no real xapp. Message in this case would require to have RMRRoutingNeeded = false, otherwise request will fail due to missing real xapp, where route would be tried to create.
subscription_req_msg_hello_world.json
allan martins
Hello Anssi Manilla,
Thank so much for your answer! Your example was perfect!!
I tested with curl to the subscription manager and it worked like a charm!!
Now the problem I'm having is that it still does not work using a request from python (see figure). Its like requests.post is "formatting" the json in a way that the swagger parser rejects is...
I'll do more tests. But anyway, thank you very very much for your help!!!
allan martins
Regarding my previous response, I figured the problem.. I was a silly mistake... python requests need a dict object I was passing a string so the subscription manager was receiving a "escaped" json string instead of a pure one.
Thank you again Anssi Mannilla for the answer!
菜芽
hello, allan. Which RIC release version you install? D or E version ?
allan martins
I'm using D release with everything setup to use helm3 (I don't even have helm2 installed). dms_cli for all deployments and a local repository for the charts
菜芽
Thank your reply very much!
菜芽
Hello, Anssi . Can xApp can use rmr to launch subscribtion request ? If can , where can i find the example ?
Thoralf Czichy
During F release we will remove the RMR support for subscriptions - and the only xapp subsciption interface is the REST interface. xapp framework for go already supports only teh REST based one.
The old RMR based one is still described in the sub mgr documentation: https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-submgr/en/latest/user-guide.html → click "user guide (old)" in the left-hand side content list.
The bouncer xapp still uses RMR, but is just right now being modified: https://gerrit.o-ran-sc.org/r/q/project:ric-app%252Fbouncer
allan martins
Hello Mr. Czichy,
I'm using a REST based subscription but Im having the following error in the submgr:
(CREATE routeinfo(2/[service-ricxapp-bouncer-xapp-rmr.ricxapp:4500]) failed with error: [POST /handles/xapp-subscription-handle][400] provideXappSubscriptionHandleBadRequest ")
I checked the body of the post the is seems to pass the swagger validation. Since either REST (out xapp) and rmr bouncer xapp) are having the same error. I wonder if it is something on my deployment...
Can you shed some light on this one?
Thanks!
This is the error when we try the bouncer xApp
{"ts":1646395075001,"crit":"INFO","id":"submgr","msg":"AssignToSubscription subs.EpList.Size()=1"}
{"ts":1646395075003,"crit":"ERROR","id":"submgr","msg":"CREATE routeinfo(2/[service-ricxapp-bouncer-xapp-rmr.ricxapp:4500]) failed with error: [POST /handles/xapp-subscription-handle][400] provideXappSubscriptionHandleBadRequest "}
{"ts":1646395075003,"crit":"ERROR","id":"submgr","msg":"XAPP-SubReq: transxapp(trans(1/meid(RanName=gnb_130_000_b5c67788))/transkey(service-ricxapp-bouncer-xapp-rmr.ricxapp:4500/0846930886)/0) err(RTMGR route create failure)"}
And this is the error with out subscription xApp
{"ts":1646396525236,"crit":"INFO","id":"submgr","msg":"AssignToSubscription subs.EpList.Size()=1"}
{"ts":1646396525243,"crit":"ERROR","id":"submgr","msg":"CREATE routeinfo(3/[service-ricxapp-hello-subscription-xapp-rmr.ricxapp:4500]) failed with error: [POST /handles/xapp-subscription-handle][400] provideXappSubscriptionHandleBadRequest "}
{"ts":1646396525243,"crit":"ERROR","id":"submgr","msg":"XAPP-SubReq Assign error: transxapp(trans(2/meid(RanName=gnb_130_000_b5c67788))/transkey(service-ricxapp-hello-subscription-xapp-rmr.ricxapp:4500/25v97Y4Cszl6zhxaB2PJrl6DFT1)/0) err(RTMGR route create failure)"}
Lianjun Li
Dear Mr. Czichy Thoralf Czichy ,
When running the HWxApp, I encountered the same issue as Allen mentioned above, as the issue comes from the routing manager, I also checked the log from it, the error message is:
{"ts":1647367600487,"crit":"ERROR","id":"rtmgr","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"1","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2022-03-15T18:06:40"},"msg":"XApp instance not found: service-ricxapp-hwxapp-rmr.ricxapp:4560"}
{"ts":1647367600487,"crit":"ERROR","id":"rtmgr","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"1","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2022-03-15T18:06:40"},"msg":"RoutingManager->SubManager Add Request Failed: XApp instance not found: service-ricxapp-hwxapp-rmr.ricxapp:4560"}
Seems the rtmgr doesn't recognize the xApp, but I am sure the xApp is running (I can see it by kubectl get pods -A).
So I tried to manually get xApp list from appmgr, the list is empty:
root@lianjun:~# kubectl get endpoints -A
NAMESPACE NAME ENDPOINTS AGE
...
ricplt service-ricplt-appmgr-http 10.244.0.138:8080 8d
ricplt service-ricplt-appmgr-rmr 10.244.0.138:4560,10.244.0.138:4561 8d
ricxapp service-ricxapp-hwxapp-rmr 10.244.0.158:4561,10.244.0.158:4560 7m54s
...
root@lianjun:~# curl -i -X GET http://10.244.0.138:8080/ric/v1/xapps
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 16 Mar 2022 19:54:49 GMT
Content-Length: 3
Connection: close
[]
root@lianjun:~#
Is there some issue with the appmgr? any pointer would be appreciated.
One thing to mention is that I modified the routes file in HWxAPP as below, so the RIC-SUB-REQ message will be forwarded to submgr instead of directly to E2-terminal.
newrt|start
rte|20011|service-ricplt-a1mediator-rmr.ricplt:4562
rte|20012|service-ricplt-a1mediator-rmr.ricplt:4562
rte|12010|service-ricplt-submgr-rmr.ricplt:4560
newrt|end
Sungmin Jo
Thank you for detailed explain.
Can I get to know the port info without code?
In your guide, we can get pod IP using 'kubectl get pod -A -o wide' and port info from "line 69 ~~~~~~, host = fmt.Sprintf("service-%s-submgr-http.%s:8088", pltnamespace, pltnamespace)'
But it's too dificult to know the port info from code.
So is there any easy way to get port info? Something like 'kubectl get pod -A -o wide' for pod id.
Thoralf Czichy
I think there's no standard way to handle this. I think this would typically be a matter of the owner of the container documenting it or make it visible in the container/pod configuration.
Anssi Mannila
You problem may be in the ClientEndpoint.RMRPort in the REST request which xApp sends to Submgr.
CRESTSubscriptionRequest
SubscriptionID = ''
ClientEndpoint.Host = service-ricxapp-ueec-http.ricxapp
ClientEndpoint.HTTPPort = 8080
ClientEndpoint.RMRPort = 4560
Meid = gnb_208_092_303030
...
{"ts":1639992541519,"crit":"DEBUG","id":"submgr","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"1","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-12-20T09:29:01"},"msg":"CREATE transxapp(trans(0/meid(RanName=gnb_208_092_303030))/transkey(service-ricxapp-ueec-rmr.ricxapp:4560/22Xmw9MpIMGzZgmxuyOjFoEJuWf)/0)"}
Lianjun Li
Hi Anssi Mannila,
Thank you for the suggestion, let me check it, will update you.
Lianjun Li
Hi Anssi Mannila,
It turned out that the xApp was not registered in the appmgr, after registering the xApp, now the subscription works.
Kamil Kociszewski
Hi all,
after getting through all steps provided in this discussion, im stuck. (release D)
I see that subscription with id=5 is successful, but there is also subscription with id=6, i don't understand from where, and its failed.
root@os-node-2:~/it-dep/xapps/ric-app-hw/init# curl -i -X GET "http://10.244.0.135:8088/ric/v1/subscriptions"
HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 01 Apr 2022 12:50:13 GMT
Content-Length: 143
Connection: close
[{"ClientEndpoint":["service-ricxapp-hwxapp-rmr.ricxapp:4560"],"Meid":"gnb_208_093_00000010","SubscriptionId":5,"SubscriptionInstances":null}]
kubectl logs -n ricplt deployment-ricplt-submgr-545bdf8896-cnrj9 -f
root@os-node-2:~/it-dep/xapps/ric-app-hw/init# curl -i -X GET http://10.110.141.61:8080/ric/v1/xapps
HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 01 Apr 2022 13:04:44 GMT
Content-Length: 602
Connection: close
[{"instances":[{"ip":"service-ricxapp-xappkpimon-rmr.ricxapp","name":"xappkpimon","policies":null,"port":4560,"rxMessages":["RIC_SUB_RESP","RIC_INDICATION"],"status":"deployed","txMessages":["RIC_SUB_REQ"]}],"name":"xappkpimon","status":"deployed","version":"1.0.0"},{"instances":[{"ip":"service-ricxapp-hwxapp-rmr.ricxapp","name":"hwxapp","policies":[1],"port":4560,"rxMessages":["RIC_SUB_RESP","A1_POLICY_REQ","RIC_HEALTH_CHECK_REQ"],"status":"deployed","txMessages":["RIC_SUB_REQ","A1_POLICY_RESP","A1_POLICY_QUERY","RIC_HEALTH_CHECK_RESP"]}],"name":"hwxapp","status":"deployed","version":"1.0.0"}]
Thoralf Czichy
Also make sure the xApp is registered in the app manager. Without registration subscriptions will not work. This output suggests it is not regsitered
$ curl -i -X GET http://10.244.0.138:8080/ric/v1/xapps //IP = appmgr IP
[]
Lianjun Li
Hi Mr. Czichy Thoralf Czichy,
That's exactly what I am searching for now, how to register a xApp in the appmgr?
I am using dms_cli tool to onboard and install xApps following this instruction: https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/installation-guides.html#ric-applications
The HW xApp can be onboarded and installed successfully, but seems it is not registered in the appmgr, I can not find any documentation regarding how to register xApp in the appmgr, actually, I can not find any documentation talks about appmgr, could you give me a pointer on this, really appreciated.
Lianjun Li
Hi Mr. Thoralf Czichy,
I found how to register xApp in the appmgr from the user_guide_v2, now the subscription works, thank you for the insight.
allan martins
Hello Lianjun Li . Could you share how are you subscribing? In my case I am registering the app but my subscription still fails. Actually, even the route manager is not accepting routes via API. If I raise the app without a routing table, the app gets stuck because the route manager does not accept the route I create for the app.
Thank you!
Lianjun Li
Hi allan martins,
In short, I am using HWxApp, while initializing, it creates a subscription-handler, and send subscription request through the subscription-handler member function. You can modify the RIC-SUB-REQ content there, e.g., I am testing the REPORT service, so I set the ric-action-type to 0.
Also, I modified the hw/init/routes.txt file in HWxAPP as below, so the RIC-SUB-REQ message will be forwarded to submgr instead of directly to E2-terminal.
newrt|start
rte|20011|service-ricplt-a1mediator-rmr.ricplt:4562
rte|20012|service-ricplt-a1mediator-rmr.ricplt:4562
rte|12010|service-ricplt-submgr-rmr.ricplt:4560
newrt|end
After registering the HWxApp in the appmgr, I first connect the E2 agent (in gNB) to RIC, then start the xApp. I can see the RIC-SUB-REQ and RIC-SUB-RESPONSE success message in the submgr log. And I can see the Indication messages received at the xApp.
I am using Dawn release for both near-real-time RIC and HWxApp.
The E2 agent and gNB in my platform are from OAI Mosaic5G team.
allan martins
Hello Lianjun Li,
Thank you very much for the reply! I'll see why my version does not work (since I have a setup close to what you are describing). One thing that is different is that I'm using the python version of the substitution library.
Another case is when we are closer to the production setup (no routes.txt) did you try something like that? (use no route table at al?)
Thanks!
Lianjun Li
Hi allan martins
You are welcome, I will try hw-python next, after all, python is much easier to write xApps.
Regarding the routing, I am not an expert on the routing manager mechanism, so I just use this default setting with routes.txt file.
I think this routes.txt is just for the initial routing table, later the routing manager will create a dynamic routing table, which is much larger than the initial one.
Kamil Kociszewski
Lianjun Li
i'm also working with E2 agent and gNB from OAI Mosaic5G team.
Currently, i'm trying to get subscription between osc kpimon and e2-agent. For HWxAPP, i got successfull subscription exchange.
i'm trying to collect KPI metrics from OAI gNodeB to test Anomaly Detection Use Case with real data.
maybe you already run it successfully?
(what is need to be add here that we don't connected UE yet to OAI due to RACH problems)
I'm getting error:
"test_agent: /root/flexric/flexric/src/agent/plugin_agent.c:313: sm_plugin_ag: Assertion `key > 0 && "Reserved value"' failed."
(run test_agent → setup successful - >restart kpimon xapp → error)
where KPImon sends subscription request with default value ran_func_id == 0
"err := c.sendRicSubRequest(1001, 1001, 0)"
i also checked other ran_func_id (1,142,143,144,145)
i got some output data from E2-agent
//(printf("ran_func.id from SETUP %d\n", ran_func[i].id);)
ran_func.id from SETUP 142
ran_func.id from SETUP 143
ran_func.id from SETUP 144
//(for this ID return after sub_req: test_agent: /root/flexric/flexric/test/test_agent.c:37: read_RAN: Assertion `rd_if->type == MAC_STATS_V0 || rd_if->type == RLC_STATS_V0' failed.)
ran_func.id from SETUP 145
//(for this ID return after sub_req: test_agent: /root/flexric/flexric/test/test_agent.c:37: read_RAN: Assertion `rd_if->type == MAC_STATS_V0 || rd_if->type == RLC_STATS_V0' failed.)
[E2AP] Sending setup request
[E2-AGENT]: SETUP-RESPONSE received
for ran_func_id = 1
test_agent: /root/flexric/flexric/src/agent/plugin_agent.c:324: sm_plugin_ag: Assertion `it != end_it && "RAN function ID not found in the RAN"' failed.
Lianjun Li
Hi Kamil Kociszewski,
I haven't looked into the KPIMON xApp, but I don't think any xApp from ORAN-SC can work with FlexRIC E2 agent out-of-the-box, because the SM, which expose RAN functions to xApp, should come in pair, one in the E2 agent (in gNB), one in the SC-RIC (xApp), so you need to either modify the SM in E2 agent, or modify the SM in the KIPMON, so they can understand each other.
The error message is an example, the FlexRIC E2 agent currently only supports RAN function ID 142, 143, 144, but the xApp asks for ID 0, the E2 agent doesn't understand the request from xApp.
Kamil Kociszewski
thank you Lianjun Li ,
one more question, maybe stupid, i can't find any document with RAN functions descriptions that I can resolve this id's
maybe you can help also here?
Lianjun Li
Hi Kamil Kociszewski,
I believe those function IDs are defined by FlexRIC, you can read their code, 142, 143, 144 are for MAC, RLC, PDCP statistic reports.
Kamil Kociszewski
Thank you,
did you manage to collect KPIs in other way than kpimon?
Lianjun Li
I just modified the HWxApp, it receives the indication message from E2 agent, depending on which RAN function ID (142/143/144) you are requesting, the indication message has all MAC/RLC/PDCP KPIs.
Kamil Kociszewski
Hi,
can you share your HWxAPP modification to expose mentioned KPIs?
Kamil Kociszewski
Hi Lianjun Li,
how do you run OAI with E2-Agent?
do you also used specific branch and patched OAI with this commands?
mosaic5g / Flexric · GitLab (eurecom.fr)
We facing problem with applying patch.
Lianjun Li
Hi, Kamil Kociszewski,
Yes, I follow that wiki page you mentioned without any issue.
Maybe you can ask about the problem in their mail list.
Kamil Kociszewski
did you used B210 USRP?
Lianjun Li
Currently, I am using rfsimulator, will use B210 later.
Kamil Kociszewski
Hi Lianjun Li,
can you share command for run rfsimulator that will deliver KPI data to RIC?
currently, i'm not sure if i running simulator with correct settings:
-E RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O ue.sa.conf
[0m[0m[93m[RLC] [mac_rlc_status_ind] Radio Bearer (channel ID 4) is NULL for UE with rntiP 1234
[0m[0m[NR_PHY] Number of bad PUCCH received: 512
[0m[0m[NR_MAC] Frame.Slot 640.0
UE ID 0 RNTI 1234 (1/1) PH 0 dB PCMAX 0 dBm, average RSRP -141 (8 meas)
UE 0: dlsch_rounds 160/160/160/159, dlsch_errors 159, pucch0_DTX 639, BLER 0.00000 MCS 0
UE 0: dlsch_total_bytes 199840
UE 0: ulsch_rounds 160/160/160/159, ulsch_DTX 639, ulsch_errors 159
UE 0: ulsch_total_bytes_scheduled 199840, ulsch_total_bytes_received 0
[qSkipTool]2022/04/27 13:42:41 control.go:367: -----------RIC Indication Message-----------
[qSkipTool]2022/04/27 13:42:41 control.go:368: StyleType: 0
[qSkipTool]2022/04/27 13:42:41 control.go:370: RIC Indication Message Format: 1
[qSkipTool]2022/04/27 13:42:41 control.go:374: PMContainerCount: 1
[qSkipTool]2022/04/27 13:42:41 control.go:385: PMContainer[0]:
Lianjun Li
Hi Kamil Kociszewski,
Sorry for the late response, my command for nrUE is:
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa -O path/to/openairinterface5g/ci-scripts/conf_files/ue.sa.conf --nokrnmod -E
I think it is the same as yours.
Francisco Javier Curieses Sanz
Dear all,
I´m trying to interconnect E2Agent from OAI (Mosaic5G) with nearRT RIC from OSC.
Do you have any idea how I can interconect both components?
Now, I have OAI´s RIC deploy in the same server of OSC´s RIC. I suposse that I need to interconnect OAI´s E2Agent with the interface E2Term from OSC, but I don´t have any idea.
Can you help me?
Thanks in advance.
Best regards,
Kamil Kociszewski
You need to expose IP ports of E2
just use a script with 1 as argument
#!/bin/bash
if [ $# -ne 1 ]; then
echo "need one parameter"
exit
fi
killall socat
set -x
ip=$(kubectl describe pods -nricplt deployment-ricplt-e2term-alpha | awk '/IP:/{print $2; exit}')
echo $ip
for (( c=0; c<$1; c++ )); do
let port=36421+$c
nohup socat SCTP4-LISTEN:$port SCTP4:$ip:36422 &
done
netstat -tulpnS
Francisco Javier Curieses Sanz
Thanks for the answer Kamil.
I just got it to interconnect both components.
I have modified two files in OAI´s RIC:
1. /flexric/flexric.conf >> put the IP of the service-ricplt-e2term-sctp-alpha from the RIC OSC.
2. /flexric/src/agent/e2_agent_api.c >> in line 71, change the port for the service-ricplt-e2term-sctp-alpha´s port, in my case 36422.
You can test it with the file /flexric/build/test/test_agent, and view the logs of e2term.
Rebecca Aben-Athar
Hi, Lianjun Li
I am using Dawn release for both near-real-time RIC and HWxApp, and I have some doubt. Can you help me?
I'm using the dms_cli tool to integrate and install xApps according to these instructions: https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-ric-dep/en/latest/installation-guides.html
The xapp i'm using is ric-app-hw: https://github.com/o-ran-sc/ric-app-hw/tree/dawn
I found this article showing how to register xApp in appmgr (since in user-guide-new I just found out how to register in submgr): https://wiki.o-ran-sc.org/download/attachments/17269011/xApp_Writer_s_Guide_v2.pdf?version=4&modificationDate=1625642899082&api=v2 in section "3.1 Registering/De-registering Xapp"
However, in appmgr and submgr registry, http endpoint is requested, which is not found in xApps D version in config-file.json (rmr endpoint only) but in other versions
config-file.json: https://github.com/o-ran-sc/ric-app-hw/blob/dawn/init/config-file.json
How did you do it?
Lianjun Li
Hi Rebecca Aben-Athar,
Below is my setting for registering xapp in the appmgr:
"httpEndpoint": "service-ricxapp-hwxapp-rmr.ricxapp:8080",
"rmrEndpoint": " service-ricxapp-hwxapp-rmr.ricxapp:4560",
Also, I don't think I use the D version of hwapp, I just use the master branch.
Sungmin Jo
Hi,
I'm trying to subscription with xApp in E release nearRT RIC.
Since E release subscription message is communicated in REST instead of RMR. (RMR is available in E but it will be disabled)
So, I want to know the meaning of variables in subscription reqeust REST msg and how to define the value.
I think it's unique value in own xApp. Is it correct?
Thoralf Czichy
a b it cryptic in https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-submgr/en/latest/user-guide.html
"From xApp point of view xApp instance id identifies response REST notification for the E2 subscription in the REST request..... xApp need to be able preserve Subscription Manager allocated REST request id over xApp restart. The id is needed for deletion of the REST subscription and if there is need to resend the same REST request."
I.e., anything that is unique over time within that xapp instance will do. E.g., a increasing counter. If you generate lots of long-valid subscriptions, then you need to manage the instance IDs in a more sophisticated way than a counter as the counter will quickly wrap around (range 0...2^16-1)
openAPI/swagger defintion: https://gerrit.o-ran-sc.org/r/gitweb?p=ric-plt/xapp-frame.git;a=blob;f=api/xapp_rest_api.yaml
Sungmin Jo
Thank you for reply.
Is it ok to duplicate with other xapp's value?
I mean,
A xApp generates XappEventInstanceID as '1'.
And B xApp also generates XappEventInstanceID as '1'.
In this case, is it allowed for subscription manager side?
Anssi Mannila
Hi
XappEventInstanceID identifies E2 subscription inside REST Subscription Request. One request can contain multiple E2 subscriptions. XappEventInstanceID is returned to xApp in notification when E2 subscription is ready. xApp knows for which E2 subscription the notification belongs. xApp A and xApp B can use the same value.
Anssi
Sungmin Jo
Thanks
This is exactly what I want to know ^^
Sungmin Jo
I wanna find out meaning of ricRequestorID in RicRequestID.
RIC Request ID has two variables.
ricInstacneID and ricRequestorID.
ricInstanceID is used as SubID in routing table.
But I can't find where is ricReuestorID used.
Can I know the meaning and usage for ricRequestorID?
Thoralf Czichy
I think we eventually will develop it in a direction that the ricRequestorID is used by xApps to identify themself when sending, for example, control messages.
In relation to subscriptions (created by the sub mgr - acting a bit like an xApp) we always use the static ricRequestorID=123 just because we have to fill one in.
But currently ricRequestorID isn't really used and we will in 123 for messages that are send by the sub mgr and for xApps, I think, it should currently not matter what they actually fill in when sending control messages.
Sungmin Jo
Thank you for reply.
Currently we use static 123 value from sub mgr in the meantime. But it will be change to using the value from each xApp. (we don't know when it be coming)
when that times come, XappEventInstanceID is used to send ricRequestorID value from xApp to subMgr through Rest Subscription Message?
Is my understanding correct?