Re: Unable to run unit tests inside a docker container

2021-02-08 Thread Stephin Thomas
I am not sure why scala is not known.
This is the version I'm using inside my container



*bash-4.4$ which scala/usr/bin/scalabash-4.4$ scala -versionScala code
runner version 2.12.13 -- Copyright 2002-2020, LAMP/EPFL and Lightbend,
Inc.*

On Mon, Feb 8, 2021 at 4:02 PM Martin Gainty  wrote:

> scala plugin is not accessible
>
> FAILURE: Build failed with an exception.
> 09:47:39.315 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter]
> 09:47:39.315 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] Build file
> 'kafka/stephin/build.gradle' line: 471
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter]
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred
> evaluating root project 'stephin'.
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] > Failed to apply
> plugin [id 'org.gradle.scala']
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter]> Could not
> find method scala() for arguments
> [build_3rdrt0tflrjfc3pjjv3f9udtb$_run_closure5$_closure74$_closure108@65c5e9d2]
> on object of type org.gradle.api.plugins.scala.ScalaPlugin.
> 09:47:39.316 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter]
>
> lets look at build.gradle location at line 471
>   plugins.withType(ScalaPlugin) {
> scala {
>   zincVersion = versions.zinc
> }
>
> this is the scala compiler
>
> i asked the gradle people which repository is supposed to contain
> scala-compiler-plugin (any version)
> Gradle support response is "we dont know scala"
>
> any idea?
>
>
> 
> From: Stephin Thomas 
> Sent: Monday, February 8, 2021 4:08 AM
> To: users@kafka.apache.org 
> Subject: Re: Unable to run unit tests inside a docker container
>
> @Martin Please see the build.gradle here
> 
>
> On Fri, Feb 5, 2021 at 1:31 AM Martin Gainty  wrote:
>
> > * What went wrong:
> > 18:54:25.681 [ERROR]
> > [org.gradle.internal.buildevents.BuildExceptionReporter]
> > A problem occurred evaluating root project 'stephin'.
> >
> > 18:54:25.681 [ERROR]
> > [org.gradle.internal.buildevents.BuildExceptionReporter] >
> > Could not find method scalaCompiler() for arguments
> > [org.scala-lang:scala-compiler:2.9.2] on object of type
> >
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
> >
> >repositories {
> > mavenCentral()
> > jcenter()
> > maven {
> > url "http://maven.ow2.org/maven2/;
> > }
> > maven {
> > url "http://maven.ow2.org/maven2-snapshot/;
> > }
> > maven {
> >   url "https://plugins.gradle.org/m2/;
> > }
> >   }
> >   apply from: file('gradle/buildscript.gradle'), to: buildscript
> >   apply from: "$rootDir/gradle/dependencies.gradle"
> >
> >   dependencies {
> > scalaCompiler "org.scala-lang:scala-compiler:2.9.2"
> >
> > send my your build.gradle asap
> >
> > m
> >
> > 
> > From: Stephin Thomas 
> > Sent: Thursday, February 4, 2021 3:11 AM
> > To: users@kafka.apache.org 
> > Subject: Re: Unable to run unit tests inside a docker container
> >
> > <
> >
> https://github.com/apache/kafka/blob/trunk/clients/src/test/java/org/apache/kafka/common/network/SslVersionsTransportLayerTest.java
> > >Here
> > is the upstream link to the SslTransportLayerTest.java
> > <
> >
> https://github.com/apache/kafka/blob/trunk/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java
> > >
> > ,
> > I've used.
> > Thanks for looking into this.
> >
> > -Stephin
> >
> > On Wed, Feb 3, 2021 at 11:11 PM Martin Gainty 
> wrote:
> >
> > > authentication fail
> > >
> > > using basic-authentication you will need to supply correct
> > > username/password
> > > try ssh to server with supplied credentials from testcase
> > > assume port is 
> > > assume host ip is 10.0.0.1
> > > assume password is MYPassword
> > > assume username is mgainty
> > >  ssh -p “MYPassword”  ssh -p  mgainty@10.0.0.1
> > > if ssh fails then any programmatic authentication on your end will also
> > > fail
> > >
> > > if you are authenticating with certs you will need a valid x509 cert
> and
> > > public key
> > > both of which need to be supplied to you from CA authenticator
> > >
> > > is there a way you can upload SslTransportLayerTest.java so we can look
> > at
> > > the code
> > >
> >
> ?org.apache.kafka.common.network.SslTransportLayerTest.testTlsDefaults(SslTransportLayerTest.java:587)
> > >
> > > m-
> > >
> > > 
> > > From: Stephin Thomas 
> > > Sent: Wednesday, February 3, 2021 9:30 AM
> > > To: users@kafka.apache.org 
> > > Subject: Re: Unable to run 

Re: Unable to run unit tests inside a docker container

2021-02-08 Thread Martin Gainty
scala plugin is not accessible

FAILURE: Build failed with an exception.
09:47:39.315 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:47:39.315 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * 
Where:
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
Build file 'kafka/stephin/build.gradle' line: 471
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * 
What went wrong:
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A 
problem occurred evaluating root project 'stephin'.
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > 
Failed to apply plugin [id 'org.gradle.scala']
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   
 > Could not find method scala() for arguments 
[build_3rdrt0tflrjfc3pjjv3f9udtb$_run_closure5$_closure74$_closure108@65c5e9d2] 
on object of type org.gradle.api.plugins.scala.ScalaPlugin.
09:47:39.316 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]

lets look at build.gradle location at line 471
  plugins.withType(ScalaPlugin) {
scala {
  zincVersion = versions.zinc
}

this is the scala compiler

i asked the gradle people which repository is supposed to contain 
scala-compiler-plugin (any version)
Gradle support response is "we dont know scala"

any idea?



From: Stephin Thomas 
Sent: Monday, February 8, 2021 4:08 AM
To: users@kafka.apache.org 
Subject: Re: Unable to run unit tests inside a docker container

@Martin Please see the build.gradle here


On Fri, Feb 5, 2021 at 1:31 AM Martin Gainty  wrote:

> * What went wrong:
> 18:54:25.681 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter]
> A problem occurred evaluating root project 'stephin'.
>
> 18:54:25.681 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] >
> Could not find method scalaCompiler() for arguments
> [org.scala-lang:scala-compiler:2.9.2] on object of type
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
>
>repositories {
> mavenCentral()
> jcenter()
> maven {
> url "http://maven.ow2.org/maven2/;
> }
> maven {
> url "http://maven.ow2.org/maven2-snapshot/;
> }
> maven {
>   url "https://plugins.gradle.org/m2/;
> }
>   }
>   apply from: file('gradle/buildscript.gradle'), to: buildscript
>   apply from: "$rootDir/gradle/dependencies.gradle"
>
>   dependencies {
> scalaCompiler "org.scala-lang:scala-compiler:2.9.2"
>
> send my your build.gradle asap
>
> m
>
> 
> From: Stephin Thomas 
> Sent: Thursday, February 4, 2021 3:11 AM
> To: users@kafka.apache.org 
> Subject: Re: Unable to run unit tests inside a docker container
>
> <
> https://github.com/apache/kafka/blob/trunk/clients/src/test/java/org/apache/kafka/common/network/SslVersionsTransportLayerTest.java
> >Here
> is the upstream link to the SslTransportLayerTest.java
> <
> https://github.com/apache/kafka/blob/trunk/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java
> >
> ,
> I've used.
> Thanks for looking into this.
>
> -Stephin
>
> On Wed, Feb 3, 2021 at 11:11 PM Martin Gainty  wrote:
>
> > authentication fail
> >
> > using basic-authentication you will need to supply correct
> > username/password
> > try ssh to server with supplied credentials from testcase
> > assume port is 
> > assume host ip is 10.0.0.1
> > assume password is MYPassword
> > assume username is mgainty
> >  ssh -p “MYPassword”  ssh -p  mgainty@10.0.0.1
> > if ssh fails then any programmatic authentication on your end will also
> > fail
> >
> > if you are authenticating with certs you will need a valid x509 cert and
> > public key
> > both of which need to be supplied to you from CA authenticator
> >
> > is there a way you can upload SslTransportLayerTest.java so we can look
> at
> > the code
> >
> ?org.apache.kafka.common.network.SslTransportLayerTest.testTlsDefaults(SslTransportLayerTest.java:587)
> >
> > m-
> >
> > 
> > From: Stephin Thomas 
> > Sent: Wednesday, February 3, 2021 9:30 AM
> > To: users@kafka.apache.org 
> > Subject: Re: Unable to run unit tests inside a docker container
> >
> > @Martin Thanks for the links and suggestions I tried with *--no-daemon*
> > option but it did not help. I assigned more memory to my docker container
> > (from 2GB to 8GB) and that sorted the unexpected 137 error.
> > But this time again the timeout issue appeared even with 3ms.
> >
> >
> https://gist.github.com/STEPHINRACHEL/b67f34e6ff1b3deb5338e8b6fb6b48ee#file-kafka-test-14-40-L10212
> >
> > Thanks
> > -Stephin
> >
> >
> >
> >
> >
> > On Wed, Feb 3, 2021 at 11:52 AM Martin Gainty 
> wrote:
> >
> > > one of 

Re: Unable to run unit tests inside a docker container

2021-02-08 Thread Stephin Thomas
@Martin Please see the build.gradle here


On Fri, Feb 5, 2021 at 1:31 AM Martin Gainty  wrote:

> * What went wrong:
> 18:54:25.681 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter]
> A problem occurred evaluating root project 'stephin'.
>
> 18:54:25.681 [ERROR]
> [org.gradle.internal.buildevents.BuildExceptionReporter] >
> Could not find method scalaCompiler() for arguments
> [org.scala-lang:scala-compiler:2.9.2] on object of type
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
>
>repositories {
> mavenCentral()
> jcenter()
> maven {
> url "http://maven.ow2.org/maven2/;
> }
> maven {
> url "http://maven.ow2.org/maven2-snapshot/;
> }
> maven {
>   url "https://plugins.gradle.org/m2/;
> }
>   }
>   apply from: file('gradle/buildscript.gradle'), to: buildscript
>   apply from: "$rootDir/gradle/dependencies.gradle"
>
>   dependencies {
> scalaCompiler "org.scala-lang:scala-compiler:2.9.2"
>
> send my your build.gradle asap
>
> m
>
> 
> From: Stephin Thomas 
> Sent: Thursday, February 4, 2021 3:11 AM
> To: users@kafka.apache.org 
> Subject: Re: Unable to run unit tests inside a docker container
>
> <
> https://github.com/apache/kafka/blob/trunk/clients/src/test/java/org/apache/kafka/common/network/SslVersionsTransportLayerTest.java
> >Here
> is the upstream link to the SslTransportLayerTest.java
> <
> https://github.com/apache/kafka/blob/trunk/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java
> >
> ,
> I've used.
> Thanks for looking into this.
>
> -Stephin
>
> On Wed, Feb 3, 2021 at 11:11 PM Martin Gainty  wrote:
>
> > authentication fail
> >
> > using basic-authentication you will need to supply correct
> > username/password
> > try ssh to server with supplied credentials from testcase
> > assume port is 
> > assume host ip is 10.0.0.1
> > assume password is MYPassword
> > assume username is mgainty
> >  ssh -p “MYPassword”  ssh -p  mgainty@10.0.0.1
> > if ssh fails then any programmatic authentication on your end will also
> > fail
> >
> > if you are authenticating with certs you will need a valid x509 cert and
> > public key
> > both of which need to be supplied to you from CA authenticator
> >
> > is there a way you can upload SslTransportLayerTest.java so we can look
> at
> > the code
> >
> ?org.apache.kafka.common.network.SslTransportLayerTest.testTlsDefaults(SslTransportLayerTest.java:587)
> >
> > m-
> >
> > 
> > From: Stephin Thomas 
> > Sent: Wednesday, February 3, 2021 9:30 AM
> > To: users@kafka.apache.org 
> > Subject: Re: Unable to run unit tests inside a docker container
> >
> > @Martin Thanks for the links and suggestions I tried with *--no-daemon*
> > option but it did not help. I assigned more memory to my docker container
> > (from 2GB to 8GB) and that sorted the unexpected 137 error.
> > But this time again the timeout issue appeared even with 3ms.
> >
> >
> https://gist.github.com/STEPHINRACHEL/b67f34e6ff1b3deb5338e8b6fb6b48ee#file-kafka-test-14-40-L10212
> >
> > Thanks
> > -Stephin
> >
> >
> >
> >
> >
> > On Wed, Feb 3, 2021 at 11:52 AM Martin Gainty 
> wrote:
> >
> > > one of the commiters changed all maven builds to gradle and now there
> are
> > > fails that produce non-traceable error codes like 137
> > > unfortunately he didnt test all gradle scenarios so this individual
> > > released a build whose untested scenarios that error out
> > >
> > > java - Why are my Gradle builds dying with exit-code 137? - Stack
> > Overflow<
> > >
> >
> https://stackoverflow.com/questions/38967991/why-are-my-gradle-builds-dying-with-exit-code-137
> > > >
> > > [
> > >
> >
> https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-i...@2.png?v=73d79a89bded
> > > ]<
> > >
> >
> https://stackoverflow.com/questions/38967991/why-are-my-gradle-builds-dying-with-exit-code-137
> > > >
> > > java - Why are my Gradle builds dying with exit-code 137? - Stack
> > Overflow<
> > >
> >
> https://stackoverflow.com/questions/38967991/why-are-my-gradle-builds-dying-with-exit-code-137
> > > >
> > > I've had similar issue on DigitalOcean's server, my gradle build failed
> > > completely on test stage with very similar stacktrace and without a
> > single
> > > test being executed.. It is stated in Gradle docs that gradle daemon
> > should
> > > not be run in CI environments.So I just added --no-daemon to my build
> > > command and everything worked well and good. Also stopping daemon with
> > > ./gradlew --stop has been useful ...
> > > stackoverflow.com
> > > gradle daemons wont run in CI containers please add
> > >
> > > ./gradlew build --no-daemon
> > >
> > > Please let me know your results
> > > martin
> > > 
> > > From: Stephin Thomas 
> > > Sent: Wednesday, February 3, 2021 2:58 AM
> > > To: