Unable to subscribe to change data capture event due to timeout error - salesforce

I am trying to consume Salesforce Change data capture events. I am following this article :https://trailhead.salesforce.com/content/learn/modules/change-data-capture/subscribe-to-events
I have followed following steps:
To get a local copy of the EMP-Connector GitHub repository:
$ git clone https://github.com/forcedotcom/EMP-Connector.git
To build the EMP-Connector tool:
$ cd EMP-Connector
$ mvn clean package
The mvn command generates JAR files in the target folder in the EMP-Connector project directory.
The generated JAR file, target/emp-connector-0.0.1-SNAPSHOT-phat.jar, includes the connector and the LoginExample functionality. The JAR contains all the dependencies for the connector, so you don’t have to download them separately.
To run EMP Connector against your Developer Edition or Trailhead Playground org,
type this command and supply your Trailhead Playground org or Salesforce org login credentials and the channel to subscribe to. In this example, the channel is /data/Employee__ChangeEvent.
$ java -jar target/emp-connector-0.0.1-SNAPSHOT-phat.jar <username> <password> /data/Employee__ChangeEvent
After last step, I am getting following error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: Connect Timeout
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101)
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:683)
at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:124)
at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:100)
at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:92)
at com.salesforce.emp.connector.example.LoginExample.lambda$main$0(LoginExample.java:48)
at com.salesforce.emp.connector.example.BearerTokenProvider.login(BearerTokenProvider.java:24)
at com.salesforce.emp.connector.example.LoginExample.main(LoginExample.java:56)
Caused by: java.net.SocketTimeoutException: Connect Timeout
at org.eclipse.jetty.io.ManagedSelector$Connect.run(ManagedSelector.java:801)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I see a similar issue is opened on github page https://github.com/forcedotcom/EMP-Connector/issues/99
Please provide suggestion to fix this issue

Related

Error trying to run sonarqube scanner using Jenkins

We have sonarqube scanner 2.6.1 installed on our Jenkins host. When trying to run sonarqube scanner from the Jenkins job we see the below
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString([B)Ljava/lang/String;
at org.sonar.core.util.UuidFactoryImpl.create(UuidFactoryImpl.java:78)
at org.sonar.core.util.Uuids.create(Uuids.java:45)
at org.sonar.core.platform.ComponentKeys.of(ComponentKeys.java:47)
at org.sonar.core.platform.ComponentKeys.of(ComponentKeys.java:35)
at org.sonar.core.platform.ComponentContainer.addComponent(ComponentContainer.java:229)
at org.sonar.core.platform.ComponentContainer.addSingleton(ComponentContainer.java:221)
at org.sonar.core.platform.ComponentContainer.<init>(ComponentContainer.java:104)
at org.sonar.core.platform.ComponentContainer.<init>(ComponentContainer.java:95)
at org.sonar.core.platform.ComponentContainer.<init>(ComponentContainer.java:91)
at org.sonar.batch.bootstrap.GlobalContainer.<init>(GlobalContainer.java:47)
at org.sonar.batch.bootstrap.GlobalContainer.create(GlobalContainer.java:52)
at org.sonar.batch.bootstrapper.Batch.start(Batch.java:102)
at org.sonar.batch.bootstrapper.Batch.start(Batch.java:92)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.start(BatchIsolatedLauncher.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.start(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:220)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarsource.scanner.cli.Main.execute(Main.java:70)
at org.sonarsource.scanner.cli.Main.main(Main.java:60)
Build step 'Invoke Standalone SonarQube Analysis' marked build as failure
As part of the Jenkins job we are copying code workspace for a build that is JDK 1.7 and running sonarqube scanner using JDK 1.8. This is just how it was setup in our environment
We resolved it by upgrading to sonar-scanner-3.0.3.778. Not sure why we saw this issue suddenly

jenkins htmlpublisher plugin install error

i wanted to install the HTML Publisher plugin in jenkins but when i try that, getting below error, any suggestion how to get the plugin installed.
jenkins version: 1.630.
Exception:
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install htmlpublisher plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:485)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
... 5 more
Caused by: java.io.IOException: Dependency workflow-step-api (1.4) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:475)
... 6 more
There may be 2 ways to install a plugin.
Download the hpi plugin file and place it in the plugin directory and restart the jenkins.
Install the plugin using the plugin section in the jenkins gui.
Looks like you are trying the first method. If so you need to first install the dependency plugins
workflow-step-api (version:1.4)
matrix-project (version:1.0)
Check this link for the same: https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin
If you are trying with second method, jenkins will take care of dependency installation.

