Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Deploy to Cloud foundry error #36

Open
ahmedmfarahat opened this issue Apr 6, 2020 · 4 comments
Open

Deploy to Cloud foundry error #36

ahmedmfarahat opened this issue Apr 6, 2020 · 4 comments
Assignees

Comments

@ahmedmfarahat
Copy link

When I click on deploy on Cloud Foundry a toolchain gets created, however after a successful build and deployment stages, the app isn't running showing the following errors below:

The app failed to initialize properly. Setup and restart needed. Error: Error. Unable to list workspaces for Assistant: Forbidden: Access is denied due to invalid credentials.

message: 'Access is denied due to invalid credentials.',

body: '{"code":403,"error":"Forbidden"}',

@markstur markstur self-assigned this Apr 6, 2020
@markstur
Copy link
Contributor

markstur commented Apr 6, 2020

I can reproduce. Trying to find out what happened.

@markstur
Copy link
Contributor

markstur commented Apr 6, 2020

@ahmedmfarahat Don't know how to fix the cloud yet, but here is a workaround...

Go to your IBM Cloud Resource list and find the Assistant service. Not the CF one that is just a link but the plain ol' service that it links to. (If you are unsure which one, then follow the app to the CF service and follow its link to the real service). Click on the real assistant service and you should see a Manage tab showing an API key and a URL. Copy those.

So the problem is that your CF app has a runtime environment variable (VCAP_SERVICES) with the wrong apikey. We can fix the app by adding the correct runtime environment variables with the following keys:

key: ASSISTANT_URL value:
key: ASSISTANT_APIKEY value

It should look something like this (w/ my specific values here cut-off) and the when you save both values the app should restart and just work :)

Screen Shot 2020-04-06 at 10 15 42 AM
)

@ahmedmfarahat
Copy link
Author

Yeah, but where can I change these keys found in the real service? please advice

@ahmedmfarahat
Copy link
Author

I changed my WA credentials through cloud.ibm.com > resource list > your CF app > runtime environment, Added ASSISTANT_APIKEY AND ASSISTANT_URL and app restated automatically then worked perfectly. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants