Error on Riak ( 2.1.1 ) startup - riak

I have an error trying to start riak after compiled it from the source code (riak 2.1.1).
soft67:bin Humberto$ ./riak start
!!!!
!!!! WARNING: ulimit -n is 2560; 65536 is the recommended minimum.
!!!!
riak failed to start within 15 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable WAIT_FOR_ERLANG to the number of seconds to wait.
I am using gcc 5.2 as default compiler, OS X Yosemite 10.10 and the Basho's patched version of Erlang (OTP_R16B02_basho8)
What is wrong? I did the same in Ubunto 14.4 and works OK
I have this error with the lib eleveldb.so:
2015-07-30 12:43:59.292 [warning] <0.191.0> The on_load function for module eleveldb returned {error,{load_failed,"Failed to load NIF library: 'dlopen(/Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so, 2): Symbol not found: __ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE\n Referenced from: /Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so\n Expected in: flat namespace\n in /Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so'"}}
I used otool to see the links of eleveldb.so, here is the output:
soft67:bin Humberto$ otool -L /Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so
/Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so:
/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.21.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
Thanks in advance,
Humberto
Compiler information
Humbertos-MacBook-Pro-2:Humberto$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin14/5.2.0/lto-wrapper
Target: x86_64-apple-darwin14
Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_gcc5/gcc5/work/gcc-5.2.0/configure --prefix=/opt/local --build=x86_64-apple-darwin14 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc5 --includedir=/opt/local/include/gcc5 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-5 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-5 --with-gxx-include-dir=/opt/local/include/gcc5/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc5 5.2.0_0'
Thread model: posix
gcc version 5.2.0 (MacPorts gcc5 5.2.0_0)
Erlang information
soft67:bin Humberto$ erl
Erlang R16B02_basho8 (erts-5.10.3) [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]
Eshell V5.10.3 (abort with ^G)
1>
Console log
2015-07-30 16:54:58.993 [info] <0.7.0> Application lager started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.001 [info] <0.7.0> Application sasl started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.001 [info] <0.7.0> Application asn1 started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.004 [info] <0.7.0> Application crypto started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.004 [info] <0.7.0> Application public_key started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.010 [info] <0.7.0> Application ssl started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.013 [info] <0.7.0> Application riak_sysmon started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.021 [info] <0.7.0> Application os_mon started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.028 [info] <0.70.0> alarm_handler: {set,{system_memory_high_watermark,[]}}
2015-07-30 16:54:59.030 [info] <0.7.0> Application runtime_tools started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.062 [info] <0.7.0> Application erlang_js started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.062 [info] <0.7.0> Application xmerl started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.078 [info] <0.7.0> Application inets started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.078 [info] <0.7.0> Application mochiweb started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.084 [info] <0.7.0> Application webmachine started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.084 [info] <0.7.0> Application basho_stats started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.090 [info] <0.7.0> Application bitcask started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.100 [info] <0.7.0> Application clique started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.100 [info] <0.7.0> Application eleveldb started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.101 [info] <0.7.0> Application pbkdf2 started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.101 [info] <0.7.0> Application poolboy started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.125 [info] <0.158.0>#exometer_report:do_start_reporters:613 Starting reporters with []
2015-07-30 16:54:59.126 [info] <0.7.0> Application exometer_core started on node 'riak#127.0.0.1'
2015-07-30 16:54:59.185 [warning] <0.178.0>#riak_core_ring_manager:reload_ring:359 No ring file available.
2015-07-30 16:54:59.222 [warning] <0.191.0> The on_load function for module eleveldb returned {error,{load_failed,"Failed to load NIF library: 'dlopen(/Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so, 2): Symbol not found: __ZN7leveldb13gPerfCountersE\n Referenced from: /Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so\n Expected in: flat namespace\n in /Users/Humberto/riak-2.1.1/rel/riak/bin/../lib/eleveldb-2.1.0-0-ga36dbd6/priv/eleveldb.so'"}}
2015-07-30 16:54:59.223 [error] <0.189.0> CRASH REPORT Process <0.189.0> with 0 neighbours exited with reason: call to undefined function eleveldb:destroy("./data/cluster_meta/trees", []) in gen_server:init_it/6 line 328
2015-07-30 16:54:59.223 [error] <0.164.0> Supervisor riak_core_sup had child riak_core_metadata_hashtree started with riak_core_metadata_hashtree:start_link() at undefined exit with reason call to undefined function eleveldb:destroy("./data/cluster_meta/trees", []) in context start_error
2015-07-30 16:54:59.223 [error] <0.162.0> CRASH REPORT Process <0.162.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,riak_core_metadata_hashtree,{undef,[{eleveldb,destroy,["./data/cluster_meta/trees",[]],[]},{hashtree,destroy,1,[{file,"src/hashtree.erl"},{line,275}]},{hashtree_tree,create_node,2,[{file,"src/hashtree_tree.erl"},{line,463}]},{hashtree_tree,new,2,[{file,"src/hashtree_tree.erl"},{line,193}]},{riak_core_metadata_hashtree,init,1,[{file,"src/riak_core_metadata_hashtree.erl"},{line,172}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,...}]}}},...} in application_master:init/4 line 133
2015-07-30 16:54:59.223 [info] <0.7.0> Application riak_core exited with reason: {{shutdown,{failed_to_start_child,riak_core_metadata_hashtree,{undef,[{eleveldb,destroy,["./data/cluster_meta/trees",[]],[]},{hashtree,destroy,1,[{file,"src/hashtree.erl"},{line,275}]},{hashtree_tree,create_node,2,[{file,"src/hashtree_tree.erl"},{line,463}]},{hashtree_tree,new,2,[{file,"src/hashtree_tree.erl"},{line,193}]},{riak_core_metadata_hashtree,init,1,[{file,"src/riak_core_metadata_hashtree.erl"},{line,172}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,...}]}}},...}
2015-07-30 16:54:59.225 [info] <0.70.0> alarm_handler: {clear,system_memory_high_watermark}

I met the similar problem with Riak 1.4, and I found the reason is my Erlang version is built by llvm-gcc, but Riak 1.4 requires gnu-gcc. When Riak start, program would failed with load certain lib.
Strongly recommend install Erlang refer to basho doc:
Installing-on-Mac-OS-X
Install-Riak
As your OSX is 10.10, compile Erlang from source with configure below:
./configure --disable-hipe --enable-smp-support --enable-threads \
--enable-kernel-poll --enable-darwin-64bit
After all, recompile Riak.

In Ubuntu system, run the following command
export WAIT_FOR_ERLANG=60

The other OSX option would be to use a pre-compiled version of Riak such as Riak-2.9.8 from https://files.tiot.jp/riak/kv/2.9/2.9.8/osx/10.14/
If Riak starts and dies a few seconds later, have a look at var/console.log to see if Riak is complaining about crypto. If so, copy the two dylib files available from the same site to /usr/local/opt/openssl/lib/ and it should be happy.

Related

Azure DevOps deploying .NET 6 app to AWS Elastic Beanstalk throwing "Command hooks failed" error

My prior Azure DevOps Pipeline quit working with dotnet 6 deployment to AWS Elastic Beanstalk.
I have found this guide --> https://docs.aws.amazon.com/vsts/latest/userguide/tutorial-eb.html
Following these steps which use msbuild instead of dotnet build seem to work but deployment to elastic beanstalk fails with a new error I have not seen before: Error occurred during build: Command hooks failed
YAML for the deployment tasks looks like this...
- task: NuGetToolInstaller#1
displayName: Use NuGet 5.x
inputs:
versionSpec: 5.x
checkLatest: true
- task: NuGetCommand#2
displayName: NuGet restore
inputs:
noCache: true
- task: VSBuild#1
displayName: Build Project
inputs:
solution: AppName/AppName/AppName.csproj
msbuildArgs: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactstagingdirectory)\WebApp_$(build.BuildId).zip" /p:DeployIisAppPath="Default Web Site"
platform: x64
configuration: release
clean: true
msbuildArchitecture: x64
- task: BeanstalkDeployApplication#1
displayName: 'Deploy to Elastic Beanstalk: AppName'
inputs:
awsCredentials: 63ff2436-14ff-4391-836c-c14f27af9473
regionName: us-east-1
applicationName: AppName
environmentName: appname-dev
webDeploymentArchive: $(build.artifactstagingdirectory)\WebApp_$(build.BuildId).zip
dotnetPublishPath: $(build.artifactstagingdirectory)\WebApp_$(build.BuildId).zip
versionLabel: 'Azure DevOps Build Id: $(build.buildid)'
description: $(Build.SourceVersionMessage)
i'm using the following...
Azure DevOps
Elastic Beanstalk: IIS 10.0 running on 64bit Windows Server Core 2019/2.10.6
Region: us-east-1
Code: dotnet 6
here is the relevant portion of the cfn-init.log
2022-12-02 10:39:38,488 [INFO] -----------------------Starting build-----------------------
2022-12-02 10:39:38,520 [INFO] Running configSets: Infra-WriteRuntimeConfig, Infra-EmbeddedPreBuild, Hook-PreAppDeploy, Infra-EmbeddedPostBuild, Hook-EnactAppDeploy, Hook-PostAppDeploy
2022-12-02 10:39:38,520 [INFO] Running configSet Infra-WriteRuntimeConfig
2022-12-02 10:39:38,535 [INFO] Running config Infra-WriteRuntimeConfig
2022-12-02 10:39:38,582 [INFO] Command 01mkdir succeeded
2022-12-02 10:39:38,832 [DEBUG] CloudFormation client initialized with endpoint https://cloudformation.us-east-1.amazonaws.com
2022-12-02 10:39:38,832 [DEBUG] Describing resource AWSEBAutoScalingGroup in stack arn:aws:cloudformation:us-east-1:265786937427:stack/awseb-e-eqhz5scteh-stack/590b1f30-71af-11ed-bc49-0af991946407
2022-12-02 10:39:38,988 [INFO] Command 02writeappsource succeeded
2022-12-02 10:39:38,988 [INFO] Waiting 5 seconds for reboot
2022-12-02 10:39:44,473 [DEBUG] CloudFormation client initialized with endpoint https://cloudformation.us-east-1.amazonaws.com
2022-12-02 10:39:44,473 [DEBUG] Describing resource AWSEBAutoScalingGroup in stack arn:aws:cloudformation:us-east-1:265786937427:stack/awseb-e-eqhz5scteh-stack/590b1f30-71af-11ed-bc49-0af991946407
2022-12-02 10:39:44,598 [INFO] Command 03writeconfig succeeded
2022-12-02 10:39:44,613 [INFO] Running configSet Infra-EmbeddedPreBuild
2022-12-02 10:39:44,613 [INFO] Running configSet Hook-PreAppDeploy
2022-12-02 10:39:44,629 [INFO] Running config Hook-PreAppDeploy
2022-12-02 10:40:45,402 [INFO] Command hooks succeeded
2022-12-02 10:40:45,449 [INFO] Running configSet Infra-EmbeddedPostBuild
2022-12-02 10:40:45,464 [INFO] Running configSet Hook-EnactAppDeploy
2022-12-02 10:40:45,480 [INFO] Running config Hook-EnactAppDeploy
2022-12-02 10:41:07,089 [ERROR] Command hooks (HooksExecutor.exe appdeploy\enact) failed
2022-12-02 10:41:07,089 [ERROR] Error encountered during build of Hook-EnactAppDeploy: Command hooks failed
Traceback (most recent call last):
File "cfnbootstrap\construction.pyc", line 578, in run_config
File "cfnbootstrap\construction.pyc", line 146, in run_commands
File "cfnbootstrap\command_tool.pyc", line 127, in apply
cfnbootstrap.construction_errors.ToolError: Command hooks failed
2022-12-02 10:41:07,089 [ERROR] -----------------------BUILD FAILED!------------------------
2022-12-02 10:41:07,089 [ERROR] Unhandled exception during build: Command hooks failed
Traceback (most recent call last):
File "cfn-init", line 176, in <module>
File "cfnbootstrap\construction.pyc", line 137, in build
File "cfnbootstrap\construction.pyc", line 564, in build
File "cfnbootstrap\construction.pyc", line 578, in run_config
File "cfnbootstrap\construction.pyc", line 146, in run_commands
File "cfnbootstrap\command_tool.pyc", line 127, in apply
cfnbootstrap.construction_errors.ToolError: Command hooks failed
2022-12-02 11:05:58,862 [DEBUG] CloudFormation client initialized with endpoint https://cloudformation.us-east-1.amazonaws.com
2022-12-02 11:05:58,862 [DEBUG] Describing resource AWSEBAutoScalingGroup in stack arn:aws:cloudformation:us-east-1:265786937427:stack/awseb-e-eqhz5scteh-stack/590b1f30-71af-11ed-bc49-0af991946407
Deploying directly from Visual Studio, either via Publish to AWS or Publish to AWS Elastic Beanstalk (Legacy) both work fine, even though they are the exact same code and going to the exact same environment.
Ao this does not appear to be a code or environment issue.
Also, the build and publish processes complete without issue as well, only failing once deployed to AWS Elastic Beanstalk.
Any help is greatly appreciated...
During the reference and investigations, I have two workarounds for you.
1.Switching to an immutable deployment in the ElasticBeanstalk settings.
2.This issue could also be resulted from high volume of instance utilizing, and you could try to upgrade the EC2 instance size.

Why does sbt 1.02 not suppress debug logging messages?

Install details:
SBT 1.02
Scala 2.12.3
Java 8
Ubuntu Linux 16.04 on a ThinkPad & Mac OS X Sierra (10.12.6)
Steps I took:
Installed SBT on both Linux and Mac using instructions here: http://www.scala-sbt.org/1.x/docs/
Created the Hello World example.
Tried to run the sample program, both within SBT and on the bash command line.
Observed that regardless of what settings I tried, I would still see the debug messages:
Here's a sample:
Osiris:hello Noel$ sbt
[info] Loading project definition from
/Users/Noel/src/scala/sandbox/hello/project
[info] Loading settings from build.sbt ...
[info] Set current project to Hello (in build
file:/Users/Noel/src/scala/sandbox/hello/)
[info] sbt server started at 127.0.0.1:5256
sbt:Hello> logLevel
[info] warn
sbt:Hello> run
[info] Running example.Hello
hello
[debug] Waiting for threads to exit or System.exit to be called.
[debug] Classpath:
[debug] <abbreviated>.../hello_2.12-0.1.0-SNAPSHOT.jar
[debug] <abbreviated>.../scala-library.jar
[debug] Waiting for thread run-main-0 to terminate.
[debug] Thread run-main-0 exited.
[debug] Interrupting remaining threads (should be all daemons).
[debug] Sandboxed run complete..
[debug] Exited with code 0
[success] Total time: 0 s, completed Oct 15, 2017 9:44:13 PM
sbt:Hello>
What I tried:
From the command line:
sbt warn run
From within SBT:
warn
run
Modify build.sbt to contain the line:
logLevel := Level.Warn
Here is what build.sbt looks like:
import Dependencies._
logLevel := Level.Warn
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.example",
scalaVersion := "2.12.3",
version := "0.1.0-SNAPSHOT",
)),
name := "Hello",
libraryDependencies += scalaTest % Test
)
I've also searched on this forum, but this question was asked 4 years ago and those answers don't work for me. What am I missing?
Thanks in advance.
This is a known bug in sbt 1.0.1 and 1.0.2. See https://github.com/sbt/sbt/issues/3655

How to display classpath used for run task?

How can the classpath used for run task be displayed under SBT 0.13?
I have found some info here https://groups.google.com/forum/#!msg/simple-build-tool/0rhVRPnjyZU/DOYAd14gh1wJ:
I was dumping my classpaths as a way to troubleshoot my build recently and maybe this task can help you too:
lazy val printClasspath = task {
this.runClasspath.getPaths.foreach(println);
None
}
runClasspath is a PathFinder [1] instance and you can interrogate it even further. I guess building a ':'-separated list of those paths will be easy.
I don't understand where and how I should use this tip. Please advise.
If I type this in the sbt shell:
inspect run
I see, among other output:
[info] Dependencies:
[info] runtime:fullClasspath
So then if I type:
show runtime:fullClasspath
I get output like:
List(
Attributed(/Users/tisue/Dropbox/repos/euler/target/scala-2.10/classes),
Attributed(/Users/tisue/.sbt/boot/scala-2.10.3/lib/scala-library.jar))
Which is probably what you were looking for?
You can also get it in a colon-separated form suitable for use with java -classpath on the command line:
export runtime:fullClasspath
which prints e.g.:
/Users/tisue/Dropbox/repos/euler/target/scala-2.10/classes:/Users/tisue/.sbt/boot/scala-2.10.3/lib/scala-library.jar
tl;dr Use last run or write a custom task.
last run
With last run you should be presented with the entire classpath:
[info] Running main.Main
[debug] Waiting for threads to exit or System.exit to be called.
[debug] Classpath:
[debug] /Users/jacek/work/ingrifo/dictionary-spray/target/scala-2.11/classes
[debug] /Users/jacek/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.4.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-can_2.11/bundles/spray-can_2.11-1.3.2.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-io_2.11/bundles/spray-io_2.11-1.3.2.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-util_2.11/bundles/spray-util_2.11-1.3.2.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-http_2.11/bundles/spray-http_2.11-1.3.2.jar
[debug] /Users/jacek/.ivy2/cache/org.parboiled/parboiled-scala_2.11/bundles/parboiled-scala_2.11-1.1.6.jar
[debug] /Users/jacek/.ivy2/cache/org.parboiled/parboiled-core/bundles/parboiled-core-1.1.6.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-routing_2.11/bundles/spray-routing_2.11-1.3.2.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-httpx_2.11/bundles/spray-httpx_2.11-1.3.2.jar
[debug] /Users/jacek/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.2.jar
[debug] /Users/jacek/.ivy2/cache/org.jvnet.mimepull/mimepull/jars/mimepull-1.9.4.jar
[debug] /Users/jacek/.ivy2/cache/com.chuusai/shapeless_2.11/jars/shapeless_2.11-1.2.4.jar
[debug] /Users/jacek/.ivy2/cache/io.spray/spray-json_2.11/bundles/spray-json_2.11-1.3.1.jar
[debug] /Users/jacek/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.6.jar
[debug] /Users/jacek/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar
[debug] Waiting for thread run-main-0 to terminate.
[debug] Thread run-main-0 exited.
[debug] Waiting for thread default-akka.actor.default-dispatcher-4 to terminate.
Custom task to dump CLASSPATH
If you need to see what the run task depends on, use inspect.
[fullclasspath]> inspect run
[info] Input task: Unit
[info] Description:
[info] Runs a main class, passing along arguments provided on the command line.
[info] Provided by:
[info] {file:/Users/jacek/sandbox/so/fullClasspath/}fullclasspath/compile:run
[info] Defined at:
[info] (sbt.Defaults) Defaults.scala:704
[info] Dependencies:
[info] compile:run::streams
[info] runtime:fullClasspath
[info] compile:run::runner
[info] compile:run::mainClass
[info] Delegates:
[info] compile:run
[info] *:run
[info] {.}/compile:run
[info] {.}/*:run
[info] */compile:run
[info] */*:run
[info] Related:
[info] test:run
In Dependencies there's the runtime:fullClasspath setting which means that run depends on its value.
According to SBT help, fullClasspath is...
[fullclasspath]> help fullClasspath
The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies.
You simply need to parse the value of the runtime:fullClasspath setting.
[fullclasspath]> show runtime:fullClasspath
[info] Updating {file:/Users/jacek/sandbox/so/fullClasspath/}fullclasspath...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] List(Attributed(/Users/jacek/sandbox/so/fullClasspath/target/scala-2.10/classes), Attributed(/Users/jacek/.sbt/boot/scala-2.10.3/lib/scala-library.jar))
[success] Total time: 0 s, completed Feb 13, 2014 1:27:38 AM
To have a more parsable output, use the following task that reads fullClasspath as defined for the runtime scope (Runtime in Scala/SBT code):
lazy val printClasspath = taskKey[Unit]("Dump classpath")
printClasspath := {
(fullClasspath in Runtime value) foreach {
e => println(e.data)
}
}
Unfortunatelly, the Runtime configuration is hardcoded and think an input task to accept a configuration would make it so much better.
or directly from the bash , dash , sh or whatever shell:
sbt 'inspect run' 'show runtime:fullClasspath'
and
sbt "inspect run" "show runtime:fullClasspath"
for Windows command line.
Add the line lazy val printClasspath ... in your build.sbt file.
Then at the command line run:
sbt printClasspath

graniteds-tutorial-data using GraniteDS 3.0.1 error

I run the following command for the example graniteds-tutorial-data in the GraniteDS 3.0.1 GA github repo, but get the error trace given at the bottom of this post,
mvn clean install asciidoctor:process-asciidoc -Dserver=ejb -Dclient=flex
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.graniteds.tutorials:tutorial-data-client-flex:1.0-SNAPSHOT (C:\Documents and Settings\463072\FreshSpaceJuno\graniteds-tutorial-data\client-flex\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.2-beta or one of its dependencies could not be resolved: The following artifacts could not be resolved:
com.adobe.flex.compiler:saxon9:jar:4.5.1.21328, com.adobe.flex.compiler:xalan:jar:4.5.1.21328: Could not transfer artifact com.adobe.flex.compiler:saxon9:jar:4.5.1.21328 from/to flex-mojos-plugin-repository (http://repository.sonatype.org/content/groups/flexgroup/): GET request of: com/adobe/flex/compiler/saxon9/4.5.1.21328/saxon9-4.5.1.21328.jar from flex-mojos-plugin-repository failed: Premature end of Content-Length delimited message body (expected: 5024396; received: 3576621 -> [Help 2]
[ERROR] Unknown packaging: swf # line 17, column 16
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Any help on how to resolve this will be really appreciated. I am trying to port my application with the GraniteDS 2.0.3 to the latest 3.0.1. Also, are there any examples of a Flex EJB example using GraniteDS 3.0.1?
This is the log after I made the change you suggested.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.graniteds.tutorials:tutorial-data-server-model:jar:1.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at org.graniteds.tutorials:tutorial-data instead of org.graniteds.tutorials:tutorial-parent, please verify your project structure # line 28, column 13
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.graniteds.tutorials:tutorial-data-client-flex:swf:1.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at org.graniteds.tutorials:tutorial-data instead of org.graniteds.tutorials:tutorial-parent-client-flex, please verify your project structure # line 9, column 13
[WARNING] 'build.plugins.plugin.version' for org.sonatype.flexmojos:flexmojos-maven-plugin is missing. # org.graniteds.tutorials:tutorial-parent-client-flex:3.0.1.GA, C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-parent-client-flex\3.0.1.GA\tutorial-parent-client-flex-3.0.1.GA.pom, line 67, column 21
[WARNING] 'dependencies.dependency.scope' for com.adobe.flex.framework:spark:swc must be one of [provided, compile, runtime, test, system] but is 'theme'. # org.graniteds.tutorials:tutorial-parent-client-flex:3.0.1.GA, C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-parent-client-flex\3.0.1.GA\tutorial-parent-client-flex-3.0.1.GA.pom, line 33, column 20
[WARNING] 'dependencies.dependency.scope' for org.graniteds:granite-client-flex:swc must be one of [provided, compile, runtime, test, system] but is 'internal'. # org.graniteds.tutorials:tutorial-parent-client-flex:3.0.1.GA, C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-parent-client-flex\3.0.1.GA\tutorial-parent-client-flex-3.0.1.GA.pom, line 49, column 20
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.graniteds.tutorials:tutorial-data-server-ejb:war:1.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at org.graniteds.tutorials:tutorial-data instead of org.graniteds.tutorials:tutorial-parent-server-ejb, please verify your project structure # line 28, column 13
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # org.graniteds.tutorials:tutorial-parent-server-base:3.0.1.GA, C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-parent-server-base\3.0.1.GA\tutorial-parent-server-base-3.0.1.GA.pom, line 37, column 21
[WARNING] 'build.plugins.plugin.version' for org.wildfly.plugins:wildfly-maven-plugin is missing. # org.graniteds.tutorials:tutorial-parent-server-base:3.0.1.GA, C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-parent-server-base\3.0.1.GA\tutorial-parent-server-base-3.0.1.GA.pom, line 84, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. # org.graniteds.tutorials:tutorial-parent-server-base:3.0.1.GA, C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-parent-server-base\3.0.1.GA\tutorial-parent-server-base-3.0.1.GA.pom, line 46, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] GraniteDS Data Tutorial - Server Model
[INFO] GraniteDS Data Tutorial - Flex Client
[INFO] GraniteDS Data Tutorial - EJB Server
[INFO] GraniteDS Data Tutorial
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GraniteDS Data Tutorial - Server Model 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
.
.
.
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # tutorial-data-server-model ---
.
.
.
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/1.9.1/plexus-compiler-manager-1.9.1.jar
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 3 source files to C:\Documents and Settings\463072\FreshSpaceJuno\graniteds-tutorial-data\server-model\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # tutorial-data-server-model ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Documents and Settings\463072\FreshSpaceJuno\graniteds-tutorial-data\server-model\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # tutorial-data-server-model ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # tutorial-data-server-model ---
Downloading: http://repository.sonatype.org/content/groups/flexgroup/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom
Downloading: http://dl.bintray.com/graniteds/tutorial-dependencies/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom
.
.
[INFO] Installing C:\Documents and Settings\463072\FreshSpaceJuno\graniteds-tutorial-data\server-model\pom.xml to C:\Documents and Settings\463072\.m2\repository\org\graniteds\tutorials\tutorial-data-server-model\1.0-SNAPSHOT\tutorial-data-server-model-1.0-SNAPSHOT.pom
[INFO]
[INFO] --- asciidoctor-maven-plugin:0.1.4:process-asciidoc (default-cli) # tutorial-data-server-model ---
Downloading: http://repository.sonatype.org/content/groups/flexgroup/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.pom
Downloading: http://dl.bintray.com/graniteds/tutorial-dependencies/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.pom
.
.
.
Downloaded: http://repo.maven.apache.org/maven2/org/graniteds/granite-client-flex45-advanced/3.0.1.GA/granite-client-flex45-advanced-3.0.1.GA.swc (366 KB at 97.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] GraniteDS Data Tutorial - Server Model ............ SUCCESS [7:41.452s]
[INFO] GraniteDS Data Tutorial - Flex Client ............. FAILURE [1:18.299s]
[INFO] GraniteDS Data Tutorial - EJB Server .............. SKIPPED
[INFO] GraniteDS Data Tutorial ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9:08.939s
[INFO] Finished at: Thu Jan 23 12:00:48 IST 2014
[INFO] Final Memory: 25M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project tutorial-data-client-flex: Could not resolve dependencies for project org.graniteds.tutorials:tutorial-data-client-flex:swf:1.0-SNAPSHOT: Could not transfer artifact com.adobe.flex.framework:framework:zip:configs:4.5.1.21328 from/to flex-mojos-repository (http://repository.sonatype.org/content/groups/flexgroup/): Checksum validation failed, expected 410a3bcaceb1ea1960b2521818dc7ab9fac35aef but is 5359ccaf2d93e09ff2ec6fffe0648c611f42314b -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :tutorial-data-client-flex
Could you try renaming temporarily your .m2 to .m2.bak so we can make sure that this is not just an issue with your local repository?
are there any examples of a Flex EJB example using GraniteDS 3.0.1?
Yes, the one you are trying to launch.
Thanks.

Setup of flex units on linux

I am working on a project using Flex and until now we are using Windows to run flex unit tests for the modules/artifacts that require flex environment. Because of given dependencies, it is difficult to automatize anything because I have to swithch between linux/windows when running those maven tests.
I have made an effort to try to make flex units tests run on linux, but have not succedded [yet]. Here is small part of the stack trace from maven clean test -X on a flex project.
[INFO] Flexmojos 3.8
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[INFO] Running tests /root/trunk/flex-project/flex-surface/flex-surface-common/flex-surface-common-flex/target/test-classes/TestRunner.swf
[DEBUG] [org.sonatype.flexmojos.test.monitor.AsVmPing] opened server socket on port 13540
[DEBUG] [org.sonatype.flexmojos.test.monitor.ResultHandler] opened server socket on port 13539
[DEBUG] [LAUNCHER] ASVmLauncher starting
[DEBUG] [LAUNCHER] exec: /usr/bin/flashplayer - /root/trunk/flex-project/flex-project-arbeidsflate/flex-surface-common/flex-surface-common-flex/target/test-classes/TestRunner.swf
[DEBUG] [LAUNCHER] Creating process
[WARNING] [LAUNCHER] Using xvfb-run to launch headless tests
[DEBUG] [LAUNCHER] Process created java.lang.UNIXProcess#1a6c088
[DEBUG] [MOJO] launcher RUNNING
[DEBUG] [MOJO] pinger STARTED
[DEBUG] [MOJO] resultHandler STARTED
[DEBUG] [LAUNCHER] Output pumpers ON
[DEBUG] [LAUNCHER] Waiting for flashplayer termination
[DEBUG] [LAUNCHER] Flashplayer closed
[DEBUG] [LAUNCHER] Unexpected return code 1
[DEBUG] [SYSERR]: mktemp: cannot create temp file /tmp/Xauthority: File exists
[DEBUG] [MOJO] launcher ERROR
[DEBUG] [MOJO] pinger STARTED
[DEBUG] [MOJO] resultHandler STARTED
[INFO] ------------------------------------------------------------------------
[INFO] Tests run: 0, Failures: 0, Errors: 0, Time Elapsed: 0 sec
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
I need help find out what is wrong. If any of you guys know any other way to run flex units test on linux, NOT THROUGH JENKINS/HUDSON, I will be extremely grateful.
First of all, just follow the linux part of the instructions on the following site:Running unit tests - FlexMojos. Download the flashplayer and untar it some appropriate place and put the absolute directory path in your PATH variable.
Download the xvfb-run script and change the following 'fi'
# If the user did not specify an X authorization file to use, set up a temporary
# directory to house one.
if [ -z "$AUTHFILE" ]; then
XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$"
if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then
error "temporary directory $XVFB_RUN_TMPDIR already exists"
exit 4
fi
AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority)
fi
to
# If the user did not specify an X authorization file to use, set up a temporary
# directory to house one.
if [ -z "$AUTHFILE" ]; then
XVFB_RUN_TMPDIR=$(mktemp -d)
if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then
error "temporary directory $XVFB_RUN_TMPDIR already exists"
exit 4
fi
AUTHFILE=$(mktemp "$XVFB_RUN_TMPDIR/Xauthority")
fi
I solved my problem, hopefully you will too.
Good luck.

Resources