Closed aliostad closed 7 years ago
I bumped latest versions on master and was able to get things working (not sure if they wouldn't have worked prior to version bump, but anyway :))
$ ./mvnw clean install
$ cd /tmp
$ mkdir eventhub
$ (cd eventhub && jar -xvf /Users/acole/oss/zipkin-azure/autoconfigure/collector-eventhub/target/zipkin-autoconfigure-collector-eventhub-0.1.7-SNAPSHOT-module.jar )
$ wget -O zipkin.jar 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec'
$ EVENTHUB_CONNECTION_STRING=foo EVENTHUB_STORAGE_CONNECTION_STRING=bar java -Dloader.path=eventhub -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
Then, it crashed trying to parse my dodgy connection string :)
give a try? if works, push a release tag (like release-0.1.7)?
Thanks a lot. Will try at lunch.
@adriancole I see! The variables defined in the same line work but I had defined them not in the execution line. I do not have deep enough knowledge of how these parameters work but according to docs they are defined in separate lines:
EVENTHUB_CONNECTION_STRING=Endpoint=sb://< EventHub Address>;SharedAccessKeyName=<name>;SharedAccessKey=<key>
EVENTHUB_STORAGE_CONNECTION_STRING=<connection string>;DefaultEndpointsProtocol=https;AccountName=<yourAccountName>;AccountKey=<yourAccountKey>
java -Dloader.path=eventhub -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
Which do not work. Can you please check if they are defined as env var, would they work? I tried and did not work for me.
I guess we need to lines with the backslash. I can update document.
Sure. I can try a sanity check
ahh.. yeah if defining on separate lines, there are two ways...
use trailing \ to make believe they are on one line
ex.
$ EVENTHUB_CONNECTION_STRING=foo \
EVENTHUB_STORAGE_CONNECTION_STRING=bar \ java -Dloader.path=eventhub -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
or export the variables
$ export EVENTHUB_CONNECTION_STRING=foo $ export EVENTHUB_STORAGE_CONNECTION_STRING=bar $ java -Dloader.path=eventhub -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
Thanks. Yes, but would that not set it globally?
I am still puzzled that why java being launched from the same terminal that echo $EVENTHUB_CONNECTION_STRING
works, cannot see the values.
OK, I will update the docs.
By the way, I now understand it better https://stackoverflow.com/questions/44701221/defining-shell-variable-in-the-same-line-gets-passed-to-java-process-but-not-o/44701283#44701283
thanks for circling back!
After a while came back to this and trying to run - in the past I used different parameters. Word by word, I followed the instructions but evenhub module does not get loaded. I even put debug outputs in the paths of code but they are never called.
Here is my tmp:
And here is inside my eventhub:
And I cd to
tmp
and run below:And here is output from the zipkin server: