on 01-10-2017 3:46 AM - last edited on 02-03-2024 5:17 PM by postmig_api_4
Hello experts,
I was following this iot service tutorial
https://www.youtube.com/watch?
v=SigA9SI8Xyc&list=PLkzo92owKnVxzjoxwJdaa400E_UqkzE8J&index=10
When I try to activate the iotaccess.hdbrole file, I have this error:
Error while activating /iotmmsxs/iotaccess.hdbrole:
[iotmmsxs:iotaccess.hdbrole] insufficient privilege: Not authorized at /sapmnt/ld7272/a/HDB/jenkins_prod/workspace/HANA__FA_CO_LIN64GCC48HAPPY_rel_fa~hana1sp12/s/ptime/query/checker/query_check.cc:3713
I followed the solution from this thread to give _SYS_REPO user the access to "SYSTEM", it didn't solve the issue.
Hello Jonas, I cannot really comment on your direct question but if you are trying to replicate the IoT consumption example with XSODATA/XSJS [1] then please be advised that iotaccess.hdbrole file is not needed anymore with MDC setup. It was removed from the StarterKit resources [2].
Regards, Anton
[1] https://github.com/SAP/iot-starterkit/tree/master/src/apps/xs/consumption
[2] https://github.com/SAP/iot-starterkit/tree/master/src/apps/xs/consumption/iotmmsxs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
StarterKit itself is a tutorial, all use cases are described in READMEs. For example, XSJS/XSODATA case https://github.com/SAP/iot-starterkit/tree/master/src/apps/xs/consumption
Dear Anton Levin,
After giving iotmmsxs::Basic Application privilege, i am facing same issue. below error:
We could not find the resource you're trying to access.
It might be misspelled or currently unavailable.
Dear Anton Levin,
I using below code for hdb role:
role HANA.IoTDemo.IoTApp::iotservice { application privilege: HANA.IoTDemo.IoTApp::Basic; catalog schema "SYSTEM" : SELECT; }
Error while activating /HANA/IoTDemo/IoTApp/iotservice.hdbrole:
[HANA.IoTDemo.IoTApp:iotservice.hdbrole] insufficient privilege: Not authorized at /sapmnt/ld7272/a/HDB/jenkins_prod/workspace/HANA__FA_CO_LIN64GCC48HAPPY_rel_fa~hana1sp12/s/ptime/query/checker/query_check.cc:3716
If i change schema name to _SYS_BIC its activating
role HANA.IoTDemo.IoTApp::iotservice { application privilege: HANA.IoTDemo.IoTApp::Basic; catalog schema "_SYS_BIC" : SELECT; }
File /HANA/IoTDemo/IoTApp/iotservice.hdbrole saved & activated successfully.
Thanks,
Dear Anton Levin,
I have tried same procedure using below reference.
https://github.com/SAP/iot-starterkit/tree/master/src/apps/xs/consumption
1.xsaccess
{ "exposed" : true, "authentication" : [ { "method" : "Form" } ], "authorization" : [ "iotmmsxs::Basic" ] }
2.xsprivileges
{ "privileges" : [ { "name" : "Basic", "description" : "Basic IoT MMS privilege" } ] }
3.xsjs
var sBody = ''; var oConnection = $.hdb.getConnection(); var sQuery = 'SELECT * FROM "SYSTEM"."T_IOT_DB22E9760F758A2571A5"'; var oResultSet = oConnection.executeQuery(sQuery); for(var i = 0; i < oResultSet.length; i++) { sBody += oResultSet[i].G_DEVICE + ' | ' + oResultSet[i].G_CREATED + ' | ' + oResultSet[i].C_VALUE + ' | ' + oResultSet[i].C_TIMESTAMP + '\n'; } oConnection.close(); $.response.status = $.net.http.OK; $.response.contentType = "text/plain"; $.response.setBody(sBody);
4.xsodata
service { "SYSTEM"."T_IOT_DB22E9760F758A2571A5" key generate local "C_OPCODE"; }
5.Given iotmmsxs::Basic to Application privilege.
After this also i am getting below error while executing.
We could not find the resource you're trying to access.
It might be misspelled or currently unavailable.
Were those XS resources activated successfully?
Dear Anton Levin,
All xs files are saved and activated.
[22:51:19] File /iotmmsxs/.xsaccess saved & activated successfully.
[22:51:29] File /iotmmsxs/.xsprivileges saved & activated successfully.
[22:51:44] File /iotmmsxs/iotservice.xsjs saved & activated successfully.
[22:51:50] File /iotmmsxs/iotservice.xsodata saved & activated successfully.
.xsapp as well?
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.