Skip to main content

#Proxy0 diskutieren mit

Hi,

 

I'm trying to setup a CI job in Bamboo which needs proxy configuration.

The mdapi:deploy command works without issues after setting the proxy settings:

 

npm config set https-proxy ${bamboo.proxyServer}:${bamboo.proxyPort}

npm config set proxy ${bamboo.proxyServer}:${bamboo.proxyPort}

export HTTP_PROXY=${bamboo.proxyServer}:${bamboo.proxyPort}

export HTTPS_PROXY=${bamboo.proxyServer}:${bamboo.proxyPort}

 

sfdx force:mdapi:deploy -d ./package -u ${bamboo.sfdc.username} --apiversion 46.0 --verbose -w 60

 

But, the following command to run specified tests:

 

sfdx force:apex:test:run -n $testList -u ${bamboo.sfdc.username} -w 60 --verbose

 

Throws the error below:

 

27-Aug-2019 19:14:03Listening for results

27-Aug-2019 19:14:03ERROR running force:apex:test:run:  Unable to invoke async test job: location is not defined

27-Aug-2019 19:14:04ApplicationInsights:CorrelationIdManager [ { Error: connect EINVAL 0.0.1.187:80 - Local (0.0.0.0:0)

27-Aug-2019 19:14:04      at internalConnect (net.js:884:16)

27-Aug-2019 19:14:04      at defaultTriggerAsyncIdScope (internal/async_hooks.js:294:19)

27-Aug-2019 19:14:04      at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1031:9)

27-Aug-2019 19:14:04      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:62:10)

27-Aug-2019 19:14:04    errno: 'EINVAL',

27-Aug-2019 19:14:04    code: 'EINVAL',

27-Aug-2019 19:14:04    syscall: 'connect',

27-Aug-2019 19:14:04    address: '0.0.1.187',

27-Aug-2019 19:14:04    port: 80 } ]

 

Any idea why it fails only while trying to execute tests?

 

Thanks in advance!

0/9000

I'm working on Streaming API using EMP connector, I'm able to subscribe to the channel and getting the successful response but the problem occurs when I try to configure proxy in the code. 

P.S.:- The proxy server I'm trying to configure is tried and tested. 

 

default Collection<? extends org.eclipse.jetty.client.ProxyConfiguration.Proxy> proxies() {

 

        int port = 1234;

 

        Collection<org.eclipse.jetty.client.ProxyConfiguration.Proxy> collection = new HashSet<ProxyConfiguration.Proxy>();

 

        org.eclipse.jetty.client.ProxyConfiguration.Proxy proxy =  new HttpProxy(new Address("hostname", port),false);

 

        collection.add(proxy);

 

        return collection;

 

    }

 

I end up getting below exception:-

 

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.

Exception in thread "main" java.util.concurrent.ExecutionException: org.eclipse.jetty.io.EofException

    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:653)

    at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:129)

    at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:102)

    at com.salesforce.emp.connector.example.DevLoginExample.main(DevLoginExample.java:33)

Caused by: org.eclipse.jetty.io.EofException

    at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)

    at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:808)

    at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)

    at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302)

    at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129)

    at org.eclipse.jetty.client.http.HttpSenderOverHTTP.sendHeaders(HttpSenderOverHTTP.java:108)

    at org.eclipse.jetty.client.HttpSender.send(HttpSender.java:204)

    at org.eclipse.jetty.client.http.HttpChannelOverHTTP.send(HttpChannelOverHTTP.java:78)

    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP$Delegate.send(HttpConnectionOverHTTP.java:218)

    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.send(HttpConnectionOverHTTP.java:91)

    at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.send(HttpDestinationOverHTTP.java:36)

    at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.send(HttpDestinationOverHTTP.java:26)

    at org.eclipse.jetty.client.PoolingHttpDestination$2.run(PoolingHttpDestination.java:144)

    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

    at java.lang.Thread.run(Thread.java:745)

Caused by: java.nio.channels.ClosedChannelException

    at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:270)

    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:461)

    at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:170)

    ... 15 more

 

Any suggestions?

0/9000