Giter Club home page Giter Club logo

nr-salesforce-event-streaming's Issues

Ability to pass parameters as environment variables

Summary

At the moment, URL, username and password (could be obfuscated) needs to be added in the config file. This becomes a limitation when integrating and leveraging deployment tools and secrets manager when deploying to multiple environments without having to have seperate config files for each environment. In order to help with automating the deployment , it will have the capability to pass parameters dynamically.

Desired Behavior

One possibility is to have the required parameters be passed in on through ./nri-empcon.sh and have the config file auto-generated. This may require having a parameter input on events to be enabled.

Possible Solution

Additional context

Unexpected EOF exception when trying to run docker command

Description

When following the instructions from the docker deployment option, I am getting the below error logs when I run the docker command. This seems to be happening regardless of which Salesforce URL or credentials I am inputting. I am using the oauth2 client credentials login flow

Steps to Reproduce

Follow the steps in the docker deployment option for setting up the Salesforce/New Relic integration, to the point of running the docker command

Expected Behavior

The command successfully runs and the events are created in New Relic

Relevant Logs / Console output

2023-11-20 16:07:54 16:07:53,743 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [./config/logback.xml] at [file:/app/./config/logback.xml]
2023-11-20 16:07:54 16:07:53,932 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
2023-11-20 16:07:54 16:07:53,933 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
2023-11-20 16:07:54 16:07:53,945 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [stdout]
2023-11-20 16:07:54 16:07:54,040 |-WARN in ch.qos.logback.core.ConsoleAppender[stdout] - This appender no longer admits a layout as a sub-component, set an encoder instead.
2023-11-20 16:07:54 16:07:54,040 |-WARN in ch.qos.logback.core.ConsoleAppender[stdout] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
2023-11-20 16:07:54 16:07:54,040 |-WARN in ch.qos.logback.core.ConsoleAppender[stdout] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
2023-11-20 16:07:54 16:07:54,041 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.newrelic.fit.empcon] to INFO
2023-11-20 16:07:54 16:07:54,041 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [stdout] to Logger[com.newrelic.fit.empcon]
2023-11-20 16:07:54 16:07:54,042 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
2023-11-20 16:07:54 16:07:54,047 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@68f7aae2 - Registering current configuration as safe fallback point
2023-11-20 16:07:54
2023-11-20 16:07:54 2023-11-20 16:07:54 INFO Starting..
2023-11-20 16:07:54 2023-11-20 16:07:54 INFO NR_SF_ENV_CONF is set
2023-11-20 16:07:54 2023-11-20 16:07:54 INFO Creating consumer: Instance [url=https://10xfuture--stb.sandbox.my.salesforce.com, username=null, channel=/event/LoginEventStream, relayfrom=-1, proxy=null]
2023-11-20 16:07:54 2023-11-20 16:07:54 INFO connecting: https://10xfuture--stb.sandbox.my.salesforce.com
2023-11-20 16:07:55 2023-11-20 16:07:55 INFO proxyes : []
2023-11-20 16:07:55 2023-11-20 16:07:55 ERROR failed to connect: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@386654e9::DecryptedEndPoint@546e95b1{10xfuture--stb.sandbox.my.salesforce.com/35.176.92.21:443<->/172.17.0.2:51622,CLOSED,fill=-,flush=C,to=11/0}
2023-11-20 16:07:55 2023-11-20 16:07:55 ERROR exiting...
2023-11-20 16:07:55 java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@386654e9::DecryptedEndPoint@546e95b1{10xfuture--stb.sandbox.my.salesforce.com/35.176.92.21:443<->/172.17.0.2:51622,CLOSED,fill=-,flush=C,to=11/0}
2023-11-20 16:07:55 at com.newrelic.fit.empcon.AuthHelper.lambda$getBayeuxParametersSupplier$0(AuthHelper.java:62)
2023-11-20 16:07:55 at com.salesforce.emp.connector.example.BearerTokenProvider.login(BearerTokenProvider.java:24)
2023-11-20 16:07:55 at com.newrelic.fit.empcon.MonitoringConsumer.createConsumer(MonitoringConsumer.java:66)
2023-11-20 16:07:55 at com.newrelic.fit.empcon.MonitoringConsumer.connect(MonitoringConsumer.java:41)
2023-11-20 16:07:55 at com.newrelic.fit.empcon.Main.lambda$main$1(Main.java:60)
2023-11-20 16:07:55 at java.lang.Iterable.forEach(Iterable.java:75)
2023-11-20 16:07:55 at com.newrelic.fit.empcon.Main.main(Main.java:57)
2023-11-20 16:07:55 Caused by: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@386654e9::DecryptedEndPoint@546e95b1{10xfuture--stb.sandbox.my.salesforce.com/35.176.92.21:443<->/172.17.0.2:51622,CLOSED,fill=-,flush=C,to=11/0}
2023-11-20 16:07:55 at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)
2023-11-20 16:07:55 at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101)
2023-11-20 16:07:55 at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:683)
2023-11-20 16:07:55 at com.newrelic.fit.empcon.AuthHelper.oauthlogin(AuthHelper.java:85)
2023-11-20 16:07:55 at com.newrelic.fit.empcon.AuthHelper.lambda$getBayeuxParametersSupplier$0(AuthHelper.java:59)
2023-11-20 16:07:55 ... 6 more
2023-11-20 16:07:55 Caused by: java.io.EOFException: HttpConnectionOverHTTP@386654e9::DecryptedEndPoint@546e95b1{10xfuture--stb.sandbox.my.salesforce.com/35.176.92.21:443<->/172.17.0.2:51622,CLOSED,fill=-,flush=C,to=11/0}
2023-11-20 16:07:55 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.earlyEOF(HttpReceiverOverHTTP.java:338)
2023-11-20 16:07:55 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1551)
2023-11-20 16:07:55 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.shutdown(HttpReceiverOverHTTP.java:209)
2023-11-20 16:07:55 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:147)
2023-11-20 16:07:55 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
2023-11-20 16:07:55 at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
2023-11-20 16:07:55 at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
2023-11-20 16:07:55 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
2023-11-20 16:07:55 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
2023-11-20 16:07:55 at org.eclipse.jetty.io.ssl.SslConnection$1.run(SslConnection.java:144)
2023-11-20 16:07:55 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
2023-11-20 16:07:55 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
2023-11-20 16:07:55 at java.lang.Thread.run(Thread.java:748)

Your Environment

MacOS, docker desktop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.