sap-tutorials / Issues

Creative Commons Attribution 4.0 International
6 stars 4 forks source link

[Deploy CAP with SAP HANA Cloud project as MTA] Updating service "MyHANAApp-xsuaa-service" #345

Closed LarsVlyminckx closed 3 years ago

LarsVlyminckx commented 3 years ago

Tutorials: https://developers.sap.com/tutorials/hana-cloud-cap-deploy-mta.html

Hi

I'm currently following this tutorial but I'm stuck at Step 3: Deploy your application to SAP BTP, Cloud Foundry runtime

When I want to deploy my app I get this error: Updating service "MyHANAApp-xsuaa-service"... Service operation failed: Controller operation failed: 502 Updating service "MyHANAApp-xsuaa-service" failed: Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker xsuaa failed with: org.springframework.cloud.servicebroker.exception.ServiceBrokerException: Error updating application myhanaappfinal!t85382 (Cannot change AppId with update.)

Any idea how to fix this?

If you need more information, I'll gladly give it.

Thanks in advance.

Lars

jung-thomas commented 3 years ago

Interesting that it wouldn't update the service. That worked a few weeks ago. In fact if you didn't change the application ID you received this error: Therefore if you package the complete application and deploy it; when trying to deploy the UAA service instance again you will receive an error that the Application with the given name already exists. image

You can try removing the final from the id in the xs-security.json but I think that will just go back to this previous error. If the service broker will no longer allow updating either then the only option left is to delete the myHANAApp-xsuaa-service before you deploy. You can do that from the command line with a cf delete-service before you deploy.

LarsVlyminckx commented 3 years ago

It is working! I removed the "final" and I could deploy it. But now the local isn't working anymore. I get this error page image How can I fix this? Or do I to create a new uaa or?

jung-thomas commented 3 years ago

Well that's the thing, once you deploy the final MTA into the same space the local test with the XSUAA won't work any longer. Normally you would have separate spaces for this. You could leave the redirect_url in the xs-security.json if you don't mind it being there in the deployed version. It's technically less secure and not something you'd want to deploy into production for real; but if you just want both to run within a trial space this is an acceptable risk.

LarsVlyminckx commented 3 years ago

So I added the redirect_url back in the xs-security.json but now I have this error "again" image

jung-thomas commented 3 years ago

I guess if you really want to deploy into the same space and test locally in that space you are going to have to wildcard the redirect URI completely. This is why this tutorial isn't part of the overall series because to deploy you should really do so into a separate space. But for separate deployment into two spaces with real security you are beyond the scope of the trial.