eclipse / microprofile-conference

Microprofile.io Demo Code - Web Services Conference Application
http://microprofile.io/
Apache License 2.0
116 stars 116 forks source link

Microprofile Quickstart fails #99

Open karianna opened 8 years ago

karianna commented 8 years ago

The quickstart instructions fail to bring up a working conference app. An empty speakers page pops up. Various warnings/errors are in the log attached.

karianna commented 8 years ago

Can't attach log because GitHub UI is broken again

karianna commented 8 years ago

start_failure.txt

iainduncani commented 8 years ago

@katheris it looks like the error is coming out of the vote service:

[ERROR] Async process failed for: [java, -jar, target/microprofile-vote.jar] org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.access$200(DefaultExecutor.java:48) at org.apache.commons.exec.DefaultExecutor$1.run(DefaultExecutor.java:200) at java.lang.Thread.run(Thread.java:745)

karianna commented 8 years ago

@iainduncani - Thanks - I was lazy and put up a pretty poor bug report.

iainduncani commented 8 years ago

@karianna I'm struggling to recreate this both on Windows and Linux... Judging by the output it is finding the vote JAR (located at microprofile-vote/target/microprofile-vote.jar) but failing to get very far in launching it as no server output is coming out from the Liberty server. A working output would look something like this:

[INFO] --- exec-maven-plugin:1.5.0:exec (vote) @ microservice-start --- [INFO] [INFO] --- exec-maven-plugin:1.5.0:exec (ui) @ microservice-start --- Extracting files to C:\Users\IBM_ADMIN\wlpExtract\microprofile-vote_799374421263414\wlp

As the first thing we do is extract the JAR to your home directory I wonder if this is a permissions issue. The command will try to extract and run the server in your /wlpExtract directory, I presume the mvn command running this will have write permission to there?

karianna commented 8 years ago

Hi @iainduncani - I'm running on Mac OS X 10.12.1 - I don't think permissioning is an issue as I have an I have an empty ~\wlpExtract directory created for me as part of the run.

katheris commented 8 years ago

@karianna I cannot reproduce this on linux, currently having npm issues on Windows so can't verify there. Have you run it fine in the past? Can you verify what previous version worked so we can narrow down what has changed?

karianna commented 8 years ago

The quickstart mvn package -Pstart -pl :microservice-start command has never worked for me no. The very latest version has the schedule service coming up in the UI, the other 3 services still fail. I'll try to run the services individually as described in the docs and see if I can narrow it down.

karianna commented 8 years ago

When I start the vote service java -jar target/microprofile-vote.jar by itself it succeeds:

Extracting files to /Users/karianna/wlpExtract/microprofile-vote_319570560986660/wlp
Successfully extracted all product files.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
objc[48756]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java (0x10186c4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1019664e0). One of the two will be used. Which one is undefined.
Launching VoteServer (WebSphere Application Server 16.0.0.3/wlp-1.0.14.cl160320160831-1555) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_112-b16 (en_GB)
[AUDIT   ] CWWKE0001I: The server VoteServer has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/16.0.0.3/lafiles/en.html
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /Users/karianna/wlpExtract/microprofile-vote_319570560986660/wlp/usr/servers/VoteServer/configDropins/defaults/net.wasdev.wlp.starters.microprofile.server-snippet-0.0.1-SNAPSHOT.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9130/vote/
[AUDIT   ] CWWKZ0001I: Application microservice-vote started in 0.836 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [servlet-3.1, jndi-1.0, json-1.0, cdi-1.2, jsonp-1.0, jaxrs-2.0, jaxrsClient-2.0].
[AUDIT   ] CWWKF0011I: The server VoteServer is ready to run a smarter planet.
[WARNING ] Detected JSESSIONID with invalid length; expected length of 23, found 28, setting: DA19CC0B7F5A6536A68C9041A332 to null.
[WARNING ] CWWKW1001W: The scope PerRequest of JAXRS-2.0 Resource SessionVote does not match the CDI scope javax.enterprise.context.ApplicationScoped. Liberty gets resource instance from CDI.

and then visiting the URL I get what's expected.

Call to io.microprofile.showcase.vote.api.SessionVote:info([]) returned Microservice Session Vote Application

karianna commented 8 years ago

So if I start the liberty service by itself and then run the quick start I see more of the conference app, the first three tabs work. Unfortunately the vote UI is still blank.

katheris commented 8 years ago

@karianna Strange that it works by itself but doesn't work as part of the set. The vote service UI doesn't currently display anything as there isn't a way to add votes, so there are no votes to display, the page should just say Votes at the top (although the writing is hard to see due to the colour). I believe @AndyGee has been working on some updates to integrate the vote service with the UI properly and I've been chatting to some people in my team to find someone with the skills to update it.

katheris commented 8 years ago

@karianna have you run mvn package or mvn install before running mvn package -Pstart -pl :microservice-start? Is it possible that your other projects weren't built properly? The -pl command will only run the microservice-start project so you would need to have built the other ones previously, and I did change the name of the jar file so perhaps you had an older version lying around and that's why it couldn't run?

karianna commented 8 years ago

@katheris - Thanks for sticking with this! At the microprofile-conference level I run:

mvn clean install
mvn package -Pstart -pl :microservice-start

The mvn clean install is successful. Then I get the usual issues:

katheris commented 8 years ago

There have been a whole bunch of changes in recently. @karianna are you still having problems? I believe the vote service should currently show a pie chart

karianna commented 8 years ago

Updated to canonical master HEAD. Things have improved although no speakers or schedules data is shown in the UI and I get errors like:

[INFO] 16.11.11 04:16:22 404 GET /service/endpoints/conference
[INFO] 16.11.11 04:16:22 404 GET /null
[INFO] 16.11.11 04:16:22 404 GET /null
[INFO] 16.11.11 04:16:23 404 GET /service/endpoints/conference
[INFO] 16.11.11 04:16:24 200 GET /assets/css/node_modules/primeng/resources/themes/afternoon/images/ui-icons-dark.png
[INFO] 16.11.11 04:16:24 404 GET /undefined/all
[INFO] 16.11.11 04:16:26 404 GET /service/endpoints/conference
[INFO] 16.11.11 04:16:26 404 GET /undefined/rate
[INFO] 16.11.11 04:16:29 404 GET /undefined/all
[INFO] 16.11.11 04:16:30 404 GET /undefined/rate
[INFO] 16.11.11 04:16:34 404 GET /undefined/all
[INFO] 16.11.11 04:16:35 404 GET /null
[INFO] 16.11.11 04:16:35 404 GET /null
[INFO] 16.11.11 04:16:37 404 GET /null
[INFO] 16.11.11 04:16:37 404 GET /null
katheris commented 8 years ago

Sounds like you need to do a clean install? There have been node module changes

karianna commented 8 years ago

@katheris - Yep tried that, same result. Schedule works, vote service has a pie chart but nothing for speakers or sessions