Eureka Service fails with exception after client connects - java
I am following the example from here.
I also have the Eureka server running on localhost:8080.
As a next step I attempt to run the sample service, like this:
./gradlew :eureka-examples:runExampleService
Here is the output that I get:
$ ./gradlew :eureka-examples:runExampleService --stacktrace
Inferred project: eureka, version: 1.4.6-SNAPSHOT
Publication mavenNebula not found in project :.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
Publication named 'mavenNebula' does not exist for project ':' in task ':artifactoryPublish'.
None of the specified publications matched for project ':' - nothing to publish.
:eureka-client:compileJava UP-TO-DATE
:eureka-client:processResources UP-TO-DATE
:eureka-client:classes UP-TO-DATE
:eureka-client:writeManifestProperties UP-TO-DATE
:eureka-client:jar
:eureka-examples:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
:eureka-examples:processResources UP-TO-DATE
:eureka-examples:classes
:eureka-examples:runExampleService
[main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
[main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
[main] INFO com.netflix.config.DynamicPropertyFactory - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#46ee7fe8
[main] INFO com.netflix.config.util.ConfigurationUtils - Loaded properties file file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-service.properties
[main] WARN com.netflix.config.util.ConfigurationUtils - file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-service.properties is already loaded
[main] INFO com.netflix.appinfo.providers.EurekaConfigBasedInstanceInfoProvider - Setting initial instance status as: STARTING
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON encoding codec LegacyJacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON decoding codec LegacyJacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML encoding codec XStreamXml
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML decoding codec XStreamXml
[main] INFO com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver - Resolving eureka endpoints via configuration
[main] INFO com.netflix.discovery.DiscoveryClient - Disable delta property : false
[main] INFO com.netflix.discovery.DiscoveryClient - Single vip registry refresh property : null
[main] INFO com.netflix.discovery.DiscoveryClient - Force full registry fetch : false
[main] INFO com.netflix.discovery.DiscoveryClient - Application is null : false
[main] INFO com.netflix.discovery.DiscoveryClient - Registered Applications size is zero : true
[main] INFO com.netflix.discovery.DiscoveryClient - Application version is -1: true
[main] INFO com.netflix.discovery.DiscoveryClient - Getting all instance registry info from the eureka server
[main] INFO com.netflix.discovery.DiscoveryClient - The response status is 200
[main] INFO com.netflix.discovery.DiscoveryClient - Starting heartbeat executor: renew interval is: 30
[main] INFO com.netflix.discovery.InstanceInfoReplicator - InstanceInfoReplicator onDemand update allowed rate per min is 4
Registering service to eureka with STARTING status
Simulating service initialization by sleeping for 2 seconds...
Done sleeping, now changing status to UP
[main] INFO com.netflix.discovery.DiscoveryClient - Saw local status change event StatusChangeEvent [timestamp=1458260744041, current=UP, previous=STARTING]
Waiting ... verifying service registration with eureka ...
[DiscoveryClient-InstanceInfoReplicator-0] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_SAMPLEREGISTERINGSERVICE/Alenas-MacBook-Pro.local: registering service...
[DiscoveryClient-InstanceInfoReplicator-0] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_SAMPLEREGISTERINGSERVICE/Alenas-MacBook-Pro.local - registration status: 204
Waiting ... verifying service registration with eureka ...
Waiting ... verifying service registration with eureka ...
Service started and ready to process requests..
> Building 88% > :eureka-examples:runExampleService
After I start the client, like this:
$ ./gradlew :eureka-examples:runExampleClient
Inferred project: eureka, version: 1.4.6-SNAPSHOT
Publication mavenNebula not found in project :.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
Publication named 'mavenNebula' does not exist for project ':' in task ':artifactoryPublish'.
None of the specified publications matched for project ':' - nothing to publish.
:eureka-client:compileJava UP-TO-DATE
:eureka-client:processResources UP-TO-DATE
:eureka-client:classes UP-TO-DATE
:eureka-client:writeManifestProperties UP-TO-DATE
:eureka-client:jar
:eureka-examples:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
:eureka-examples:processResources UP-TO-DATE
:eureka-examples:classes
:eureka-examples:runExampleClient
[main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
[main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
[main] INFO com.netflix.config.DynamicPropertyFactory - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#46ee7fe8
[main] INFO com.netflix.config.util.ConfigurationUtils - Loaded properties file file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-client.properties
[main] WARN com.netflix.config.util.ConfigurationUtils - file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-client.properties is already loaded
[main] INFO com.netflix.appinfo.providers.EurekaConfigBasedInstanceInfoProvider - Setting initial instance status as: STARTING
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON encoding codec LegacyJacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON decoding codec JacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML encoding codec XStreamXml
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML decoding codec XStreamXml
[main] INFO com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver - Resolving eureka endpoints via configuration
[main] INFO com.netflix.discovery.DiscoveryClient - Disable delta property : false
[main] INFO com.netflix.discovery.DiscoveryClient - Single vip registry refresh property : null
[main] INFO com.netflix.discovery.DiscoveryClient - Force full registry fetch : false
[main] INFO com.netflix.discovery.DiscoveryClient - Application is null : false
[main] INFO com.netflix.discovery.DiscoveryClient - Registered Applications size is zero : true
[main] INFO com.netflix.discovery.DiscoveryClient - Application version is -1: true
[main] INFO com.netflix.discovery.DiscoveryClient - Getting all instance registry info from the eureka server
[main] INFO com.netflix.discovery.DiscoveryClient - The response status is 200
[main] INFO com.netflix.discovery.DiscoveryClient - Not registering with Eureka server per configuration
Found an instance of example service to talk to from eureka: sampleservice.mydomain.net:8001
healthCheckUrl: http://Alenas-MacBook-Pro.local:8001/healthcheck
override: UNKNOWN
Connected to server. Sending a sample request: FOO Thu Mar 17 17:11:33 PDT 2016
Waiting for server response..
Received response from server: BAR Thu Mar 17 17:11:33 PDT 2016
Exiting the client. Demo over..
BUILD SUCCESSFUL
Total time: 9.497 secs
It basically connects to the server and waits for response, etc.
At the same time on the service terminal I see the following happening. Sometimes when I do these actions I see the successful response on the eureka service:
Client got connected... processing request from the client
Received a request from the example client: FOO Thu Mar 17 17:30:16 PDT 2016
Sending the response to the client: BAR Thu Mar 17 17:30:16 PDT 2016
Simulating service doing work by sleeping for 10 seconds...
Removing registration from eureka
[main] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_SAMPLEREGISTERINGSERVICE/Alenas-MacBook-Pro.local - deregister status: 200
Shutting down server. Demo over.
BUILD SUCCESSFUL
Total time: 4 mins 53.331 secs
And sometimes it gives errors, like here:
Client got connected... processing request from the client
Received a request from the example client: FOO Thu Mar 17 17:33:30 PDT 2016
Sending the response to the client: BAR Thu Mar 17 17:33:30 PDT 2016
Simulating service doing work by sleeping for 10 seconds...
Removing registration from eureka
Exception in thread "main" java.lang.NoClassDefFoundError: com/netflix/discovery/shared/transport/decorator/EurekaHttpClientDecorator$2
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.cancel(EurekaHttpClientDecorator.java:71)
at com.netflix.discovery.DiscoveryClient.unregister(DiscoveryClient.java:886)
at com.netflix.discovery.DiscoveryClient.shutdown(DiscoveryClient.java:869)
at com.netflix.eureka.ExampleServiceBase.stop(ExampleServiceBase.java:89)
at com.netflix.eureka.ExampleServiceBase.start(ExampleServiceBase.java:80)
at com.netflix.eureka.ExampleEurekaService.main(ExampleEurekaService.java:45)
Caused by: java.lang.ClassNotFoundException: com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$2
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more
:eureka-examples:runExampleService FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':eureka-examples:runExampleService'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':eureka-examples:runExampleService'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365)
at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31)
at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:60)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more
BUILD FAILED
Total time: 1 mins 1.267 secs
Please, help me get the example properly running. What might be the problem?
Related
Testcontainer junit test skipped in azure build pipeline after moving to ubuntu 20
I have junit test with testcontainer in my project. #Testcontainers(disabledWithoutDocker = true) public class AutoHedgeDaoTest { #Container GenericContainer<?> mongoContainer = new GenericContainer<>("mongo:3.6.9").withExposedPorts(27017); MongoTemplate mongoTemplate; ... } I use azure devops pipeline to build my project - task: Maven#3 displayName: maven build inputs: mavenPomFile: 'fixByPassWeb/pom.xml' goals: 'clean install' options: ' -DbuildNumber=$(Build.BuildNumber)' publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' javaHomeOption: 'JDKVersion' jdkVersionOption: 1.11 mavenVersionOption: 'Default' mavenAuthenticateFeed: false effectivePomSkip: false sonarQubeRunAnalysis: false On November azure devops uses ubuntu 18 and all was good. This is part of log 14:58:14.857 [main] DEBUG org.testcontainers.utility.TestcontainersConfiguration - Testcontainers configuration overrides will be loaded from file:/home/vsts/.testcontainers.properties 14:58:15.309 [ducttape-0] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy - Pinging docker daemon... 14:58:15.332 [ducttape-0] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 14:58:15.433 [main] INFO org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy - Found docker client settings from environment 14:58:15.434 [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock 14:58:15.434 [main] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy - Checking Docker OS type for Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock 14:58:15.436 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 14:58:15.623 [main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost 14:58:15.624 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 14:58:15.643 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 14:58:15.662 [main] INFO org.testcontainers.DockerClientFactory - Connected to docker: Server Version: 19.03.13+azure API Version: 1.40 Operating System: Ubuntu 18.04.5 LTS Total Memory: 6927 MB 14:58:15.662 [main] DEBUG org.testcontainers.DockerClientFactory - Ryuk is enabled 14:58:15.670 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ListImagesCmdImpl[imageNameFilter=testcontainersofficial/ryuk:0.3.0,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder#0] 14:58:15.726 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Looking up auth config for image: testcontainersofficial/ryuk:0.3.0 at registry: index.docker.io 14:58:15.728 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - RegistryAuthLocator has configFile: /home/vsts/.docker/config.json (exists) and commandPathPrefix: 14:58:15.737 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - registryName [index.docker.io] for dockerImageName [testcontainersofficial/ryuk:0.3.0] 14:58:15.748 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - found existing auth config [AuthConfig{username=githubactions, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}] 14:58:15.750 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Cached auth found: [AuthConfig{username=githubactions, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}] 14:58:15.751 [main] DEBUG org.testcontainers.dockerclient.auth.AuthDelegatingDockerClientConfig - Effective auth config [AuthConfig{username=githubactions, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}] 14:58:16.929 [tc-okhttp-stream-559050604] INFO org.testcontainers.DockerClientFactory - Starting to pull image 14:58:16.942 [tc-okhttp-stream-559050604] DEBUG com.github.dockerjava.core.command.PullImageResultCallback - ResponseItem(stream=null, status=Pulling from testcontainersofficial/ryuk, progressDetail=null, progress=null, id=0.3.0, from=null, time=null, errorDetail=null, error=null, aux=null) 14:58:16.950 [tc-okhttp-stream-559050604] INFO org.testcontainers.DockerClientFactory - Pulling image layers: 0 pending, 0 downloaded, 0 extracted, (0 bytes/0 bytes) ……………. [INFO] Running com.AutoHedgeDaoTest ……………… 14:58:32.725 [main] INFO com.rencap.fo.fixbypass.web.AutoHedgeDaoTest - Connecting to mongodb://localhost:32769 …………………….. 14:58:33.592 [main] DEBUG org.testcontainers.utility.ResourceReaper - Removed container and associated volume(s): mongo:3.6.9 [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.047 s - in com.AutoHedgeDaoTest But now azure devops uses ubuntu 20. And currently test skipped. 18:16:28.143 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 18:16:28.295 [main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost 18:16:28.297 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 18:16:28.315 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 18:16:28.333 [main] INFO org.testcontainers.DockerClientFactory - Connected to docker: Server Version: 20.10.2+azure API Version: 1.41 Operating System: Ubuntu 20.04.2 LTS Total Memory: 6954 MB 18:16:28.334 [main] DEBUG org.testcontainers.DockerClientFactory - Ryuk is enabled 18:16:28.338 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ListImagesCmdImpl[imageNameFilter=testcontainersofficial/ryuk:0.3.0,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder#0] 18:16:28.374 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Looking up auth config for image: testcontainersofficial/ryuk:0.3.0 at registry: index.docker.io 18:16:28.376 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - RegistryAuthLocator has configFile: /home/vsts/.docker/config.json (exists) and commandPathPrefix: 18:16:28.381 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - registryName [index.docker.io] for dockerImageName [testcontainersofficial/ryuk:0.3.0] 18:16:28.392 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - found existing auth config [AuthConfig{username=githubactions, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}] 18:16:28.392 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Cached auth found: [AuthConfig{username=githubactions, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}] 18:16:28.392 [main] DEBUG org.testcontainers.dockerclient.auth.AuthDelegatingDockerClientConfig - Effective auth config [AuthConfig{username=githubactions, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}] 18:16:28.419 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.command.CreateContainerCmdImpl#70925b45[name=testcontainers-ryuk-0dd3967c-ded1-45bb-9174-5710ca968be4,hostName=,domainName=,user=,attachStdin=,attachStdout=,attachStderr=,portSpecs=,tty=,stdinOpen=,stdInOnce=,env=,cmd=,healthcheck=,argsEscaped=,entrypoint=,image=testcontainersofficial/ryuk:0.3.0,volumes=com.github.dockerjava.api.model.Volumes#4263b080,workingDir=,macAddress=,onBuild=,networkDisabled=,exposedPorts=com.github.dockerjava.api.model.ExposedPorts#2af616d3,stopSignal=,stopTimeout=,hostConfig=HostConfig(binds=[//var/run/docker.sock:/var/run/docker.sock:rw], blkioWeight=null, blkioWeightDevice=null, blkioDeviceReadBps=null, blkioDeviceWriteBps=null, blkioDeviceReadIOps=null, blkioDeviceWriteIOps=null, memorySwappiness=null, nanoCPUs=null, capAdd=null, capDrop=null, containerIDFile=null, cpuPeriod=null, cpuRealtimePeriod=null, cpuRealtimeRuntime=null, cpuShares=null, cpuQuota=null, cpusetCpus=null, cpusetMems=null, devices=null, deviceCgroupRules=null, deviceRequests=null, diskQuota=null, dns=null, dnsOptions=null, dnsSearch=null, extraHosts=null, groupAdd=null, ipcMode=null, cgroup=null, links=[], logConfig=com.github.dockerjava.api.model.LogConfig#5910de75, lxcConf=null, memory=null, memorySwap=null, memoryReservation=null, kernelMemory=null, networkMode=null, oomKillDisable=null, init=null, autoRemove=true, oomScoreAdj=null, portBindings=null, privileged=false, publishAllPorts=true, readonlyRootfs=null, restartPolicy=null, ulimits=null, cpuCount=null, cpuPercent=null, ioMaximumIOps=null, ioMaximumBandwidth=null, volumesFrom=null, mounts=null, pidMode=null, isolation=null, securityOpts=null, storageOpt=null, cgroupParent=null, volumeDriver=null, shmSize=null, pidsLimit=null, runtime=null, tmpFs=null, utSMode=null, usernsMode=null, sysctls=null, consoleSize=null),labels={org.testcontainers=true},shell=,networkingConfig=,ipv4Address=,ipv6Address=,aliases=,authConfig=AuthConfig(username=githubactions, password=3d6472b9-3d49-4d17-9fc9-90d24258043b, email=null, registryAddress=https://index.docker.io/v1/, auth=Z2l0aHViYWN0aW9uczozZDY0NzJiOS0zZDQ5LTRkMTctOWZjOS05MGQyNDI1ODA0M2I=, registrytoken=null, identitytoken=null, stackOrchestrator=null)] [INFO] Running com.AutoHedgeDaoTest [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.006 s - in com.AutoHedgeDaoTest
From above error log, an old version of testcontainers was in use. Upgrading the testcontainers dependency to the latest version 1.15.2 fixed above issue.
springboot app on azure app service stops right after start
I have a spring boot rest application on azure app service. Anytime I deploy an application with azure DevOps pipeline or with azure-webapp-maven-plugin directly, the deployment works successfully as I can see all the uploaded files in site/wwwroot/webapps/ROOT from the Kudu Debug Console. When I try to hit any endpoint or even the application URL, it returns a 404(Not Found error). I pulled up the logs and this is what I find. [DEBUG] 2020-05-24 10:45:31,644 org.springframework.core.env.PropertySourcesPropertyResolver logKeyFound - - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'servletContextInitParams' with value of type String [INFO] 2020-05-24 10:45:31,660 com.company.product.core.MainApplication logStarted - - Started MainApplication in 37.424 seconds (JVM running for 65.143) [DEBUG] 2020-05-24 10:45:32,347 org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext doClose - - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#60d5a711, started on Sun May 24 10:44:58 GMT 2020 [DEBUG] 2020-05-24 10:45:32,378 org.springframework.core.env.PropertySourcesPropertyResolver logKeyFound - - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'servletContextInitParams' with value of type String [DEBUG] 2020-05-24 10:45:32,456 org.springframework.context.support.DefaultLifecycleProcessor stop - - Stopping beans in phase 2147483647 [DEBUG] 2020-05-24 10:45:32,456 org.springframework.context.support.DefaultLifecycleProcessor lambda$doStop$2 - - Bean 'documentationPluginsBootstrapper' completed its stop procedure [DEBUG] 2020-05-24 10:45:32,456 org.springframework.jmx.export.annotation.AnnotationMBeanExporter destroy - - Unregistering JMX-exposed beans on shutdown [DEBUG] 2020-05-24 10:45:32,456 org.springframework.jmx.export.annotation.AnnotationMBeanExporter unregisterBeans - - Unregistering JMX-exposed beans [INFO] 2020-05-24 10:45:32,456 org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shutdown - - Shutting down ExecutorService 'applicationTaskExecutor' The application shuts down right after it's initialized. It looks to me as if the app service is sending a shutdown command to the spring boot application. Can anybody help with this? I'm pressed on time. Thanks in advance.
Usually we deploy spring boot app to azure web app by using jar file. Here are the steps: 1.Go to your webapp in the portal->Configuration->check the Java container. We will use Java SE instead of Tomcat. 2.Go to your webapp in the portal->Advanced Tools->Debug console->Cmd. Put your jar file under wwwroot folder. Need to name it as app.jar. 3.The result
WSO2: Point-to-Point Messaging
I am following this tutorial https://docs.wso2.com/display/EI630/Point-to-Point+Messaging#865c10b8d4d64ac688d6a0799cfb6012 and after reaching Step 2 i.e. running the JMS Publisher I am getting the error in JMeter that Thread Name: Thread Group 1-1 Sample Start: 2019-09-25 06:11:40 NPT Load time: 0 Connect Time: 0 Latency: 0 Size in bytes: 1209 Sent bytes:0 Headers size in bytes: 0 Body size in bytes: 1209 Sample Count: 1 Error Count: 1 Data type ("text"|"bin"|""): Response code: 000 Response message: javax.naming.NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: org.wso2.andes.jndi.PropertiesFileInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.wso2.andes.jndi.PropertiesFileInitialContextFactory ] SampleResult fields: ContentType: DataEncoding: UTF-8 I have followed the required jar files as instructed in Jmeter lib folder, also I am running Jmeter with Admin permissions. Still I am getting this error: Response message: javax.naming.NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: org.wso2.andes.jndi.PropertiesFileInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.wso2.andes.jndi.PropertiesFileInitialContextFactory ] How can I fix this? What am I missing? After providing jar in test plan, browse option (so that I don't have to restart), still it is giving class not found error. Here are the logs: 2019-09-25 15:10:19,299 INFO o.j.r.JARSourceHTTP: Requesting https://jmeter-plugins.org/repo/?installID=docker-461b0856afade2414c8e3dfbab5ca751-gui 2019-09-25 15:10:20,264 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2019-09-25 15:10:20,266 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2019-09-25 15:10:20,266 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2019-09-25 15:10:20,266 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2019-09-25 15:10:20,266 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 2019-09-25 15:10:20,267 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser 2019-09-25 15:10:22,056 INFO o.a.j.e.KeyToolUtils: keytool found at 'keytool' 2019-09-25 15:10:22,057 INFO o.a.j.p.h.p.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file E:\apache-jmeter-5.0\bin\proxyserver.jks 2019-09-25 15:10:22,781 INFO o.a.j.s.FileServer: Default base='C:\Windows\system32' 2019-09-25 15:10:25,004 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times 2019-09-25 15:10:25,004 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 2019-09-25 15:10:25,004 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true 2019-09-25 15:10:25,004 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000 2019-09-25 15:10:28,324 WARN o.j.r.PluginManagerMenuItem: Failed to load plugin updates info java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:131) ~[jcl-over-slf4j-1.7.25.jar:1.7.25] at org.apache.http.client.protocol.RequestAuthCache.process(RequestAuthCache.java:77) ~[httpclient-4.5.6.jar:4.5.6] at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133) ~[httpcore-4.4.10.jar:4.4.10] at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:167) ~[httpcore-4.4.10.jar:4.4.10] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:484) ~[httpclient-4.5.6.jar:4.5.6] at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.6.jar:4.5.6] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.6.jar:4.5.6] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.6.jar:4.5.6] at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:499) ~[jmeter-plugins-manager-1.3.jar:?] at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:494) ~[jmeter-plugins-manager-1.3.jar:?] at org.jmeterplugins.repository.JARSourceHTTP.getJSON(JARSourceHTTP.java:152) ~[jmeter-plugins-manager-1.3.jar:?] at org.jmeterplugins.repository.JARSourceHTTP.getRepositories(JARSourceHTTP.java:276) ~[jmeter-plugins-manager-1.3.jar:?] at org.jmeterplugins.repository.JARSourceHTTP.getRepo(JARSourceHTTP.java:304) ~[jmeter-plugins-manager-1.3.jar:?] at org.jmeterplugins.repository.PluginManager.load(PluginManager.java:71) ~[jmeter-plugins-manager-1.3.jar:?] at org.jmeterplugins.repository.PluginManagerMenuItem$1.run(PluginManagerMenuItem.java:41) [jmeter-plugins-manager-1.3.jar:?] 2019-09-25 15:18:30,504 INFO o.a.j.g.a.Load: Loading file: F:\Training\MQ\MQPubslisher.jmx 2019-09-25 15:18:30,505 INFO o.a.j.s.FileServer: Set new base='F:\Training\MQ' 2019-09-25 15:18:31,128 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2 2019-09-25 15:18:31,168 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8 2019-09-25 15:18:31,171 INFO o.a.j.s.SaveService: Using SaveService properties version 5.0 2019-09-25 15:18:31,178 INFO o.a.j.s.SaveService: Loading file: F:\Training\MQ\MQPubslisher.jmx 2019-09-25 15:18:32,513 INFO o.a.j.s.FileServer: Set new base='F:\Training\MQ' 2019-09-25 15:27:32,675 INFO o.a.j.s.FileServer: Set new base='F:\Training\MQ' 2019-09-25 15:28:58,900 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2019-09-25 15:28:58,902 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2019-09-25 15:28:58,903 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2019-09-25 15:28:58,950 INFO o.a.j.t.TestPlan: added E:\apache-jmeter-5.0\lib\andes-client-4.0.0.jar to classpath 2019-09-25 15:28:58,952 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*) 2019-09-25 15:28:59,559 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group 2019-09-25 15:28:59,564 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group. 2019-09-25 15:28:59,565 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error 2019-09-25 15:28:59,566 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false 2019-09-25 15:28:59,590 INFO o.a.j.t.ThreadGroup: Started thread group number 1 2019-09-25 15:28:59,590 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started 2019-09-25 15:28:59,593 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1 2019-09-25 15:28:59,759 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1 2019-09-25 15:28:59,760 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1 2019-09-25 15:28:59,761 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test 2019-09-25 15:28:59,766 INFO o.a.j.p.j.c.InitialContextFactory: InitialContextFactory.close() called and Context instances cleaned up 2019-09-25 15:28:59,766 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
Remember that you need to restart JMeter for any property change and when you add .jars under JMeter Classpath, otherwise the changes will not be picked up. According to The Real Secret to Building a Database Test Plan With JMeter article it should be also possible to add the libraries to JMeter Classpath at Test Plan level like: in that case JMeter restart will not be required
I had the same issue, I solve it by removing a whitespace at the end of the Initial Context Factory field.
Nifi commands on windows
In my current project, I have been using apache-nifi on Windows operating system. I have extracted nifi-0.7.0-bin.zip file in C:\. Now, when I run \bin\run-nifi.bat as an administrator I see the following message on the command line and I am not able to run nifi. Could you please suggest what should I do in order to run the nifi. the content of app.log file as follows 2016-08-08 11:41:57,716 INFO [main] org.apache.nifi.NiFi Launching NiFi... 2016-08-08 11:41:57,851 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 50050 2016-08-08 11:41:57,877 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap 2016-08-08 11:42:59,485 WARN [Timer-0] org.apache.nifi.NiFi NiFi has detected that this box is not responding within the expected timing interval, which may cause Processors to be scheduled erratically. Please see the NiFi documentation for more information. The content of nifi-bootstrap.log file is as follows: 2016-08-08 11:41:57,279 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: [] 2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED 2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED 2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED 2016-08-08 11:41:57,298 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi... 2016-08-08 11:41:57,299 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NIFI-0~1.0 2016-08-08 11:41:57,299 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\jdk1.8.0_102\bin\java.exe -classpath C:\NIFI-0~1.0\.\conf;C:\NIFI-0~1.0\.\lib\jcl-over-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\jul-to-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\log4j-over-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\logback-classic-1.1.3.jar;C:\NIFI-0~1.0\.\lib\logback-core-1.1.3.jar;C:\NIFI-0~1.0\.\lib\nifi-api-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-documentation-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-nar-utils-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-properties-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-runtime-0.7.0.jar;C:\NIFI-0~1.0\.\lib\slf4j-api-1.7.12.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=C:\NIFI-0~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=50049 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-0~1.0\bin\..\\logs org.apache.nifi.NiFi 2016-08-08 11:41:57,866 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read status file C:\NIFI-0~1.0\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file 2016-08-08 11:41:57,876 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 50050
I recommend running NiFi with the current directory context in the bin directory: Open a new command prompt window Change to the NiFi bin directory, cd c:\nifi-0.7\bin From c:\nifi-0.7\bin, execute run-nifi.bat I believe run-nifi.bat depends on finding nifi-env.bat in the current directory, rather than finding it relative to its own path. If you ran C:\...\nifi-0.7.0\bin\run-nifi.bat, I think you would see that error.
using hive got exception java.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunning
after configuring hadoop I could run hdfs then install hive and edit the conf file to make it run on tez by default, but running into some special issue when using hive directly: hive Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunning at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:353) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) Version Info: hadoop: 2.5 hive 0.13 tez 0.41 anyone met this before? seems not like a PATH related error.
My peoblem is: Could not open connection to jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (state=08S01,code=0) Here is my solution and the progress to figure it out: when run the below command to start hiveserver2 hive --service hiveserver2 the log tells the Excetion: Error starting HiveServer2 on attempt 1, will retry in 60000ms java.lang.NoClassDefFoundError: org/apache/tez/dag/api/TezConfiguration but continue to look up we find that 2018-11-16T18:45:14,836 INFO [main] server.HiveServer2: HS2 interactive HA not enabled. Starting tez sessions.. 2018-11-16T18:45:14,836 INFO [main] server.HiveServer2: Starting/Reconnecting tez sessions.. so the reason is thad the default setting disable the HS2 interactive HA configuration. just chage to true to fix this in the hive-site.xml <property> <name>hive.server2.active.passive.ha.enable</name> <value>false</value> # change false to true </property> Problem solved !!! part of the logs(releated to the Tez): 2018-11-16T18:45:14,835 INFO [main] server.HiveServer2: Web UI has started on port 10002 2018-11-16T18:45:14,836 INFO [main] server.HiveServer2: HS2 interactive HA not enabled. Starting tez sessions.. 2018-11-16T18:45:14,836 INFO [main] server.HiveServer2: Starting/Reconnecting tez sessions.. 2018-11-16T18:45:14,836 INFO [main] server.HiveServer2: Initializing tez session pool manager 2018-11-16T18:45:14,847 INFO [main] server.HiveServer2: Shutting down HiveServer2 2018-11-16T18:45:14,847 INFO [main] service.AbstractService: Service:ThriftBinaryCLIService is stopped. 2018-11-16T18:45:14,847 INFO [main] service.AbstractService: Service:OperationManager is stopped. 2018-11-16T18:45:14,848 INFO [main] service.AbstractService: Service:SessionManager is stopped. 2018-11-16T18:45:14,850 INFO [main] service.AbstractService: Service:CLIService is stopped. 2018-11-16T18:45:14,850 INFO [main] service.AbstractService: Service:HiveServer2 is stopped. 2018-11-16T18:45:14,847 INFO [main] thrift.ThriftCLIService: Thrift server has stopped 2018-11-16T18:45:14,866 INFO [main] server.HiveServer2: Stopping/Disconnecting tez sessions. 2018-11-16T18:45:14,866 INFO [main] server.HiveServer2: Stopped tez session pool manager. 2018-11-16T18:45:14,869 WARN [main] server.HiveServer2: Error starting HiveServer2 on attempt 1, will retry in 60000ms java.lang.NoClassDefFoundError: org/apache/tez/dag/api/TezConfiguration at org.apache.hadoop.hive.ql.exec.tez.TezSessionPoolSession$AbstractTriggerValidator.startTriggerValidator(TezSessionPoolSession.java:74) ~[hive-exec-3.1.1.jar:3.1.1]
I temporarily solved this by add hiveconf to force hive use mr engine not tez; like this: hive -hiveconf hive.execution.engine=mr -e "my sql" but as I want to use tez, anyone could help?
For me I had to add the below dir to the classpath. This is mapr specific but other distro will have similar path /opt/mapr/tez/tez-0.9/lib/*:/opt/mapr/tez/tez-0.9/*