Skip to Content
0

Can't Activate hdbrole file

Jan 10, 2017 at 03:46 AM

1.4k

avatar image
Former Member

Hello experts,

I was following this iot service tutorial

https://www.youtube.com/watch?

v=SigA9SI8Xyc&list=PLkzo92owKnVxzjoxwJdaa400E_UqkzE8J∈dex=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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Anton Levin
Jan 10, 2017 at 06:18 AM
0

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

Show 10 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Anton,

Thank you for the information. I must have followed the old tutorial. Do you know if there any new tutorials for the iot starterkit by any chances?

Thanks,

Jonas

0

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

0

Dear Anton Levin,

After giving iotmmsxs::Basic Application privilege, i am facing same issue. below error:

404 - Not found

We could not find the resource you're trying to access.

It might be misspelled or currently unavailable.

0

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,

0

Hello Pradeep, if you try replicate an XS example from the IoT StarterKit, then I have the same answer I gave on January, 10 to Jonas: ".hdbrole file is not needed anymore" Regards, Anton

0

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.

404 - Not found

We could not find the resource you're trying to access.
It might be misspelled or currently unavailable.

0

Were those XS resources activated successfully?

1

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.

0

.xsapp as well?

1

Yes,

[23:13:01] File /iotmmsxs/.xsapp saved & activated successfully.

0