Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems starting up in Openshift #8

Closed
comfysweet opened this issue Jul 2, 2020 · 3 comments
Closed

problems starting up in Openshift #8

comfysweet opened this issue Jul 2, 2020 · 3 comments
Assignees

Comments

@comfysweet
Copy link

Hello!
I get an error when I start the application in Openshift: "AMQ6300E: Directory '//.mqm' could not be created: '£'.
panic: {errorCode=2009, reason=MQRC_CONNECTION_BROKEN, linkedErr=MQCONNX: MQCC = MQCC_FAILED [2] MQRC = MQRC_CONNECTION_BROKEN [2009]}"
When I launch it in docker-container or locally, this problem does not occur

@matrober-uk
Copy link
Member

Hi @comfysweet - welcome!

I think the AMQ6300E error you are seeing is probably because the user under which your container image is running does not have permissions to create that directory due to the OpenShift security constraints (which are more restrictive by default than when you run something in plain docker or locally).

I would suggest that you create that directory as part of your container creation process and ensure that the application user has read/write access to it (e.g. in your Dockerfile), so that it will already be available when your application code executes at runtime.

regards.

@matrober-uk matrober-uk self-assigned this Mar 12, 2021
@matrober-uk
Copy link
Member

I finally got around to trying this out for myself, and I've written a template application sample which is now available along with instructions for use at;
https://github.com/ibm-messaging/mq-golang-jms20/tree/master/openshift-app-sample

As I suspected the above the best approach to addressing the "AMQ6300E: Directory --- could not be created" issue is to add it as part of the container build step, which occurs here in my sample; https://github.com/ibm-messaging/mq-golang-jms20/blob/master/openshift-app-sample/Dockerfile#L29

I'm also planning to publish a blog post that shows the "working" of how I built up that sample.

@matrober-uk
Copy link
Member

The blog post I mentioned that contains the full working steps for building up an OpenShift application for the MQ client from scratch is now available here;

https://community.ibm.com/community/user/integration/blogs/matt-roberts1/2021/03/12/mq-golangjms-openshift

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

No branches or pull requests

2 participants