OpenShift: Java maven build "Generic Build failure" but log shows no error

718 Views Asked by At

I am building a maven project on OpenShift Dedicated with S2I, but the build fails with a "Generic Build failure - check logs for details."

enter image description here

However, the build log shows no error.

enter image description here

Why is this build failing?

2

There are 2 best solutions below

2
On BEST ANSWER

Check the limits as @Graham suggested, by:

oc -n yourproject get limits -o yaml
oc -n yourproject get quota -o yaml

Or even go straight to edit:

oc -n yourproject edit limits

# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: LimitRange
metadata:
  creationTimestamp: 1999-08-11T13:58:34Z
  name: resource-limits
  namespace: yourproject
  resourceVersion: "61912526"
  selfLink: /api/v1/namespaces/betvictor/limitranges/resource-limits
  uid: 2a275347-7e9d-11e7-8242-005056957160
spec:
  limits:
  - max:
      memory: 3001Mi
    min:
      memory: 10Mi
    type: Pod
  - default:
      memory: 300Mi
    defaultRequest:
      memory: 250Mi
    max:
      memory: 3000Mi
    min:
      memory: 10Mi
    type: Container

Pay attention to the units, better if they are the same for each entry. Pod maximum has to be equal or more than the container max.

Half a gig for building a java app is not much for what I can tell...

0
On

After ptrk's answer to diagnose that this is the problem: There are 2 ways to give a wildfly pod more memory on OpenShift when running:

  • in the console: Deployments -> select deployment -> Edit resource limits
  • in the template

For build memory, you can also specify it in the template:

  - kind: BuildConfig
    ...
    spec:
      ...
      resources:
        limits:
          cpu: 1
          memory: 1Gi
        # requests:
          # cpu: 1
          # memory: 1Gi