Snowplow Avalanche not working?


#1

Hi,

Using the Amazon AMI for avalanche as outlined in https://github.com/snowplow/avalanche

Basically, it doesn’t work out of the box…

./snowplow/scripts/2_run.sh brings permission issues, so it chmod +x
./snowplow/scripts/2_run.sh brings new permission issues on an other file, which I can’t chmod +x, so I sudo chmod +x

then I try again:
./snowplow/scripts/2_run.sh
From which I choose 0 (exponential peak) and get the following exception:

Exception in thread "main" java.lang.NullPointerException: scheme
	at org.asynchttpclient.util.Assertions.assertNotNull(Assertions.java:23)
	at org.asynchttpclient.uri.Uri.<init>(Uri.java:63)
	at org.asynchttpclient.uri.Uri.create(Uri.java:38)
	at org.asynchttpclient.uri.Uri.create(Uri.java:31)
	at io.gatling.http.protocol.HttpProtocol.io$gatling$http$protocol$HttpProtocol$$$anonfun$3(HttpProtocol.scala:145)
	at io.gatling.http.protocol.HttpProtocol.makeAbsoluteHttpUri(HttpProtocol.scala:155)
	at io.gatling.http.request.builder.RequestExpressionBuilder.makeAbsolute(RequestExpressionBuilder.scala:60)
	at io.gatling.http.request.builder.RequestExpressionBuilder.<init>(RequestExpressionBuilder.scala:65)
	at io.gatling.http.request.builder.HttpRequestExpressionBuilder.<init>(HttpRequestExpressionBuilder.scala:37)
	at io.gatling.http.request.builder.HttpRequestBuilder.build(HttpRequestBuilder.scala:154)
	at io.gatling.http.action.sync.HttpRequestActionBuilder.build(HttpRequestActionBuilder.scala:34)
	at io.gatling.core.structure.StructureBuilder$class.io$gatling$core$structure$StructureBuilder$class$$$anonfun$1(StructureBuilder.scala:34)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at io.gatling.core.structure.StructureBuilder$class.build(StructureBuilder.scala:33)
	at io.gatling.core.structure.ChainBuilder.build(ChainBuilder.scala:30)
	at io.gatling.core.action.builder.LoopBuilder.build(LoopBuilder.scala:43)
	at io.gatling.core.structure.StructureBuilder$class.io$gatling$core$structure$StructureBuilder$class$$$anonfun$1(StructureBuilder.scala:34)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at io.gatling.core.structure.StructureBuilder$class.build(StructureBuilder.scala:33)
	at io.gatling.core.structure.ScenarioBuilder.build(ScenarioBuilder.scala:38)
	at io.gatling.core.structure.PopulationBuilder.build(ScenarioBuilder.scala:101)
	at io.gatling.core.scenario.SimulationParams.io$gatling$core$scenario$SimulationParams$$$anonfun$13(Simulation.scala:169)
	at scala.collection.immutable.List.map(List.scala:273)
	at io.gatling.core.scenario.SimulationParams.scenarios(Simulation.scala:169)
	at io.gatling.app.Gatling.run(Gatling.scala:102)
	at io.gatling.app.Gatling.runIfNecessary(Gatling.scala:75)
	at io.gatling.app.Gatling.start(Gatling.scala:65)
	at io.gatling.app.Gatling$.start(Gatling.scala:57)
	at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
	at io.gatling.app.Gatling$.main(Gatling.scala:43)
	at io.gatling.app.Gatling.main(Gatling.scala)

Unsure about what I’m doing wrong, etc, but it seems I can’t use the product out of the box. Can you reproduce the issues on your end?

Cheers,
Stephane


#2

Hi @simplesteph,

There is a bug with the current distribution where the Gatling directory is not owned by the current user:

https://github.com/snowplow/avalanche/issues/8

You will need to sudo chown -R ubuntu:ubuntu ./snowplow/{{gatling directory}}
You will then need to first ensure that your environment variables are set and to then run that shell script.


#3

Hi @josh,

It is still not working, please find the entire steps with a fresh ami.

