I've tried for about 3 days to get past this. I tried my Dockerfile and the solution's Dockerfile. The container builds, I ran the script to get the nexus files, and when I run the run-persistent.sh the container exist immediately.
Running podman logs only shows this:
nexus-start.sh: line 8: cd: /opt/nexus/nexus2: No such file or directory
Error: Could not find or load main class org.sonatype.nexus.bootstrap.Launcher
Any ideas? I reviewed the persistence section and everything seems right.
Hi
I should have been more explicit. You are right, I meant the `curl` command inside the `get_nexus_bundle.sh` script. I should be something like:
> curl -L --progress-bar -O https://download.sonatype.com/nexus/oss/nexus-2.14.3-02-bundle.tar.gz
Note the "-L" parameter, indicating the curl command to follow redirects.
It really sounds like the script is silently failing, and the tarball is not being downloaded (IIRC, a HTML page is downloaded instead). This does not block creating the container image, but causes the later run issue.
P.S. Building the image using the --no-cache parameter is not necessary. If local files are changed, the layer including those files will also change, hence the cache will not hit.
I had to change the curl in get-nexus-bundle to follow redirects. It was downloading the tar as an html file, and that broke the next steps. Maybe I screwed something up, not sure.
Hi
I am facing the same issue and tried with solutions as well, no luck.
Stuck at the same step.
Any help would be appreciated.
Thanks
Hi everyone
I just tried to replicate the issue but it worked fine on my side.
What versions of the course are you using? Can you provide the output of the `curl` command?
KR
Jordi Sola
Like I described, the video instructs to get that nexus tarball, but if I recall, the url was correct, but there was a redirect on the server side to a CDN or something so the curl failed. I didn't throw an error until later in the process.
OP: Make sure that you have the right nexus files and that they extract and install, as expected. As soon as I could get a tarball from curl, I think that fixed it.
TL;DR: I think I just had to add -L to my curl.
Hi
I can't run the curl as the pod is getting exited after running ./run-persistent.sh.
I tried running ./run-persistent.sh after re-building the nexus images. Will that be a problem ?
Snippet of the steps performed.
I think the curl might be in that ./get-nexus-bundle.sh maybe?
Oh, and I think you may want to build the container from scratch with --no-cache, maybe?
Hi
I should have been more explicit. You are right, I meant the `curl` command inside the `get_nexus_bundle.sh` script. I should be something like:
> curl -L --progress-bar -O https://download.sonatype.com/nexus/oss/nexus-2.14.3-02-bundle.tar.gz
Note the "-L" parameter, indicating the curl command to follow redirects.
It really sounds like the script is silently failing, and the tarball is not being downloaded (IIRC, a HTML page is downloaded instead). This does not block creating the container image, but causes the later run issue.
P.S. Building the image using the --no-cache parameter is not necessary. If local files are changed, the layer including those files will also change, hence the cache will not hit.
My container kept failing to stay up and running as well, but if I ran it as interactive and ran the nexus-start.sh script from there, it worked.
I finally figured out there was an error in the CMD line in the Dockerfile.
Changing it from
CMD ["sh", "start-nexus.sh"]
to
CMD ["/bin/sh","nexus-start.sh"]
solved the problem.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.