i'm trying to launch several nodes with this programmatic configuration
public class Server {
private Server() {
//TODO: MapStore/MapLoader config here
MapConfig accountMapConfig = new MapConfig(PropertiesLoader.ACCOUNT_MAP);
MapStoreConfig accountStoreConfig = new MapStoreConfig();
accountStoreConfig.setEnabled(true)
.setClassName("com.hazelcast.certification.domainstore.AccountStore")
.setInitialLoadMode(MapStoreConfig.InitialLoadMode.EAGER);
accountMapConfig.setMapStoreConfig(accountStoreConfig);
MapConfig merchantMapConfig = new MapConfig(PropertiesLoader.MERCHANT_MAP);
MapStoreConfig merchantStoreConfig = new MapStoreConfig();
merchantStoreConfig.setEnabled(true)
.setInitialLoadMode(MapStoreConfig.InitialLoadMode.EAGER)
.setClassName("com.hazelcast.certification.domainstore.MerchantStore");
merchantMapConfig.setMapStoreConfig(merchantStoreConfig);
MapConfig mRules = new MapConfig();
mRules.setName(PropertiesLoader.RULESRESULT_MAP);
//TODO: Config for WAN Replication
Config platform_config = new Config();
platform_config.setClusterName("source");
NetworkConfig networkConfig = platform_config.getNetworkConfig();
JoinConfig join = networkConfig.getJoin();
join.getMulticastConfig().setEnabled(false);
InterfacesConfig interfaceConfig = networkConfig.getInterfaces();
interfaceConfig.setEnabled( true )
.addInterface( "192.168.0.13" );
//TODO: Platform config here
platform_config.setLicenseKey(License.KEY_HE);
platform_config.addMapConfig(accountMapConfig);
platform_config.addMapConfig(merchantMapConfig);
platform_config.addMapConfig(mRules);
platform_config.getMapConfig(PropertiesLoader.ACCOUNT_MAP)
.setWanReplicationRef(new WanReplicationRef().setName("wololo"));
platform_config.getMapConfig(PropertiesLoader.MERCHANT_MAP)
.setWanReplicationRef(new WanReplicationRef().setName("wololo"));
platform_config.getMapConfig(PropertiesLoader.RULESRESULT_MAP)
.setWanReplicationRef(new WanReplicationRef().setName("wololo"));
WanReplicationConfig wanReplicationConfig = new WanReplicationConfig()
.setName("wololo");
WanBatchPublisherConfig batchPublisherConfig = new WanBatchPublisherConfig()
.setClusterName("jet")
.setTargetEndpoints("192.168.0.13:5703");
wanReplicationConfig.addBatchReplicationPublisherConfig(batchPublisherConfig);
platform_config.addWanReplicationConfig(wanReplicationConfig);
Hazelcast.newHazelcastInstance(platform_config);
}
public static void main(String[] args) {
new Server();
}
}
and i don't know why i'm getting 2 main errors when i start instances.
First one:
SEVERE: [192.168.0.13]:5701 [source] [4.3] Service with name 'hz:impl:jetService' not found!
com.hazelcast.core.HazelcastException: Service with name 'hz:impl:jetService' not found!
at com.hazelcast.spi.impl.NodeEngineImpl.getService(NodeEngineImpl.java:377)
at com.hazelcast.spi.impl.operationservice.Operation.getService(Operation.java:409)
at com.hazelcast.jet.impl.operation.AsyncOperation.beforeRun(AsyncOperation.java:45)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:214)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.run(OperationExecutorImpl.java:406)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.runOrExecute(OperationExecutorImpl.java:433)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvokeLocal(Invocation.java:596)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvoke(Invocation.java:581)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke0(Invocation.java:540)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:237)
at com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:59)
at com.hazelcast.client.impl.protocol.task.AbstractInvocationMessageTask.processInternal(AbstractInvocationMessageTask.java:38)
at com.hazelcast.client.impl.protocol.task.AbstractAsyncMessageTask.processMessage(AbstractAsyncMessageTask.java:71)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:152)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:115)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80)
Caused by: com.hazelcast.spi.exception.ServiceNotFoundException: Service with name 'hz:impl:jetService' not found!
... 20 more
and the Second One:
i dont know why im getting spam and more spams about the connection trying to connect the node with a certain address an endless loop
oct. 19, 2021 10:56:51 A. M. com.hazelcast.client.impl.ClientEngine
INFO: [192.168.0.13]:5701 [source] [4.3] Applying a new client selector :ClientSelector{any}
oct. 19, 2021 10:56:52 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=3, /192.168.0.13:5701->/192.168.0.13:52705, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:52 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=3, /192.168.0.13:5701->/192.168.0.13:52705, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:52 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=4, /192.168.0.13:5701->/192.168.0.13:52707, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid f6772096-f34b-4292-88db-d809d070604d, authentication failed
oct. 19, 2021 10:56:52 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=4, /192.168.0.13:5701->/192.168.0.13:52707, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:53 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=5, /192.168.0.13:5701->/192.168.0.13:52711, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:53 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=5, /192.168.0.13:5701->/192.168.0.13:52711, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:54 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=6, /192.168.0.13:5701->/192.168.0.13:52712, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:54 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=6, /192.168.0.13:5701->/192.168.0.13:52712, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:55 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=7, /192.168.0.13:5701->/192.168.0.13:52715, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:55 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=7, /192.168.0.13:5701->/192.168.0.13:52715, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:56 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=8, /192.168.0.13:5701->/192.168.0.13:52718, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:56 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=8, /192.168.0.13:5701->/192.168.0.13:52718, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:56 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=9, /192.168.0.13:5701->/192.168.0.13:52719, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:56 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=9, /192.168.0.13:5701->/192.168.0.13:52719, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:57 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=10, /192.168.0.13:5701->/192.168.0.13:52721, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:57 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=10, /192.168.0.13:5701->/192.168.0.13:52721, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:58 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=11, /192.168.0.13:5701->/192.168.0.13:52722, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 6930d85e-fe3b-4758-8712-8015a6022fc4, authentication failed
oct. 19, 2021 10:56:58 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=11, /192.168.0.13:5701->/192.168.0.13:52722, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:58 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=12, /127.0.0.1:5701->/127.0.0.1:52724, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid 244377e7-395e-4972-9a3c-b9d03fcdec50, authentication failed
oct. 19, 2021 10:56:58 A. M. com.hazelcast.internal.nio.tcp.TcpIpConnection
INFO: [192.168.0.13]:5701 [source] [4.3] Connection[id=12, /127.0.0.1:5701->/127.0.0.1:52724, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Connection closed by the other side
oct. 19, 2021 10:56:58 A. M. com.hazelcast.client.impl.protocol.task.AuthenticationMessageTask
WARNING: [192.168.0.13]:5701 [source] [4.3] Received auth from Connection[id=13, /127.0.0.1:5701->/127.0.0.1:52726, qualifier=null, endpoint=null, alive=true, connectionType=NONE] with clientUuid c1c696af-7e7c-4e63-8062-240baeca9c7f, authentication failed
I DONT WANT A SOLUTION, i just want to know is this happening when im trying to start a node.
Your source cluster is defined as
Config platform_config = new Config();
platform_config.setClusterName("source");
interfaceConfig.setEnabled( true )
.addInterface( "192.168.0.13" );
so presumably runs on 192.168.0.13.
Your target cluster has this definition
WanBatchPublisherConfig batchPublisherConfig = new WanBatchPublisherConfig()
.setClusterName("jet")
.setTargetEndpoints("192.168.0.13:5703");
So both are running on the same host.
This is fine, but the source cluster has no target port range specified, so will default to probing 5701 upwards when it starts. So it will find the target cluster on 5703, and try to join it as the same cluster rather than as two WAN connected clusters.
The easier solution is to set a port range for each cluster that doesn't overlap.
Use config.getNetworkConfig().setPort(i)
Related
I tried all the possible solutions available online. Changed my token with all permissions. Changed the gitlab connection with latest token. Still pipelines in gitlab shows the pending status. These are the logs from jenkins.
Mar 23, 2022 5:37:19 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Mar 23, 2022 5:37:19 PM WARNING com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
No gitlab client found.
Mar 23, 2022 5:38:13 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Mar 23, 2022 5:38:13 PM WARNING com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
No gitlab client found.
Mar 23, 2022 5:38:13 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Mar 23, 2022 5:38:13 PM WARNING com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
No gitlab client found.
Mar 23, 2022 5:38:14 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Mar 23, 2022 5:38:14 PM WARNING com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
No gitlab client found.
Mar 23, 2022 5:38:14 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Mar 23, 2022 5:38:14 PM WARNING com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
No gitlab client found.
Mar 23, 2022 5:38:14 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Mar 23, 2022 5:38:14 PM WARNING com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
No gitlab client found.
Mar 23, 2022 5:38:15 PM INFO org.jenkinsci.plugins.workflow.job.WorkflowRun finish
multi/pipelines-check #79 completed: SUCCESS
Mar 23, 2022 5:38:15 PM INFO io.jenkins.plugins.generic.event.HttpEventSender send
Skipped event sending due to receiver URL not set
Mar 23, 2022 5:38:16 PM WARNING jenkins.util.Listeners lambda$notify$0
null
java.lang.NullPointerException
at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.lambda$getStatusName$0(GitLabPipelineStatusNotifier.java:102)
at java.logging/java.util.logging.Logger.log(Logger.java:1050)
at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.getStatusName(GitLabPipelineStatusNotifier.java:101)
at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.getStatusName(GitLabPipelineStatusNotifier.java:84)
at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.logComment(GitLabPipelineStatusNotifier.java:178)
at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.access$500(GitLabPipelineStatusNotifier.java:52)
at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier$JobCompletedListener.onCompleted(GitLabPipelineStatusNotifier.java:484)
at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:207)
at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
at jenkins.util.Listeners.notify(Listeners.java:67)
at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:205)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:627)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$800(WorkflowRun.java:138)
at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1049)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1474)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:497)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:38)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
JENKINSFILE:
pipeline {
agent {label 'xxx'}
options {
gitLabConnection('xxx')
}
stages {
stage('Code') {
steps {
gitlabCommitStatus(connection: gitLabConnection(gitLabConnection: 'xxx', jobCredentialId: 'xxx-xxx-xxx-xxx-xxxxx', useAlternativeCredential: true), name: 'Code_checkout') {
checkout([$class: 'GitSCM', branches: [[name: '*/develop']], extensions: [[$class: 'GitLFSPull'], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'xxxxxx']], userRemoteConfigs: [[url: 'git#gitlab.com:xxxxx/xxxxxx/root.git']]])
sh'''
cd xxxxxxxxx
git submodule update --init --recursive
cd /home/jenkins/jenkins_slave/workspace/ROOT/vds
git checkout develop
git pull
cd xxxxxxxxxxx
'''
}
}
}
stage('Testing') {
steps {
gitlabCommitStatus(connection: gitLabConnection(gitLabConnection: 'xxxxxx', jobCredentialId: 'xxxxxxx', useAlternativeCredential: true), name: 'Testing') {
echo "checking"
}
}
}
}
all the code checkout part and testing part is happening in shell
You can use these two parameters in optionsblock
options {
gitLabConnection('gitlab')
gitlabBuilds(builds: ['build'])
}
and in post section you can use the updateGitlabCommitStatus like this
post {
failure {
updateGitlabCommitStatus name: 'build', state: 'failed'
}
unstable {
updateGitlabCommitStatus name: 'build', state: 'failed'
}
aborted {
updateGitlabCommitStatus name: 'build', state: 'canceled'
}
success {
updateGitlabCommitStatus name: 'build', state: 'success'
}
always {
}
}
For info checkout this section https://github.com/jenkinsci/gitlab-plugin/blob/master/README.md
It seems my Azure self hosted Linux agent has crashed:
/etc/systemd/system/vsts.agent.***.Dev\x20Tools.deploytools\x2d***.service
● vsts.agent.***.Dev\x20Tools.deploytools\x2d***.service - Azure Pipelines Agent (***.Dev Tools.deploytools-***)
Loaded: loaded (/etc/systemd/system/vsts.agent.***.Dev\x20Tools.deploytools\x2d***.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-07-27 14:20:41 UTC; 5min ago
Main PID: 26601 (runsvc.sh)
Tasks: 8 (limit: 2322)
Memory: 11.0M
CGroup: /system.slice/vsts.agent.***.Dev\x20Tools.deploytools\x2d***.service
├─26601 /bin/bash /home/peter/runsvc.sh
└─26604 ./externals/node10/bin/node ./bin/AgentService.js
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at Microsoft.VisualStudio.Services.Agent.HostTraceListener.CreatePageLogWriter()
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at Microsoft.VisualStudio.Services.Agent.HostTraceListener..ctor(String logFileDirectory, String logFilePrefix, Int32 pageSizeLimit, Int32 retentionDays)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at Microsoft.VisualStudio.Services.Agent.HostContext..ctor(String hostType, String logFile)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: at Microsoft.VisualStudio.Services.Agent.Listener.Program.Main(String[] args)
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: Agent listener exited with error code null
Jul 27 14:26:13 deploytools-*** runsvc.sh[26601]: Agent listener exit with undefined return code, re-launch agent in 5 seconds.
But I can't find a proper error. Can anyone see what is going on?
In the documentation, it looks like I can set up a plain text password instead of an encrypted one.
com.iplanet.am.service.secret
When using a plain text password, set this to the password for the agent profile, and leave am.encryption.pwd blank.
So, I've set the following in my OpenSSOAgentBootstrap.properties:
com.iplanet.am.service.secret = myPlainTextPassword
am.encryption.pwd =
Accessing the agent application now gives me:
java.lang.RuntimeException: Failed to load configuration: Invalid application password specified
com.sun.identity.agents.arch.AgentConfiguration.bootStrapClientConfiguration(AgentConfiguration.java:790)
com.sun.identity.agents.arch.AgentConfiguration.initializeConfiguration(AgentConfiguration.java:1140)
com.sun.identity.agents.arch.AgentConfiguration.<clinit>(AgentConfiguration.java:1579)
com.sun.identity.agents.arch.Manager.<clinit>(Manager.java:675)
com.sun.identity.agents.filter.AmAgentBaseFilter.initializeFilter(AmAgentBaseFilter.java:274)
com.sun.identity.agents.filter.AmAgentBaseFilter.getAmFilterInstance(AmAgentBaseFilter.java:364)
com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:73)
I also saw from here that I should be using com.iplanet.am.service.password instead. This did not work either.
Is there something that must be set on the OpenAM server? Am I missing something on the agent side of things?
Edit 1
OpenAM Server is v12.0.0, and the Tomcat agent is v3.3.0.
Log entries before the exception:
2015-04-01 12:44:09,634 [localhost-startStop-1] INFO org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'myapp': initialization started
2015-04-01 12:44:09,634 [localhost-startStop-1] INFO org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'myapp': startup date [Wed Apr 01 12:44:09 PDT 2015]; parent: Root WebApplicationContext
2015-04-01 12:44:09,634 [localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/servlet-context.xml]
Apr 01, 2015 12:44:09 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'myapp'
2015-04-01 12:44:09,775 [localhost-startStop-1] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'mvcContentNegotiationManager': replacing [Root bean: class [org.springframework.web.accept.ContentNegotiationManagerFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration; factoryMethodName=mvcContentNegotiationManager; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]]
2015-04-01 12:44:09,775 [localhost-startStop-1] INFO org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader - Skipping bean definition for [BeanMethod:name=mvcUriComponentsContributor,declaringClass=org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport]: a definition for bean 'mvcUriComponentsContributor' already exists. This top-level bean definition is considered as an override.
2015-04-01 12:44:09,994 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - Looking for #ControllerAdvice: WebApplicationContext for namespace 'myapp': startup date [Wed Apr 01 12:44:09 PDT 2015]; parent: Root WebApplicationContext
2015-04-01 12:44:10,135 [localhost-startStop-1] INFO org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler]
2015-04-01 12:44:10,182 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - Looking for #ControllerAdvice: WebApplicationContext for namespace 'myapp': startup date [Wed Apr 01 12:44:09 PDT 2015]; parent: Root WebApplicationContext
2015-04-01 12:44:10,213 [localhost-startStop-1] INFO org.apache.tiles.access.TilesAccess - Publishing TilesContext for context: org.springframework.web.servlet.view.tiles3.SpringWildcardServletTilesApplicationContext
2015-04-01 12:44:10,244 [localhost-startStop-1] INFO org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'myapp': initialization completed in 610 ms
Apr 01, 2015 12:44:10 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]
Apr 01, 2015 12:44:10 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]
java.lang.RuntimeException: Invalid application password specified
at com.sun.identity.agents.arch.AgentConfiguration.setApplicationPassword(AgentConfiguration.java:1030)
at com.sun.identity.agents.arch.AgentConfiguration.bootStrapClientConfiguration(AgentConfiguration.java:720)
at com.sun.identity.agents.arch.AgentConfiguration.initializeConfiguration(AgentConfiguration.java:1140)
at com.sun.identity.agents.arch.AgentConfiguration.<clinit>(AgentConfiguration.java:1579)
at com.sun.identity.agents.arch.Manager.<clinit>(Manager.java:675)
at com.sun.identity.agents.filter.AmAgentBaseFilter.initializeFilter(AmAgentBaseFilter.java:274)
at com.sun.identity.agents.filter.AmAgentBaseFilter.getAmFilterInstance(AmAgentBaseFilter.java:364)
at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
The agent's debug.out shows:
amAgentCore:04/01/2015 12:44:35:314 PM PDT: Thread[http-bio-8081-exec-1,5,main]
**********************************************
amAgentCore:04/01/2015 12:44:35:314 PM PDT: Thread[http-bio-8081-exec-1,5,main]
AgentConfiguration.setOrganizationName: organization name for realm is set to: /
amAgentCore:04/01/2015 12:44:35:314 PM PDT: Thread[http-bio-8081-exec-1,5,main]
AgentConfiguration: service resolver set to: com.sun.identity.agents.tomcat.v6.AmTomcatAgentServiceResolver
amAgentCore:04/01/2015 12:44:35:314 PM PDT: Thread[http-bio-8081-exec-1,5,main]
AgentConfiguration: service resolver reports EJBContext available: false
amAgentCore:04/01/2015 12:44:35:314 PM PDT: Thread[http-bio-8081-exec-1,5,main]
AgentConfiguration: Application User: myAgent
amSDK:04/01/2015 12:44:35:329 PM PDT: Thread[http-bio-8081-exec-1,5,main]
**********************************************
amSDK:04/01/2015 12:44:35:329 PM PDT: Thread[http-bio-8081-exec-1,5,main]
ERROR: JCEEncryption:: failed to decrypt data
java.lang.NullPointerException
at com.iplanet.services.util.JCEEncryption.pbeDecrypt(JCEEncryption.java:246)
at com.iplanet.services.util.JCEEncryption.decrypt(JCEEncryption.java:141)
at com.iplanet.services.util.Crypt.decode(Crypt.java:343)
at com.iplanet.services.util.Crypt.decryptLocal(Crypt.java:238)
at com.sun.identity.agents.arch.AM70Crypt.decrypt(AM70Crypt.java:57)
at com.sun.identity.agents.arch.AgentConfiguration.setApplicationPassword(AgentConfiguration.java:1020)
at com.sun.identity.agents.arch.AgentConfiguration.bootStrapClientConfiguration(AgentConfiguration.java:720)
at com.sun.identity.agents.arch.AgentConfiguration.initializeConfiguration(AgentConfiguration.java:1140)
at com.sun.identity.agents.arch.AgentConfiguration.<clinit>(AgentConfiguration.java:1579)
at com.sun.identity.agents.arch.Manager.<clinit>(Manager.java:675)
at com.sun.identity.agents.filter.AmAgentBaseFilter.initializeFilter(AmAgentBaseFilter.java:274)
at com.sun.identity.agents.filter.AmAgentBaseFilter.getAmFilterInstance(AmAgentBaseFilter.java:364)
at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Let us look at this source code taken from GitHub: OpenRock/OpenAM
private static synchronized void setApplicationPassword() {
if (!isInitialized()) {
try {
_crypt = ServiceFactory.getCryptProvider();
if(_crypt != null) {
String encodedPass = getProperty(SDKPROP_APP_PASSWORD);
_applicationPassword = _crypt.decrypt(encodedPass);
}
} catch (Exception ex) {
logError("AgentConfiguration: Unable to create new instance of " + "Crypt class with exception ", ex);
}
if (_applicationPassword == null || _applicationPassword.trim().length() == 0) {
throw new RuntimeException("Invalid application password specified");
}
}
}
The constant SDFSFD defined as:
public static final String SDKPROP_APP_PASSWORD = "com.iplanet.am.service.secret";
As you can see AgentConfiguration reads the password and stores it into encodedPass.
So I believe the method getCryptProvider returns broken Cryptprovider (_crypt). _crypt.decrypt(encodedPass) get NullPointerException and variable _applicationPassword get never initialized then RuntimeException will thrown.
Make sure your configuration allows or defines a CryptProvider.
ok i saw your edit
NullPointerException occurs here. Try to interpret that.
final Cipher pbeCipher = cipherProvider.getCipher(); // NPE
The documentation appears to be incorrect, from what I can tell based on the source code of AgentConfiguration, the password can be only provided in an encrypted format (which also means that am.encryption.pwd should be set up properly as well.
I'm a newbie to spring integration and I'm using the following code,
package services.api;
public interface GreetingService {
public void greetUsers(String userName);
}
package services.impl;
import services.api.GreetingService;
public class GreetServiceImpl implements GreetingService {
#Override
public void greetUsers(String userName) {
if (userName != null && userName.trim().length() > 0) {
System.out.println("Hello " + userName);
}
}
}
package main;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.support.MessageBuilder;
public class Main {
public static void main(String[] args)
{
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
MessageChannel messageChannel = applicationContext.getBean(MessageChannel.class);
Message<String> message = MessageBuilder.withPayload("World").build();
messageChannel.send(message);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://springframework.org/schema/integration http://springframework.org/schema/integration/spring-integration.xsd">
<channel id="pushChannel" />
<service-activator input-channel="pushChannel" ref="service"
method="greetUsers" />
<beans:bean id="service" class="services.impl.GreetServiceImpl" />
</beans:beans>
I'm getting the following error, eventhough I've declared only one message channel
Mar 04, 2014 4:46:23 PM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext#34d0cdd0: startup date [Tue Mar 04 16:46:23 IST 2014]; root of context hierarchy
Mar 04, 2014 4:46:23 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [applicationContext.xml]
Mar 04, 2014 4:46:23 PM org.springframework.beans.factory.config.PropertiesFactoryBean loadProperties
INFO: Loading properties file from URL [jar:file:/D:/Personal%20Data/Softwares/spring-framework-4.0.0.RELEASE-dist/SpringIntegration/spring-integration-3.0.0.RELEASE-dist/spring-integration-3.0.0.RELEASE/libs/spring-integration-core-3.0.0.RELEASE.jar!/META-INF/spring.integration.default.properties]
Mar 04, 2014 4:46:23 PM org.springframework.integration.config.xml.IntegrationNamespaceHandler registerHeaderChannelRegistry
INFO: No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
Mar 04, 2014 4:46:23 PM org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor registerErrorChannel
INFO: No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
Mar 04, 2014 4:46:23 PM org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor registerTaskScheduler
INFO: No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
Mar 04, 2014 4:46:23 PM org.springframework.beans.factory.config.PropertiesFactoryBean loadProperties
INFO: Loading properties file from URL [jar:file:/D:/Personal%20Data/Softwares/spring-framework-4.0.0.RELEASE-dist/SpringIntegration/spring-integration-3.0.0.RELEASE-dist/spring-integration-3.0.0.RELEASE/libs/spring-integration-core-3.0.0.RELEASE.jar!/META-INF/spring.integration.default.properties]
Mar 04, 2014 4:46:23 PM org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler initialize
INFO: Initializing ExecutorService 'taskScheduler'
Mar 04, 2014 4:46:23 PM org.springframework.context.support.DefaultLifecycleProcessor start
INFO: Starting beans in phase -2147483648
Mar 04, 2014 4:46:23 PM org.springframework.integration.endpoint.EventDrivenConsumer logComponentSubscriptionEvent
INFO: Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
Mar 04, 2014 4:46:23 PM org.springframework.integration.channel.PublishSubscribeChannel adjustCounterIfNecessary
INFO: Channel 'org.springframework.context.support.ClassPathXmlApplicationContext#34d0cdd0.errorChannel' has 1 subscriber(s).
Mar 04, 2014 4:46:23 PM org.springframework.integration.endpoint.EventDrivenConsumer start
INFO: started _org.springframework.integration.errorLogger
Mar 04, 2014 4:46:23 PM org.springframework.context.support.DefaultLifecycleProcessor start
INFO: Starting beans in phase 0
Mar 04, 2014 4:46:23 PM org.springframework.integration.endpoint.EventDrivenConsumer logComponentSubscriptionEvent
INFO: Adding {service-activator} as a subscriber to the 'pushChannel' channel
Mar 04, 2014 4:46:23 PM org.springframework.integration.channel.DirectChannel adjustCounterIfNecessary
INFO: Channel 'org.springframework.context.support.ClassPathXmlApplicationContext#34d0cdd0.pushChannel' has 1 subscriber(s).
Mar 04, 2014 4:46:23 PM org.springframework.integration.endpoint.EventDrivenConsumer start
INFO: started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
Exception in thread "main" org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.integration.MessageChannel] is defined: expected single matching bean but found 3: pushChannel,nullChannel,errorChannel
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:312)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:985)
at main.Main.main(Main.java:17)
I suggest you to read more Docs:
http://docs.spring.io/spring-integration/docs/3.0.1.RELEASE/reference/html
http://www.manning.com/fisher
As you see the framework provides two explicit channels: nullChannel, errorChannel.
And they aren't the last beans which are populated by framework.
To fix your issue just provide the id of your channel to applicationContext.getBean
I am trying to use the distributed executor service for hazelcast 3.1 and find that i am unable to use submitToMember(task,member). In my example below 10.69.108.60 is my local machine and 170.194.100.111 is my remote machine. I am able to get return value in my future when the member is my local machine but gives me a TargetNotAMemberException if the member is remote machine.
Below is the code
public class DistExecutionTest {
public static void main(String args[]){
DistributedExecutor dex = new DistributedExecutor();
try {
Member member = new MemberImpl(new Address("170.194.100.111",5701), false );
String msg;
msg = dex.echoOnTheMember("Hey youuuu!", member);
System.out.println(msg);
} catch (UnknownHostException e1) {
e1.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}catch (Exception e) {
e.printStackTrace();
}
}
}
and
public class DistributedExecutor {
Config config;
NetworkConfig network;
JoinConfig join;
DistributedExecutor(){
config = new Config();
network = config.getNetworkConfig();
// network.setPort(5701);
join = network.getJoin();
join.getMulticastConfig().setEnabled(false);
join.getTcpIpConfig().addMember("170.194.100.111").addMember("10.69.108.60").setEnabled(true);
network.getInterfaces().setEnabled(true).addInterface("170.194.100.*").addInterface("10.69.108.*");
}
public String echoOnTheMember(String input, Member member) throws Exception {
Callable<String> task = new DistObject(input);
HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);
IExecutorService executorService = hz.getExecutorService("default");
Future<String> future = executorService.submitToMember(task, member);
String distObjectResult = future.get();
return distObjectResult;
}
}
and
public class Echo implements Callable<String>, Serializable, HazelcastInstanceAware {
private static final long serialVersionUID = -3164053990811643392L;
String message = null;
transient HazelcastInstance localInstance;
public Echo(String msg){
message = msg;
}
#Override
public String call() throws Exception {
return localInstance.toString() + message;
}
#Override
public void setHazelcastInstance(HazelcastInstance hazelcastInstance) {
this.localInstance = hazelcastInstance;
}
}
Here is the logging on local machine
Dec 17, 2013 1:03:20 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Interfaces is enabled, trying to pick one address matching to one of: [162.124.194.*, 10.38.148.*]
Dec 17, 2013 1:03:20 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Prefer IPv4 stack is true.
Dec 17, 2013 1:03:20 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Picked Address[10.69.108.60]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
Dec 17, 2013 1:03:21 PM com.hazelcast.system
INFO: [10.69.108.60]:5701 [dev] Hazelcast Community Edition 3.1 (20131011) starting at Address[10.69.108.60]:5701
Dec 17, 2013 1:03:21 PM com.hazelcast.system
INFO: [10.69.108.60]:5701 [dev] Copyright (C) 2008-2013 Hazelcast.com
Dec 17, 2013 1:03:21 PM com.hazelcast.instance.Node
INFO: [10.69.108.60]:5701 [dev] Creating TcpIpJoiner
Dec 17, 2013 1:03:21 PM com.hazelcast.core.LifecycleService
INFO: [10.69.108.60]:5701 [dev] Address[10.69.108.60]:5701 is STARTING
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[10.69.108.60]:5703
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[10.69.108.60]:5702
Dec 17, 2013 1:03:21 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Connecting to /10.69.108.60:5703, timeout: 0, bind-any: true
Dec 17, 2013 1:03:21 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Connecting to /10.69.108.60:5702, timeout: 0, bind-any: true
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[170.194.100.111]:5703
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[170.194.100.111]:5702
Dec 17, 2013 1:03:21 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Connecting to /170.194.100.111:5703, timeout: 0, bind-any: true
Dec 17, 2013 1:03:21 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Connecting to /170.194.100.111:5702, timeout: 0, bind-any: true
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[170.194.100.111]:5701
Dec 17, 2013 1:03:21 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Connecting to /170.194.100.111:5701, timeout: 0, bind-any: true
Dec 17, 2013 1:03:22 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Could not connect to: /10.69.108.60:5703. Reason: SocketException[Connection refused: connect to address /10.69.108.60:5703]
Dec 17, 2013 1:03:22 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Could not connect to: /10.69.108.60:5702. Reason: SocketException[Connection refused: connect to address /10.69.108.60:5702]
Dec 17, 2013 1:03:22 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Could not connect to: /170.194.100.111:5703. Reason: SocketException[Connection refused: connect to address /170.194.100.111:5703]
Dec 17, 2013 1:03:22 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Could not connect to: /170.194.100.111:5702. Reason: SocketException[Connection refused: connect to address /170.194.100.111:5702]
Dec 17, 2013 1:03:22 PM com.hazelcast.nio.SocketConnector
INFO: [10.69.108.60]:5701 [dev] Could not connect to: /170.194.100.111:5701. Reason: SocketException[Connection refused: connect to address /170.194.100.111:5701]
Dec 17, 2013 1:03:23 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev]
Members [1] {
Member [10.69.108.60]:5701 this
}
Dec 17, 2013 1:03:23 PM com.hazelcast.core.LifecycleService
INFO: [10.69.108.60]:5701 [dev] Address[10.69.108.60]:5701 is STARTED
HazelcastInstance{name='_hzInstance_1_dev', node=Address[10.69.108.60]:5701}Hey youuuu!
The logging on the remote machine is on these lines.Couldnt paste all the logging.Managed to get the important part.
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[10.38.148.60]:5703
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[10.38.148.60]:5702
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[10.38.148.60]:5701
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[170.194.100.111]:5703
Dec 17, 2013 1:03:21 PM com.hazelcast.cluster.TcpIpJoiner
INFO: [10.69.108.60]:5701 [dev] Connecting to possible member: Address[170.194.100.111]:5702
Dec 17, 2013 1:03:21 PM com.hazelcast.nio.SocketConnector
Members [2] {
Member [10.69.108.60]:5701 this
Member [170.194.100.111]:5701
}
Instead of creating a member instance directly, could you get the member instance using the hz.getCluster().getMembers() method and select the one you want to send to? I want to see if it is caused by the way you are creating that member.
I can't format text in comments, so I'll put another answer.
So the problem you are suffering from is why your members don't form a cluster.
You should see logging like:
Members [2] {
Member [192.168.1.104]:5701 this
Member [192.168.1.104]:5702
}
That is why I need more logging that just your stacktrace, but that currently doesn't provide any more value. I need to see what Hazelcast says about joining other clusters.
I need to see something like this:
Dec 17, 2013 7:24:13 PM com.hazelcast.config.XmlConfigBuilder
INFO: Looking for hazelcast.xml config file in classpath.
Dec 17, 2013 7:24:13 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find hazelcast.xml in classpath.
Hazelcast will use hazelcast-default.xml config file in jar.
Dec 17, 2013 7:24:13 PM com.hazelcast.config.XmlConfigBuilder
INFO: Using configuration file /java/projects/Hazelcast/hazelcast/hazelcast/target/classes/hazelcast-default.xml in the classpath.
Dec 17, 2013 7:24:13 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Prefer IPv4 stack is true.
Dec 17, 2013 7:24:13 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Picked Address[192.168.1.102]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
Dec 17, 2013 7:24:13 PM com.hazelcast.system
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT] Hazelcast Community Edition 3.2-SNAPSHOT (20131217) starting at Address[192.168.1.102]:5701
Dec 17, 2013 7:24:13 PM com.hazelcast.system
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT] Copyright (C) 2008-2013 Hazelcast.com
Dec 17, 2013 7:24:13 PM com.hazelcast.instance.Node
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT] Creating MulticastJoiner
Dec 17, 2013 7:24:13 PM com.hazelcast.core.LifecycleService
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT] Address[192.168.1.102]:5701 is STARTING
Dec 17, 2013 7:24:15 PM com.hazelcast.cluster.MulticastJoiner
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT]
Members [1] {
Member [192.168.1.102]:5701 this
}
Dec 17, 2013 7:24:16 PM com.hazelcast.core.LifecycleService
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT] Address[192.168.1.102]:5701 is STARTED
Dec 17, 2013 7:24:16 PM com.hazelcast.partition.PartitionService
INFO: [192.168.1.102]:5701 [dev] [3.2-SNAPSHOT] Initializing cluster partition table first arrangement...
I was also getting the same error.
It is due to this line in echoonthemember function
HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);
It creates the new hazelcast instance of default or of cfg config. The member is searched in this instance of the hazelcast which is not actually present in it. Thus the error message is displayed as
TargetNotAMemberException.
To have it work properly, just pass the created instance in the echoonthemember function.
E.g by making it the member variable in class DistributedExecutor and setting it by the constructor.
then if your actual instance was 'abcdef', then
use as
IExecutorService executorService = abcdef.getExecutorService("default");
do not create new Hazelcast instance.