Giter Club home page Giter Club logo

Comments (17)

sohrab- avatar sohrab- commented on July 20, 2024

@Charbak, are you running this on Windows? I normally see that error when a script is copied into the container from Windows and the CRLF line ending are not compatible with Linux inside the container. Some code editors allow you to fix this on Windows, I believe.

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@sohrab- I am using OC clinet running on windows 10 and pushing that to OCP cluster running externally to IBM cloud.
For application image creation, I cant see Docker file. From where it is getting the steps when executing

Build the image!
oc start-build buildConfig/sample-app --from-file=./target/sample-app-1.0.0-SNAPSHOT-mule-application.jar --wait --follow

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@sohrab- I converted build.YAML and deploy.YAML under /openshift folder to LF through Visual Studio. But still it is getting stuck
STEP 6: RUN chown -R 185:0 /deployments/src
STEP 7: USER 185
STEP 8: RUN /usr/local/s2i/assemble
: invalid option
error: build error: error building at STEP "RUN /usr/local/s2i/assemble": error while running runtime: exit status 1
error: the build openshift/sample-app-5 status is "Failed"

Can you pls highlight from where it is taking the steps. I cant find docker file under sample-app folder.

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@sohrab- I again build the image and again trigger to create application image after converting all YAML to LF. It fails with below error. Can you check now.

STEP 8: RUN /usr/local/s2i/assemble
---> Moving Mule App to deployment directory...
mv: cannot move '/deployments/src/sample-app-1.0.0-SNAPSHOT-mule-application.jar' to '/opt/mule/apps/': No such file or directory
error: build error: error building at STEP "RUN /usr/local/s2i/assemble": error while running runtime: exit status 1
error: the build openshift/sample-app-6 status is "Failed"

from mule4-openshift.

sohrab- avatar sohrab- commented on July 20, 2024

Sorry, I think my instructions weren't clear.

  1. Update only assemble script to convert the line ending
  2. Rebuild the base image again
  3. Build mule app and run OpenShift build

There is no Dockerfile because this using s2i.

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@sohrab- Already did. But assemble script is failing.

Base image built was successful but application image is failing.

Adding transient rw bind mount for /run/secrets/rhsm
STEP 1: FROM image-registry.openshift-image-registry.svc:5000/openshift/mule4@sha256:39e53fa55ac6bfb8fd4568fe3baca4f48b22be1240da10d15b87528010864832
STEP 2: LABEL "io.openshift.build.image"="image-registry.openshift-image-registry.svc:5000/openshift/mule4@sha256:39e53fa55ac6bfb8fd4568fe3baca4f48b22be1240da10d15b87528010864832" "io.openshift.build.source-location"="/tmp/build/inputs" "io.openshift.s2i.destination"="/deployments"
STEP 3: ENV OPENSHIFT_BUILD_NAME="sample-app-6" OPENSHIFT_BUILD_NAMESPACE="openshift"
STEP 4: USER root
STEP 5: COPY upload/src /deployments/src
STEP 6: RUN chown -R 185:0 /deployments/src
STEP 7: USER 185
STEP 8: RUN /usr/local/s2i/assemble
---> Moving Mule App to deployment directory...
mv: cannot move '/deployments/src/sample-app-1.0.0-SNAPSHOT-mule-application.jar' to '/opt/mule/apps/': No such file or directory
error: build error: error building at STEP "RUN /usr/local/s2i/assemble": error while running runtime: exit status 1
error: the build openshift/sample-app-6 status is "Failed"

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@sohrab- I fixed the issue this way. I added creation of the directory in docker file. Rebuilt the base image and run the application image and it works...

RUN \
  mkdir -p ${MULE_HOME}/apps && chown -R 185:root ${MULE_HOME}/apps \
  # Install Mule server
  && unzip /tmp/mule-ee-distribution-standalone-${MULE_VERSION}.zip -d /opt \
	&& ln -s /opt/mule-enterprise-standalone-${MULE_VERSION} ${MULE_HOME} \

But getting the exception as accessing the application.
/usr/local/s2i/run: line 15: /opt/jboss/container/maven/default//scl-enable-maven: No such file or directory
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
INFO exec -a 'mule' java -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -Dmule.home=/opt/mule -Dmule.base=/opt/mule -Djava.net.preferIPv4Stack=TRUE -Dmvel2.disable.jit=TRUE -Dorg.glassfish.grizzly.nio.transport.TCPNIOTransport.max-receive-buffer-size=1048576 -Dorg.glassfish.grizzly.nio.transport.TCPNIOTransport.max-send-buffer-size=1048576 -Dorg.quartz.scheduler.skipUpdateCheck=true -Dmule.metadata.cache.entryTtl.minutes=10 -Dmule.metadata.cache.expirationInterval.millis=5000 -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT,CLDR,SPI -Djava.library.path=/opt/mule/lib/boot -Dwrapper.native_library=wrapper -Xms94m -Xmx375m -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=256m -XX:MetaspaceSize=128m -XX:+ExitOnOutOfMemoryError -cp ".:/opt:/opt/mule-licence:/opt/mule-app-properties:/opt/mule/conf:/opt/mule/lib/boot/*" org.mule.runtime.module.reboot.MuleContainerBootstrap
Error: Could not find or load main class org.mule.runtime.module.reboot.MuleContainerBootstrap

I am using "mule-ee-distribution-standalone-4.3.0-20210224.zip" as runtime. I cant find exact "mule-ee-distribution-standalone-4.3.0-20210322.zip" in the distribution list. Is the problem due to that?

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@sohrab- Can you pls see about this error after rollout deployment
Error: Could not find or load main class org.mule.runtime.module.reboot.MuleContainerBootstrap

from mule4-openshift.

miosman avatar miosman commented on July 20, 2024

Hi @Charbak,
you shouldn't need to create the apps directory as it is part of the mule-ee runtime. If you expand the zip file of a mule 4.3 standalone runtime locally you should see a directory structure similar to this.
Screenshot 2021-05-10 234743

If the file you got doesn't have this structure, it is likely the cause of the errors you are facing.

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@miosman Thanks for the response.

I downloaded the mule-ee runtime zip file from https://github.com/mulesoft/mule/releases
File name: mule-4.3.0-20210322.zip

I cant see the directory structure you pasted above in the downloaded file. Am I downloading from correct location?

Also the name of the Zip files that you mentioned "mule-ee-distribution-standalone-4.3.0-20210322.zip" not matching what I downloaded.
This is the structure if I unzip locally.
image

from mule4-openshift.

miosman avatar miosman commented on July 20, 2024

The files in that git repo you mentioned don't contain the full runtime. The full mule ee runtime can be downloaded from Anypoint Support site if you have a subscription or through https://www.mulesoft.com/lp/dl/mule-esb-enterprise for a 30 day trial. If the version of the runtime file doesn't match the version in the Dockerfile, you just need to adjust the version argument within the dockerfile.

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@miosman Atlast it gets deployed on Openshift cluster.

image

If I hit the route link , route is showing "Connection Time Out". How to test the application if you can guide.

from mule4-openshift.

miosman avatar miosman commented on July 20, 2024

@Charbak
The sample application only has one endpoint on /api/v1/somethings so you should be able to hit the endpoint from your route on http://<your_openshift_route_host>/api/v1/somethings

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

@miosman Yes, Openshift route is giving me the below url
http://sample-app-openshift.sol-arc-bootcamp-232932-f72ef11f3ab089a8c677044eb28292cd-0000.sjc03.containers.appdomain.cloud/api/v1/somethings

When hit the URL, it is giving timed out error.
image

from mule4-openshift.

miosman avatar miosman commented on July 20, 2024

This looks like an issue with the openshift cluster router check if you cluster allows external routes on that domain or not. As far as the sample application is concerned you can skip the route and hit the application directly by either doing a proxy forward from the commandline or going into the pod terminal from the openshift webconsole and hitting the local endpoint http://localhost:8085/api/v1/somethings with curl.

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

Thanku @miosman ...at last it is working!

from mule4-openshift.

Charbak avatar Charbak commented on July 20, 2024

Closing the defect and thanks for your support.

from mule4-openshift.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.