ubuntu@ip-XX-XX-XX-XX:~$ sudo chown -R ubuntu:ubuntu ./snowplow/
ubuntu@ip-XX-XX-XX-XX:~$ ls /snowplow
ls: cannot access /snowplow: No such file or directory
ubuntu@ip-XX-XX-XX-XX:~$ ls snowplow
gatling  results  scripts  src
ubuntu@ip-XX-XX-XX-XX:~$ sudo chown -R ubuntu:ubuntu ./snowplow/gatling
ubuntu@ip-XX-XX-XX-XX:~$ vim .bash_profile
ubuntu@ip-XX-XX-XX-XX:~$ vim .profile
ubuntu@ip-XX-XX-XX-XX:~$ source .profile
ubuntu@ip-XX-XX-XX-XX:~$ ./snowplow/scripts/2_run.sh
GATLING_HOME is set to /home/ubuntu/snowplow/gatling/gatling-charts-highcharts-bundle-2.2.1-SNAPSHOT
23:28:31.476 [WARN ] i.g.c.ZincCompiler$ - Pruning sources from previous analysis, due to incompatible CompileSetup.
Choose a simulation number:
     [0] com.snowplowanalytics.avalanche.ExponentialPeak
     [1] com.snowplowanalytics.avalanche.LinearPeak
1
Exception in thread "main" java.lang.NullPointerException: scheme
	at org.asynchttpclient.util.Assertions.assertNotNull(Assertions.java:23)
	at org.asynchttpclient.uri.Uri.<init>(Uri.java:63)
	at org.asynchttpclient.uri.Uri.create(Uri.java:38)
	at org.asynchttpclient.uri.Uri.create(Uri.java:31)
	at io.gatling.http.protocol.HttpProtocol.io$gatling$http$protocol$HttpProtocol$$$anonfun$3(HttpProtocol.scala:145)
	at io.gatling.http.protocol.HttpProtocol.makeAbsoluteHttpUri(HttpProtocol.scala:155)
	at io.gatling.http.request.builder.RequestExpressionBuilder.makeAbsolute(RequestExpressionBuilder.scala:60)
	at io.gatling.http.request.builder.RequestExpressionBuilder.<init>(RequestExpressionBuilder.scala:65)
	at io.gatling.http.request.builder.HttpRequestExpressionBuilder.<init>(HttpRequestExpressionBuilder.scala:37)
	at io.gatling.http.request.builder.HttpRequestBuilder.build(HttpRequestBuilder.scala:154)
	at io.gatling.http.action.sync.HttpRequestActionBuilder.build(HttpRequestActionBuilder.scala:34)
	at io.gatling.core.structure.StructureBuilder$class.io$gatling$core$structure$StructureBuilder$class$$$anonfun$1(StructureBuilder.scala:34)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at io.gatling.core.structure.StructureBuilder$class.build(StructureBuilder.scala:33)
	at io.gatling.core.structure.ChainBuilder.build(ChainBuilder.scala:30)
	at io.gatling.core.action.builder.LoopBuilder.build(LoopBuilder.scala:43)
	at io.gatling.core.structure.StructureBuilder$class.io$gatling$core$structure$StructureBuilder$class$$$anonfun$1(StructureBuilder.scala:34)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at io.gatling.core.structure.StructureBuilder$class.build(StructureBuilder.scala:33)
	at io.gatling.core.structure.ScenarioBuilder.build(ScenarioBuilder.scala:38)
	at io.gatling.core.structure.PopulationBuilder.build(ScenarioBuilder.scala:101)
	at io.gatling.core.scenario.SimulationParams.io$gatling$core$scenario$SimulationParams$$$anonfun$13(Simulation.scala:169)
	at scala.collection.immutable.List.map(List.scala:273)
	at io.gatling.core.scenario.SimulationParams.scenarios(Simulation.scala:169)
	at io.gatling.app.Gatling.run(Gatling.scala:102)
	at io.gatling.app.Gatling.runIfNecessary(Gatling.scala:75)
	at io.gatling.app.Gatling.start(Gatling.scala:65)
	at io.gatling.app.Gatling$.start(Gatling.scala:57)
	at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
	at io.gatling.app.Gatling$.main(Gatling.scala:43)
	at io.gatling.app.Gatling.main(Gatling.scala)

#4

Hi @simplesteph,

Just to check, if you printenv are these four values available?

SP_COLLECTOR_URL=http://some-collectyorr-url
SP_SIM_TIME=60
SP_BASELINE_USERS=500
SP_PEAK_USERS=3000

Note: These are just sample values and can be set to whatever you require

That error appears to say that it cannot find the correct environment variable for the URL and hence is causing an exception when you try to run it. Could you try exporting these values to your environment individually rather than editing your .profile files to see if that fixes the issue.


#5

The variables were here. I think I was missing the http:// in front of my url. Probably something you can catch in the scala code for users like me who forget the http :slight_smile:

Thanks!


#6

Agreed! Ticket made to catch this case: https://github.com/snowplow/avalanche/issues/9