Selection of device/message type is not available in Java app
seffylmz opened this issue · 32 comments
Hello,
can you please re-check the following configurations?
For "iotmms" java application:
- IoT-MMS-User role should be assigned to your HCP user (a user is specified without trial prefix)
- authentication configuration is "custom" and "user name and password" option is selected for "Form"
For "starterkit" java application:
- "iotrdms" destination is present, you user is specified without trial prefix, password is correct and truststore is selected
Regards,
Anton
P.S. Consider to restart the apps afterwards if you would need to do some changes.
Hello Anton,
thanks for your answer.
All configurations except the authentication configuration were the same. I have edited it but unfortunately after restart of both Java apps I got the same problem as well.
Regards,
Sefa
Hm, can you please then do the following:
- open your browser in incognito mode;
- access your starterkit app url: https://iotstarterkit%YOUR_USER_ID%trial.hanatrial.ondemand.com/com.sap.iot.starterkit.ui/
a SAP logon page should be shown, enter your credentials but do mark "remember me" option, submit; - open a second tab in the same browser;
- access your iotmms app url: https://iotmms%YOUR_USER_ID%trial.hanatrial.ondemand.com/com.sap.iotservices.mms/ this should log on you automatically;
- in iotmms press log off button (top right)
- go to first tab with "iotstarterkit" and refresh the page
Regards,
Anton
Can you please update your MMS first? Click on top right tile to open IoT Cockpit. Version 2.3.0 should be available there.
After refreshing the "iotstarterkit" page the logon page appears again.
And if you logon, then you get the same error message in UI?
Yes, I get the same failure.
Hi Sefa,
may I please ask you to check one more thing for me? Open your IoT RDMS in the browser via https://iotrdmsiotservices-%YOUR_USER_ID%trial.hanatrial.ondemand.com/com.sap.iotservices.dms/v1/api/devices
The result should be a json string listing your devices, smth like [{"id":"5bded13c-7137-43ab-9091-434e14f62b24","name":"Demo Device","device_type":"0d961467a9ea302f7f7d"}]
Thanks for your patience,
Anton
Sure, here it is:
[{"id":"fb3da2c8-f56a-45e7-9776-dd213cf18189","name":"MyGroPi","device_type":"3cfc68719fd7b3719f34"}]
Kind regards,
Sefa
Hello ,
Did you got any solution ?
I am facing the same issue .
Thanks
Romit
Hi Sefa, hi Romit,
the problem as you might guess is that "starterkit" app cannot authenticate itself against "rdms" via the destination. As a response it gets the html (logon page) instead of json (a list of devices). Unfortunately, I still cannot reproduce it on my side. Tried out all possible combinations with two browsers (Chrome and FF), incognito and normal mode and three RTs Java EE 6 Web Profile, Java Web and Java Web Tomcat 7.
Can you maybe try the "dirty" path?
- delete the "starterkit" java app completely
- deploy it new (a war file)
- import and configure destinations
- bind "starterkit" to "iotmms" schema
- start the "starterkit" java app
Thanks,
Anton
I tried all what you said. Additionally I delete all Java apps, iotmms as well and deploy all step for step once again but nothing succeeded.
Do you have any other ideas? I'm not going to give up.
Thanks,
Sefa
The values are the same as yours.
Kind regards,
Sefa
Hi Sefa,
can you please drop me a short e-mail (my address is visible now on my github profile page)? I would like to exchange our HCP accounts IDs. As a first step to check out the logs for your account.
Regards,
Anton
Hello,
I have a similar problem. When I go to the link of the java application I get this Error
500 Internal Server Error Failed to forward a GET response from the destination to an origin.
If I paste the link of rdms in the browser I get the json string.
[{"id":"1764772f-f48c-43b8-8436-ff41348d7796","name":"RasPi2","device_type":"7fedb45c8b1dbb30796c"}]
If but if I open it in the Postman app I get
Malformed JSON: Unexpected '<'
Sorry, I get it right now in Postman. But the 500 Error still persists.
@lukazorc according to output it is a different problem. can you please make a screenshot of your destinations for "starterkit" app?
@lukazorc In the logs I see that your "starterkit" tries to access the following RDMS link: https://iotrdmsiotservices-%YOUR-P-USER%trail.hanatrial.ondemand.com/com.sap.iotservices.dms/v1/api/devices (where you have "trail" and not "trial" specified at the end you your P-USER). On the screenshot it is correct. If you have changed that typo after app was started, please consider to restart it.
I also see that "iotmms" URL is incorrect on the screenshot. "trial" postfix is missing at the end of your P-USER
Regards,
Anton
Hi,
I am also getting the same error after opening the GUI application.
It was working totally fine before. I think it started giving an error after upgrading MMS to version 2.1. Now I have upgraded to the latest 2.3 version. Still I am facing the same issue. All the configurations are correct.
I thought it might be some auth issue because of the words "Relay State" in the big message string.
But now I think it is an RDMS issue.
Can you please help me?
Regards,
Gayatri
Hi Sefa, hi Gayatri,
can you pls check the following for me?
In HCP Cockpit -> Services -> Internet of Things Services -> Configure Internet of Things Services -> Roles -> Unassign your HCP user from IoT-User role.
- In "starterkit" UI you should get a message popup saying smth like "500 internal server error. failed to forward GET response..." and in the logs for "starterkit" app a message like "Server returned HTTP response code: 403 for URL: https://iotrdmsiotservices-%YOUR-USER-ID%trial.hanatrial.ondemand.com/com.sap.iotservices.dms/v1/api/devices"
Is it the same for you?
Afterwards, you may assign your user back and check the result again.
Thanks,
Anton
Hi Anton,
I get the same failure again. So nothing what you enumerate.
Kind regards,
Sefa
@lukazorc according to logs, your configuration issue is resolved. can you please confirm shortly? Thanks, Anton
@gadregayatri @rainaromit can you please tell if an issue is still valid on your side? Thanks, Anton
I am still facing the same issue.
@gadregayatri Can you please drop me a mail (visible in my GitHub profile) and include your HCP account ID and the exported "iotrdms" destination file of your "starterkit" app? I create a list of accounts where that issue occurs.
Thanks,
Anton
Hi Anton,
I have emailed you the details.
Thank you for the help! :)
-Gayatri
Dear user(s),
this ticket is inactive since October 26, 2015. We are therefore closing it.
If your issue still persists, please feel free to reopen this ticket for further processing. In case you were asked to provide additional information by the processor, please do so when reopening the ticket.
Best regards,
IoT StarterKit Team