Giter Club home page Giter Club logo

acmeair-mainservice-java's People

Contributors

dacleyra avatar dependabot[bot] avatar gunnarmorling avatar jagraj avatar jdmcclur avatar jnativio avatar mcginne avatar rzhao0 avatar sishida avatar tanyachu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

acmeair-mainservice-java's Issues

Liberty cannot start on MacOS

When I ran mvn install and it failed with the following error.

[INFO] objc[20281]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x1028404c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1028f54e0). One of the two will be used. Which one is undefined.
[INFO] Starting server defaultServer.
[INFO] Server defaultServer start failed. Check server logs for details.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.733 s
[INFO] Finished at: 2019-10-24T17:52:15-04:00
[INFO] Final Memory: 20M/307M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:2.1.1:test-start-server (test-start-server) on project acmeair-mainservice-java: CWWKM2002E: Failed to invoke [/Users/fmhwong/gitRepos/acmeair-mainservice-java/target/liberty/wlp/bin/server, start, defaultServer]. RC= 22 but expected=[0, 1]. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
felixs-mbp:logs fmhwong$ cat console.log 
objc[19762]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x10aa5a4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10ab0f4e0). One of the two will be used. Which one is undefined.
Error opening zip file or JAR manifest missing : resources/javametrics-agent.jar
Error occurred during initialization of VM
agent library failed to init: instrument

Looks like this requires IBM JDK.

Getting connection failure

I have deployed the app with the Istio manifest, in a Minikube local cluster. It is uploaded fine.
When I try access http://minikubeip:nodePort/acmeair I get this error:
"upstream connect error or disconnect/reset before headers. reset reason: connection failure"
When I deploy other apps the same way they seem to work.

wget: not found

During the docker build, the wget command is not found.
Can you please, change your Dockerfile-s for most of your 5 microservices.
Find below the log generated :

Step 1/18 : FROM websphere-liberty:webProfile7
---> 6b30f77a8c2b
Step 2/18 : MAINTAINER IBM Java engineering at IBM Cloud
---> Using cache
---> 27f6aeb4ebcc
Step 3/18 : RUN mkdir -m 777 -p /config/resources
---> Using cache
---> 03a78dccd165
Step 4/18 : ARG LICENSE_JAR_URL
---> Using cache
---> d0b1e582934d
Step 5/18 : RUN if [ $LICENSE_JAR_URL ]; then wget $LICENSE_JAR_URL -O /tmp/license.jar && java -jar /tmp/license.jar -acceptLicense /opt/ibm && rm /tmp/license.jar; fi
---> Using cache
---> 4fb8fbe73807
Step 6/18 : ENV JAVA_VERSION_PREFIX 1.8.0
---> Using cache
---> c3240a4bf786
Step 7/18 : ENV HOME /home/default
---> Using cache
---> 0b0755305a80
Step 8/18 : RUN set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in amd64|x86_64) YML_FILE='sdk/linux/x86_64/index.yml'; ;; i386) YML_FILE='sdk/linux/i386/index.yml'; ;; ppc64el|ppc64le) YML_FILE='sdk/linux/ppc64le/index.yml'; ;; s390) YML_FILE='sdk/linux/s390/index.yml'; ;; s390x) YML_FILE='sdk/linux/s390x/index.yml'; ;; ) echo "Unsupported arch: ${ARCH}"; exit 1; ;; esac; BASE_URL="https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta/"; wget -q -U UA_IBM_JAVA_Docker -O /tmp/index.yml ${BASE_URL}/${YML_FILE}; ESUM=$(cat /tmp/index.yml | sed -n '/'${JAVA_VERSION_PREFIX}'/{n;n;p}' | sed -n 's/\ssha256sum:\s//p' | tr -d '\r' | tail -1); JAVA_URL=$(cat /tmp/index.yml | sed -n '/'${JAVA_VERSION_PREFIX}'/{n;p}' | sed -n 's/\s*uri:\s//p' | tr -d '\r' | tail -1); wget -q -U UA_IBM_JAVA_Docker -O /tmp/ibm-java.bin ${JAVA_URL}; echo "${ESUM} /tmp/ibm-java.bin" | sha256sum -c -; echo "INSTALLER_UI=silent" > /tmp/response.properties; echo "USER_INSTALL_DIR=$HOME/java" >> /tmp/response.properties; echo "LICENSE_ACCEPTED=TRUE" >> /tmp/response.properties; mkdir -p $HOME/java; chmod +x /tmp/ibm-java.bin; /tmp/ibm-java.bin -i silent -f /tmp/response.properties; rm -f /tmp/response.properties; rm -f /tmp/index.yml; rm -f /tmp/ibm-java.bin; cd $HOME/java/jre/lib; rm -rf icc;
---> Running in a1a12240e0f9

  • dpkg --print-architecture
  • ARCH=amd64
  • YML_FILE=sdk/linux/x86_64/index.yml
  • BASE_URL=https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta/
  • wget -q -U UA_IBM_JAVA_Docker -O /tmp/index.yml https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta//sdk/linux/x86_64/index.yml
    /bin/sh: 1: wget: not found
    The command '/bin/sh -c set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in amd64|x86_64) YML_FILE='sdk/linux/x86_64/index.yml'; ;; i386) YML_FILE='sdk/linux/i386/index.yml'; ;; ppc64el|ppc64le) YML_FILE='sdk/linux/ppc64le/index.yml'; ;; s390) YML_FILE='sdk/linux/s390/index.yml'; ;; s390x) YML_FILE='sdk/linux/s390x/index.yml'; ;; ) echo "Unsupported arch: ${ARCH}"; exit 1; ;; esac; BASE_URL="https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta/"; wget -q -U UA_IBM_JAVA_Docker -O /tmp/index.yml ${BASE_URL}/${YML_FILE}; ESUM=$(cat /tmp/index.yml | sed -n '/'${JAVA_VERSION_PREFIX}'/{n;n;p}' | sed -n 's/\ssha256sum:\s//p' | tr -d '\r' | tail -1); JAVA_URL=$(cat /tmp/index.yml | sed -n '/'${JAVA_VERSION_PREFIX}'/{n;p}' | sed -n 's/\s*uri:\s//p' | tr -d '\r' | tail -1); wget -q -U UA_IBM_JAVA_Docker -O /tmp/ibm-java.bin ${JAVA_URL}; echo "${ESUM} /tmp/ibm-java.bin" | sha256sum -c -; echo "INSTALLER_UI=silent" > /tmp/response.properties; echo "USER_INSTALL_DIR=$HOME/java" >> /tmp/response.properties; echo "LICENSE_ACCEPTED=TRUE" >> /tmp/response.properties; mkdir -p $HOME/java; chmod +x /tmp/ibm-java.bin; /tmp/ibm-java.bin -i silent -f /tmp/response.properties; rm -f /tmp/response.properties; rm -f /tmp/index.yml; rm -f /tmp/ibm-java.bin; cd $HOME/java/jre/lib; rm -rf icc;' returned a non-zero code: 127

