question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FMP OpenShift mode S2I Failed running assemble script - /bin/sh: 1: /usr/libexec/s2i/assemble: not found

See original GitHub issue

Description

I am trying the FMP plugin in order to deploy Spring Boot application to an OpenShift platform. However, as the build process is in progress, it failed when running some kind of assemble script(?):

...omitted...
[INFO] F8: STEP 1: FROM openjdk:8
[INFO] F8: STEP 2: LABEL "io.openshift.build.source-location"="/tmp/build/inputs"       "io.openshift.build.image"="openjdk:8"
[INFO] F8: STEP 3: ENV OPENSHIFT_BUILD_NAME="springboot-s2i-demo-s2i-1"     OPENSHIFT_BUILD_NAMESPACE="cipley-project"
[INFO] F8: STEP 4: USER root
[INFO] F8: STEP 5: COPY upload/src /tmp/src
[INFO] F8: STEP 6: RUN chown -R 1001:0 /tmp/src
[INFO] F8: STEP 7: USER 1001
[INFO] F8: STEP 8: RUN /usr/libexec/s2i/assemble
[INFO] F8: /bin/sh: 1: /usr/libexec/s2i/assemble: not found
[INFO] F8: subprocess exited with status 127
[INFO] F8: subprocess exited with status 127

Which then proceeds with it throwing an error: [ERROR] F8: Failed to execute the build: org.apache.maven.plugin.MojoExecutionException: OpenShift Build springboot-s2i-demo-s2i-1 failed: Failed: GenericBuildFailed

This might be related to #1663

The Build Config is generated on OpenShift, however the build itself is failed, and the pod is not running.

Build Config

image

Build

image

mvn -X output

mvn_out.txt

Info

  • f-m-p version : 4.4.1
  • Maven version (mvn -v) :
Apache Maven 3.6.3 (NON-CANONICAL_2019-11-27T20:26:29Z_root)
Maven home: /opt/maven
Java version: 11.0.7, vendor: GraalVM Community, runtime: /home/cipley/.sdkman/candidates/java/20.1.0.r11-grl
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.6.15-1-manjaro", arch: "amd64", family: "unix"
  • Kubernetes / OpenShift setup and version : OpenShift Code Ready Container 1.12 There is a project already created named cipley-project.
  • If it’s a bug, how to reproduce : from sample project, execute mvn clean initialize package, with CRC running and logged in as developer.
  • If it’s a feature request, what is your use case : N/A
  • Sample project : https://github.com/cipley/springboot-s2i-demo.git

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
cipleycommented, Jul 7, 2020

@manusa I confirmed the above error does not show up with JKube. So I guess I have to move on to JKube as you suggested. Still, many thanks for your inputs!

I’ll close this issue.

0reactions
manusacommented, Jul 8, 2020

Perhaps it was time to move on to JKube…

Time to move on 😉

I’m sorry, I was unclear, the base image I proposed is specifically designed for JKube and its provided generators.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to execute commands during S2I build in Openshift?
There're a couple of options: Provide a layer in the Dockerfile; Override assemble script. assemble script override options:.
Read more >
1363956 – Fail to do sti build with no inputs in buildConfig
Description of problem: When do sti build with no inputs in buildConfig, the build will fail Version-Release number of selected component ...
Read more >
Shell script throws a not found error when run from a sh file ...
Try: bash script.sh , calling sh make bash switch to posix mode. I remember this type of question has been answered. You can...
Read more >
Why script with /bin/bash is working, with /bin/sh not?
It's because Bash behaves differently when $0 is sh . From Bash's behaviour [Bash Hackers Wiki]: SH mode. When Bash starts in SH ......
Read more >
How to Resolve bin/sh: 1: source not: found - Linux Hint
Ubuntu is a popular Linux operating system that allows you to run code using scripts. A computer error is the occurrence of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found