ERROR [QueryResource] Cannot get excel for query

I executed a query in Saiku and tried to export it to Excel. It throws error page.
Below are the error logs :::
10:05:22,885 ERROR [QueryResource] Cannot get excel for query (01976CF4-EB20-DE88-94CA-E8E8F2A74EA5)
java.lang.NullPointerException
at sun.font.FontManager.getDefaultPlatformFont(FontManager.java:3409)
at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:263)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:164)
at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:254)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Please assist in resolving this.
You need to have the system fonts installed on your box, I'm guessing you're running a headless Linux system?

Running Flink Program on a Remote Cluster

I have a program in Apache Flink. I tested and ran it on the local machine and every thing works fine. To run the program on a remote cluster, I did necessary changes as mentioned in Apache Flink Official Website.
I did the following changes:
The two points below
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment("taskManagerName",
portNo,paralelismNo);
Fixing the necessary paths to read input files and write outputs.
Generate a thin jar out of the program and put the necessary jar
libraries into a folder besides my project jar file called
myproj.jar.
copying the data and the jar library and myproj.jar into the cluster
and run the following command remotely on the cluster:
java -cp pathToJarLib \\* -jar myproj.jar
But, I get the below error and I don't have any clue to fix the issue. There are no relevant log files which can aid me in fixing this issue.
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/api/common/functions/MapFunction
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
at java.lang.Class.getMethod0(Class.java:2813)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.api.common.functions.MapFunction
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
Your classpath is obviously not complete. Try to submit via bin/flink run myproj.jar. This sets up the classpath correctly.

Use Infinite Graph without installing the Product

I am currently writing a Infinite Graph Database Scanner where user can connect to remote InfiniteGraph by providing *.boot file. I am using Blueprint implementation of the InfiniteGraph
i.e. com.tinkerpop.blueprints.impls.ig.IGGraph.
Now the code works perfectly when the machine already has installed version of InfiniteGraph, but fails in other cases. I tried to bundle the bin folder from the installation directory with in my project, but it still fails.
The code I am using :
IGGraph graph = new IGGraph("D:\\PROPERTY_GRAPH_TEST.boot");
for (Vertex vertex : graph.getVertices()) {
System.out.println("vertex.toString() = " + vertex.toString());
}
The exception I am gettings :
Exception in thread "main" java.lang.RuntimeException: com.objy.db.ObjyRuntimeException: Query setup error: Configuration Error: Unable to find the objectivity.crg file.
at com.tinkerpop.blueprints.impls.ig.IGGraph.<init>(IGGraph.java:67)
at com.globalids.test.TestIGGraph.main(TestIGGraph.java:13)
Caused by: com.objy.db.ObjyRuntimeException: Query setup error: Configuration Error: Unable to find the objectivity.crg file.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.objy.pm.ErrorManager.exceptionToThrow(Unknown Source)
at com.objy.pm.ErrorManager.interpretKernelErrors(Unknown Source)
at com.objy.pm.ErrorManager.checkRegisteredErrors(Unknown Source)
at com.objy.pm.ExternalInterface.localErrorCheck(Unknown Source)
at com.objy.pm.ExternalInterface.checkedLong(Unknown Source)
at com.objy.pm.ExternalInterface.QueryScanItr(Unknown Source)
at com.objy.pm.QueryScanItr.<init>(Unknown Source)
at com.objy.db.internal.Query.execute(Unknown Source)
at com.infinitegraph.impl.ConnectionManager.verifyCompatability(ConnectionManager.java:211)
at com.infinitegraph.impl.ConnectionManager.connect(ConnectionManager.java:98)
at com.infinitegraph.GraphFactory.openGraph(GraphFactory.java:227)
at com.infinitegraph.GraphFactory.open(GraphFactory.java:86)
at com.tinkerpop.blueprints.impls.ig.IGGraph.<init>(IGGraph.java:62)
... 1 more
Can anyone help regarding this problem ??
Thank you in advance.
Thanks for your question. In fact the distribution requires more than just the "bin" copied over to run successfully. Can you make sure that the "etc" and "plugins" directory are each copied into the same directory as your "bin" directory? This is due to the fact that InfiniteGraph uses the location of the "bin" directory to find the other configuration files in the "etc" and "plugins" directories (where the file, objectivity.crg, and other required files are located). You can email support#objectivity.com if you have any further questions. Thanks!

Resources