Fails to "Configure the Acme Air environment"

I get pop up errors for each of these endpoints.

Error: Unable to load http://EXTERNAL-IP:9080/flight/config/countFlights status:404
Error: Unable to load http://EXTERNAL-IP:9080/booking/config/runtime status:404
Error: Unable to load http://EXTERNAL-IP:9080/booking/config/activeDataService status:404
Error: Unable to load http://EXTERNAL-IP:9080/customer/config/runtime status:404
Error: Unable to load http://EXTERNAL-IP:9080/customer/config/activeDataService status:404
Error: Unable to load http://EXTERNAL-IP:9080/flight/config/runtime status:404
Error: Unable to load http://EXTERNAL-IP:9080/flight/config/activeDataService status:404
Error: Unable to load http://EXTERNAL-IP:9080/flight/config/countFlights status:404
Error: Unable to load http://EXTERNAL-IP:9080/flight/config/countFlightSegments status:404
Error: Unable to load http://EXTERNAL-IP:9080/booking/config/countBookings status:404
Error: Unable to load http://EXTERNAL-IP:9080/flight/config/countAirports status:404
Error: Unable to load http://EXTERNAL-IP:9080/auth/config/runtime status:404

Every service has its own endpoint that is different from the EXTERNAL-IP and reachable from within the cluster. How do I make sure the requests are routed to the corresponding service endpoint?

kubectl get po --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default acmeair-authservice-6c96b57b74-5qc6t 1/1 Running 0 3d21h
default acmeair-booking-db-77df5b846-bnqjh 1/1 Running 0 3d21h
default acmeair-bookingservice-6c9676dc94-4kg6r 1/1 Running 0 3d21h
default acmeair-customer-db-796c59c898-z5llj 1/1 Running 0 3d21h
default acmeair-customerservice-865d888db9-x6sfg 1/1 Running 0 3d21h
default acmeair-flight-db-c9f89c6fd-pws6s 1/1 Running 0 3d20h
default acmeair-flightservice-57c49fd54-589jb 1/1 Running 0 3d20h
default acmeair-mainservice-56dff844b6-8dxxf 1/1 Running 0 3d21h
kube-system heapster-v1.6.1-6558f8f94f-xspnw 3/3 Running 0 4d23h
kube-system kube-dns-564d97dc9c-nbbxc 4/4 Running 0 4d23h
kube-system kube-dns-564d97dc9c-vnkdh 4/4 Running 0 4d23h
kube-system kube-dns-autoscaler-76fcd5f658-pql86 1/1 Running 0 4d23h
kube-system kube-proxy-gke-standard-cluster-san-default-pool-09dcb82d-b5mf 1/1 Running 0 4d23h
kube-system kube-proxy-gke-standard-cluster-san-default-pool-09dcb82d-fnqt 1/1 Running 0 4d23h
kube-system kube-proxy-gke-standard-cluster-san-default-pool-09dcb82d-nqw9 1/1 Running 0 4d23h
kube-system l7-default-backend-6f8697844f-2lljq 1/1 Running 0 4d23h
kube-system metrics-server-v0.3.1-5b4d6d8d98-79jrs 2/2 Running 0 4d23h

kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
acmeair-auth-service ClusterIP 10.0.31.44 9080/TCP 3d21h
acmeair-booking-db ClusterIP 10.0.17.66 27017/TCP 3d21h
acmeair-booking-service ClusterIP 10.0.24.40 9080/TCP 3d21h
acmeair-customer-db ClusterIP 10.0.24.95 27017/TCP 3d21h
acmeair-customer-service ClusterIP 10.0.18.169 9080/TCP 3d21h
acmeair-external LoadBalancer 10.0.21.51 EXTERNAL-IP 9080:30345/TCP,9443:31852/TCP 23h
acmeair-flight-db ClusterIP 10.0.29.129 27017/TCP 3d20h
acmeair-flight-service ClusterIP 10.0.23.118 9080/TCP 3d20h
acmeair-main-service ClusterIP 10.0.30.89 9080/TCP 3d21h
kubernetes ClusterIP 10.0.16.1 443/TCP 4d23h

kubectl get ep
NAME ENDPOINTS AGE
acmeair-auth-service 10.60.0.11:9080 3d21h
acmeair-booking-service 10.60.0.12:9080 3d21h
acmeair-customer-service 10.60.1.8:9080 3d21h
acmeair-flight-service 10.60.1.9:9080 3d20h
acmeair-main-service 10.60.0.10:9080 3d21h

wget not found when building image with Dockerfile using latest Liberty image

After following the instructions here: https://github.com/blueperf/acmeair-authservice-java/blob/master/Build_Instructions.md, I tried to build the image with command docker build - < Dockerfile and get an error /bin/sh: 1: wget: not found:

$ docker build - < Dockerfile
Sending build context to Docker daemon  3.584kB
Step 1/11 : FROM websphere-liberty:microProfile2
microProfile2: Pulling from library/websphere-liberty
9ff7e2e5f967: Pull complete 
59856638ac9f: Pull complete 
6f317d6d954b: Pull complete 
a9dde5e2a643: Pull complete 
650bbdf50d18: Pull complete 
016c8f81cbb1: Pull complete 
4a6152d46ddb: Pull complete 
fd1504308fc9: Pull complete 
957002e9f8c0: Pull complete 
4ac972625689: Pull complete 
21c944c600ac: Pull complete 
96bc0dc3c448: Pull complete 
6550c65c114b: Pull complete 
7f0e99039c01: Pull complete 
Digest: sha256:57cb4262aff7949702aeffea8e1479245a16045fb8ffb792a7f1ca38216f1f81
Status: Downloaded newer image for websphere-liberty:microProfile2
 ---> 8acc64c44c06
Step 2/11 : RUN wget -t 10 -x -nd -P /opt/ibm/wlp/usr https://github.com/WASdev/sample.opentracing.zipkintracer/releases/download/1.3/liberty-opentracing-zipkintracer-1.3-sample.zip && cd /opt/ibm/wlp/usr && unzip liberty-opentracing-zipkintracer-1.3-sample.zip && rm liberty-opentracing-zipkintracer-1.3-sample.zip
 ---> Running in 02f84cd56c5a
/bin/sh: 1: wget: not found
The command '/bin/sh -c wget -t 10 -x -nd -P /opt/ibm/wlp/usr https://github.com/WASdev/sample.opentracing.zipkintracer/releases/download/1.3/liberty-opentracing-zipkintracer-1.3-sample.zip && cd /opt/ibm/wlp/usr && unzip liberty-opentracing-zipkintracer-1.3-sample.zip && rm liberty-opentracing-zipkintracer-1.3-sample.zip' returned a non-zero code: 127

Checking with @jnativio, he found that the problem seems that the new image for liberty does not have wget

I have tried the following branches and see the same wget issue:
master
microprofile-1.3
microprofile-2.0

I suspect all branches using the latest Liberty image are affected.

Opening this issue for blueperf to fix the Dockerfile with the latest Liberty image.

How to expose Configuration Page externally?

I am running this app in a GCP cluster. I would like to expose it externally as a service to access its Configuration page. I tried,

kubectl expose deployment acmeair-mainservice --type=LoadBalancer --name=acmeair-external

It leads me to this webpage on port http://EXTERNAL-IP:9080/
acme

Is this the expected behaviour?

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.