Giter Club home page Giter Club logo

Comments (12)

dlmcpaul avatar dlmcpaul commented on August 22, 2024

Do you run as a java jar or the docker image?

If the docker image can you try the dlmcpaul/enphasecollector:experimental image

from enphasecollector.

paradizelost avatar paradizelost commented on August 22, 2024

So, i'm getting java SSL errors on this version. Looks like it doesn't like the self-signed ssl certificate that the envoy uses:

enphaseCollector | Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target enphaseCollector | at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:371) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:309) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:654) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:369) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455) ~[na:na] enphaseCollector | at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426) ~[na:na] enphaseCollector | at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.13.jar:4.5.13] enphaseCollector | at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:87) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.BufferingClientHttpRequestWrapper.executeInternal(BufferingClientHttpRequestWrapper.java:63) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:109) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.boot.actuate.metrics.web.client.MetricsClientHttpRequestInterceptor.intercept(MetricsClientHttpRequestInterceptor.java:86) ~[spring-boot-actuator-2.6.13.jar:2.6.13] enphaseCollector | at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:93) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:77) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:776) ~[spring-web-5.3.23.jar:5.3.23] enphaseCollector | ... 17 common frames omitted

from enphasecollector.

dlmcpaul avatar dlmcpaul commented on August 22, 2024

So was this the experimental docker image? or the 0.25 version?

Maybe add the commands used to run the app?

Also I assume you have a V7 envoy?

from enphasecollector.

paradizelost avatar paradizelost commented on August 22, 2024

from enphasecollector.

dlmcpaul avatar dlmcpaul commented on August 22, 2024

Ok pushed a new experimental image with some additional logging.

Are you providing a token you generated or the enphase web user/password?

from enphasecollector.

paradizelost avatar paradizelost commented on August 22, 2024

from enphasecollector.

dlmcpaul avatar dlmcpaul commented on August 22, 2024

I thought I was ignoring the SSL certificates. The relevant code

				.setSSLContext(new SSLContextBuilder().loadTrustMaterial(new TrustAllStrategy()).build())
				.setSSLHostnameVerifier(new NoopHostnameVerifier())

from https://github.com/dlmcpaul/EnphaseCollector/blob/master/src/main/java/com/hz/services/EnvoyConnectionProxy.java should trust the cert anyway and not verify the hostname vs cert.

from enphasecollector.

dlmcpaul avatar dlmcpaul commented on August 22, 2024

Can you provide the full log up to the error and the command you are using to start the container?

I can only think that one of the non ssl calls now needs ssl.

from enphasecollector.

paradizelost avatar paradizelost commented on August 22, 2024

This is the ssl error i get on startup.
image

if i put it behind an nginx proxy with a valid ssl certificate i get:
image

from enphasecollector.

dlmcpaul avatar dlmcpaul commented on August 22, 2024

Ok, I was afraid of that. Looks like all except the info.xml are now https only.

Under V5 only certain endpoints were protected. My previous V7 testing showed them as still open but now I guess they are secured, at least behind TLS.

Ok, I have made a new experimental build that use the protected client for all endpoints. Please try that one.

from enphasecollector.

paradizelost avatar paradizelost commented on August 22, 2024

Updated and can confirm that has taken care of the issue. Thanks!

from enphasecollector.

dlmcpaul avatar dlmcpaul commented on August 22, 2024

Ok I will likely do a full release soon

from enphasecollector.

Related Issues (20)

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.