httpcfg -list
Port: 443 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
CertificateFile: eventstore.crt
SslValidateServer: False
CertificateThumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
Starting Normal TCP listening on TCP endpoint: xxx.xxx.xx.xx:1113.
[24864,13,13:53:30.032] Starting HTTP server on [http://xxx.xxx.xx.xx:2113/]...
[24864,13,13:53:30.036] HTTP server is up and listening on [http://xxx.xxx.xx.xx:2113/]
IntHttpPort: 443
ExtHttpPort: 443
CONFIG: /etc/eventstore/eventstore.yaml (Command Line)
DB: /opt/eventstore/db (Config File)
INT IP: xxx.xxx.xx.xx (Config File)
EXT IP: xxx.xxx.xx.xx (Config File)
EXT SECURE TCP PORT: 2113 (Config File)
INT SECURE TCP PORT: 2114 (Config File)
CERTIFICATE FILE: /etc/eventstore/ssl/eventstore.crt (Config File)
SSL VALIDATE SERVER: False (Config File)
CERTIFICATE THUMBPRINT: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9 (Config File)
Port: 2113 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
Port: 2114 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
Port: 443 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
CONFIG: /etc/eventstore/eventstore.yaml (Command Line)
DB: /opt/eventstore/db (Config File)
INT IP: xxx.xxx.xx.xx (Config File)
EXT IP: xxx.xxx.xx.xx (Config File)
EXT HTTP PORT: 443 (Config File)
EXT HTTP PREFIXES: https://xxx.xxx.xx.xx/ (Config File)
EXT SECURE TCP PORT: 5113 (Config File)
INT SECURE TCP PORT: 5114 (Config File)
CERTIFICATE FILE: /etc/eventstore/ssl/eventstore.crt (Config File)
SSL VALIDATE SERVER: False (Config File)
CERTIFICATE THUMBPRINT: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9 (Config File)
ENABLE TRUSTED AUTH: True (Config File)
Port: 443 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
Port: 5113 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
Port: 5114 Thumbprint: 9B7C475FB829F3F6D14681942E56C9942BFEF0D9
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Remote prematurely closed connection.
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncProtocolRequest asyncRequest, Mono.Net.Security.AsyncOperationStatus status) [0x00015] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (Mono.Net.Security.AsyncOperationStatus status) [0x00080] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation () [0x0000d] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.StartOperation () [0x0003c] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.StartOperation (Mono.Net.Security.AsyncOperation operation) [0x00024] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00057] in <443b64479cca4b0cb2d2b62eaf14a230>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <8e4c7b80ba0942cb8aa6c8f9f3e5b12d>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00078] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Boolean clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00010] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.Private.MonoSslStreamWrapper.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Boolean clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00006] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.HttpConnection.Init () [0x0001a] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.HttpConnection..ctor (System.Net.Sockets.Socket sock, System.Net.EndPointListener epl, System.Boolean secure, System.Security.Cryptography.X509Certificates.X509Certificate cert) [0x00090] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.EndPointListener.ProcessAccept (System.Net.Sockets.SocketAsyncEventArgs args) [0x00046] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.EndPointListener.OnAccept (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) [0x00000] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted (System.Net.Sockets.SocketAsyncEventArgs e) [0x0000e] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.Sockets.SocketAsyncEventArgs.Complete () [0x00000] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.Sockets.Socket+<>c.<.cctor>b__306_0 (System.IAsyncResult ares) [0x00092] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.Sockets.SocketAsyncResult+<>c__DisplayClass27_0.<Complete>b__0 (System.Object _) [0x00000] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <8e4c7b80ba0942cb8aa6c8f9f3e5b12d>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <8e4c7b80ba0942cb8aa6c8f9f3e5b12d>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <8e4c7b80ba0942cb8aa6c8f9f3e5b12d>:0
load which port and with which protocol?
ES VERSION: 4.0.1.0 (HEAD/5f53330a4cc31fc6eb8b337cc630038b40a4f47a, Wed, 12 Apr 2017 15:28:32 +0200)And I get less verbose error
The authentication or decryption has failed.
[26987,08,15:04:45.614] Global Unhandled Exception occurred.
The authentication or decryption has failed.
--
You received this message because you are subscribed to the Google Groups "Event Store" group.
To unsubscribe from this group and stop receiving emails from it, send an email to event-store+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to event-store...@googlegroups.com.
As I use eventstore with ssl on linux, I can assure you it works. The documentation is lagging though. The java-8 client gives good instruction on how to do it:
[29643,16,09:31:24.098] Internal TCP connection accepted: [Secure, xxx.xxx.xx.xx:57312, Lxxx.xxx.xx.xx:5111, {1c5a95d1-032e-42a7-b678-f508fd1851a1}].
[29643,21,09:31:24.101] [Sxxx.xxx.xx.xx:57312, Lxxx.xxx.xx.xx:5111]: Exception on EndAuthenticateAsServer.
The authentication or decryption has failed.
IntTcpPort: 0
ExtTcpPort: 0
ExtSecureTcpPort: 5113
IntSecureTcpPort: 5111
UseInternalSsl: True
CertificateFile: /opt/eventstore/ssl/es.p12
SslTargetHost: "eventstore.foo.com"
SslValidateServer: False
IntHttpPort: 2113
ExtHttpPort: 2114
ClusterSize: 3
ClusterDns: "eventstore.foo.com"
ClusterGossipPort: 2113
ExtHttpPrefixes: "http://eventstore.foo.com:2113/"
The documentation from the github repo for esjc refers to SSL configuration on linux. The wiki you pointed to is no longer in use and says that the documentation has moved. The documentation that is there shows how to setup SSL on Windows (http://docs.geteventstore.com/server/4.0.0/setting_up_ssl/). Someone is working on the documentation on how to setup SSL on linux and that should be up shortly.
We've added a new page to the docs for setting up SSL on Ubuntu 16.04, you can find it here
If you have any feedback or improvements for that page, please open an issue in the docs repo or open a PR.
/usr/local/share/ca-certificates/ copy to /etc/pki/tls/certs. Insead of update-ca-certificates use update-ca-trust
3.For UseInternalSsl: True you also need to add following:
CertificateFile:ExtSecureTcpPort: xxxxIntSecureTcpPort: xxxxUseInternalSsl: TrueSslTargetHost: "bla-bla.com"
How to check that internal SSL works.
1. netstat -alnp | grep eventstore
tcp 0 0 0.0.0.0:2113 0.0.0.0:* LISTEN 30507/eventstoredtcp 0 0 0.0.0.0:2114 0.0.0.0:* LISTEN 30507/eventstoredtcp 0 0 192.168.3.194:35247 0.0.0.0:* LISTEN 30507/eventstoredtcp 0 0 192.168.3.194:1115 0.0.0.0:* LISTEN 30507/eventstoredtcp 0 0 192.168.3.194:1116 0.0.0.0:* LISTEN 30507/eventstoredtcp 0 0 192.168.3.194:1116 192.168.3.130:46312 ESTABLISHED 30507/eventstoredtcp 0 0 192.168.3.194:2114 192.168.3.130:52828 ESTABLISHED 30507/eventstoredtcp 0 0 192.168.3.194:52228 192.168.3.130:2114 ESTABLISHED 30507/eventstoredtcp 0 0 192.168.3.194:2114 192.168.3.130:52782 ESTABLISHED 30507/eventstoredtcp 0 0 192.168.3.194:52230 192.168.3.130:2114 ESTABLISHED 30507/eventstored
1116 is for internal SSL.PID:31425:006 2017.06.01 09:09:24.524 INFO TcpConnectionSsl ] [S192.168.5.194:1116, L192.168.5.130:46312]
[PID:31425:006 2017.06.01 09:09:24.525 INFO TcpConnectionSsl ] Cipher: Aes256 strength 256
[PID:31425:006 2017.06.01 09:09:24.527 INFO TcpConnectionSsl ] Hash: Sha1 strength 160
[PID:31425:006 2017.06.01 09:09:24.527 INFO TcpConnectionSsl ] Key exchange: RsaKeyX strength 2048
[PID:31425:006 2017.06.01 09:09:24.527 INFO TcpConnectionSsl ] Protocol: Tls
[PID:31425:006 2017.06.01 09:09:24.529 INFO TcpConnectionSsl ] Is authenticated: True as server? False
[PID:31425:006 2017.06.01 09:09:24.534 INFO TcpConnectionSsl ] IsSigned: True
[PID:31425:006 2017.06.01 09:09:24.534 INFO TcpConnectionSsl ] Is Encrypted: True
[PID:31425:006 2017.06.01 09:09:24.534 INFO TcpConnectionSsl ] Can read: True, write True
[PID:31425:006 2017.06.01 09:09:24.535 INFO TcpConnectionSsl ] Can timeout: True
[PID:31425:006 2017.06.01 09:09:24.535 INFO TcpConnectionSsl ] Certificate revocation list checked: False
[PID:31425:006 2017.06.01 09:09:24.535 INFO TcpConnectionSsl ] Local certificate is null.
[PID:31425:006 2017.06.01 09:09:24.541 INFO TcpConnectionSsl ] Remote certificate was issued to CN=bla-bla.com and is valid from 5/31/2017 12:49:22 PM until 5/31/2018 12:49:22 PM.
Will wait for Hayley or Pieter but you most likely need to setup an
appropriate http prefix.
AddInterfacePrefixes: False
ExtHttpPort: 5114
ExtHttpPrefixes: "https://*:5114/"
[PID:00512:013 2017.06.01 12:37:25.510 DEBUG ElectionsService ] ELECTIONS: (V=200) VIEWCHANGE FROM [192.168.5.194:2114, {e7f53c10-dcdc-4dc7-8481-fae868ebabb0}].
[PID:00512:006 2017.06.01 12:37:26.464 FATAL GLOBAL-LOGGER ] Global Unhandled Exception occurred.
System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The client stopped the handshake.
at Mono.Security.Protocol.Tls.SslServerStream.EndNegotiateHandshake (System.IAsyncResult asyncResult) [0x000b9] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00057] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsServer (System.IAsyncResult asyncResult) [0x00011] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Boolean clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean
checkCertificateRevocation) [0x0000e] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=1024"><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><title>Event Store - {{ $state.current.data.title }}</title><link rel=stylesheet href=css/main.min.css><link rel=apple-touch-icon href=apple-touch-icon.png><link rel=icon type=image/png href=favicon.png><meta name=msapplication-TileImage content=es-tile.png><meta name=msapplication-TileColor content=#6BA300></head><body><div ui-view></div><script data-main=js/app.min.js src=js/requirejs.min.js></script></body></html>
At this time you're probably better off using a reverse proxy for SSL since mono's implementation is out of date and is rejected by Chrome as being too insecure.
[PID:01104:018 2017.06.01 13:52:07.664 INFO IOStreams ] Error while closing stream : This SslStream is already authenticatedAnd it shows only title without html BODY :(