# ERROR WHILE RELOADING THE LOCALHOST:9200 and says Unsecured and the CONNECTION GETS CLOSED AUTOMATICALLY

**URL:** https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [July 3, 2022, 10:06pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765 "2022-07-03T22:06:03Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Tarun\_Kumar\_Yerra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_kumar_yerra/32/78611_2.png) [@Tarun\_Kumar\_Yerra](https://discuss.elastic.co/u/Tarun_Kumar_Yerra)
#### Post date: [July 3, 2022, 10:06pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/1 "2022-07-03T22:06:03Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/b/e/be3ec4b04ff15dc7db858f3b0d032b6b2de653a0.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/3/730f4422baf4113c40ca2a76e5dd1e9b0bb0b12c.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/d/ed5b7b0d5ae313a1bc20acefffcead0f6565fbc5.png)

Hello Team,  
I have installed the kibana on windows by extracting the zip files.  
Everything seems to be running well but when I try to connect through the python script it says the error with SSL CERTIFICATE ERROR.  
Also when i reload the localhost:9200 on the chrome it automatically says http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:55153}.

When I see the address bar it says unsecured and there is no lock symbol.

Can you please help me with this issue? and give me the detailed step-by-step process to get off this error.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 3, 2022, 11:04pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/2 "2022-07-03T23:04:32Z")

</div>

Welcome to our community! 😃

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them.

---

<div class="post-metadata">

### Author: ![Tarun\_Kumar\_Yerra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_kumar_yerra/32/78611_2.png) [@Tarun\_Kumar\_Yerra](https://discuss.elastic.co/u/Tarun_Kumar_Yerra)
#### Post date: [July 3, 2022, 11:08pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/3 "2022-07-03T23:08:15Z")

</div>

Hello Warkolm, Thanks.

How can i show the results and issues that I'm facing on my local server ?  
can you tell me the medium please ?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 3, 2022, 11:16pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/4 "2022-07-03T23:16:37Z")

</div>

The best way is to copy the text

---

<div class="post-metadata">

### Author: ![Tarun\_Kumar\_Yerra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_kumar_yerra/32/78611_2.png) [@Tarun\_Kumar\_Yerra](https://discuss.elastic.co/u/Tarun_Kumar_Yerra)
#### Post date: [July 3, 2022, 11:23pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/5 "2022-07-03T23:23:12Z")

</div>

warkolm, WHEN I TRY TO RELOAD THE LOCALHOST FROM THE BROWSER IT SAYS SUCCESSFULLY LOADED WHEN I RUN THE BAT BUT WHEN I RELOAD IT SAYS CLOSING CONNECTION: with the comments below:

> \*\*[2022-07-03T14:57:18,023][INFO][o.e.i.g.DatabaseNodeService] [NB397-CH] successfully loaded geoip database file [GeoLite2-City.mmdb]  
> \*\*[2022-07-03T14:57:36,685][WARN][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [NB397-CH] http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:55153}  
> \*\*[2022-07-03T14:57:36,685][WARN][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [NB397-CH] http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:55152}

ALSO WHEN I TRY TO CONNECT TO ES USING PYTHON JYPTER NOTEBOOK I SEE THIS ERROR:

> **ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))**
> 
> **SSLError: HTTPSConnectionPool(host='localhost', port=9200): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed: self signed certificate in certificate chain (\_ssl.c:1129)')))**

I ALSO SEE THAT THE ADDRESS BAR HAS THE NOT SECURE TAG AND SAYS YOUR CONNECTION TO THIS SITE IS NOT SECURE.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 3, 2022, 11:24pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/6 "2022-07-03T23:24:34Z")

</div>

Can you please minimise using capital letters, it makes it very hard to read.

Please post your Elasticsearch log.

---

<div class="post-metadata">

### Author: ![Tarun\_Kumar\_Yerra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_kumar_yerra/32/78611_2.png) [@Tarun\_Kumar\_Yerra](https://discuss.elastic.co/u/Tarun_Kumar_Yerra)
#### Post date: [July 3, 2022, 11:29pm UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/7 "2022-07-03T23:29:44Z")

</div>

here is the error log Warkolm.

```
at java.lang.Thread.run(Thread.java:833) [?:?]

```

[2022-07-03T14:57:17,028][INFO][o.e.x.t.t.TransformTask] [NB397-CH] [endpoint.metadata\_united-default-8.3.0] updating state for transform to [{"task\_state":"started","indexer\_state":"stopped","checkpoint":1,"progress":{"docs\_indexed":0,"docs\_processed":0},"should\_stop\_at\_checkpoint":false}].  
[2022-07-03T14:57:17,028][INFO][o.e.x.t.t.TransformTask] [NB397-CH] [endpoint.metadata\_current-default-8.3.0] updating state for transform to [{"task\_state":"started","indexer\_state":"stopped","checkpoint":1,"progress":{"docs\_indexed":0,"docs\_processed":0},"should\_stop\_at\_checkpoint":false}].  
[2022-07-03T14:57:17,078][INFO][o.e.x.t.t.TransformPersistentTasksExecutor] [NB397-CH] [endpoint.metadata\_united-default-8.3.0] successfully completed and scheduled task in node operation  
[2022-07-03T14:57:17,142][INFO][o.e.x.t.t.TransformPersistentTasksExecutor] [NB397-CH] [endpoint.metadata\_current-default-8.3.0] successfully completed and scheduled task in node operation  
[2022-07-03T14:57:17,217][WARN][o.e.x.t.t.TransformIndexer] [NB397-CH] [endpoint.metadata\_united-default-8.3.0] failed to detect changes for transform. Skipping update till next check.  
org.elasticsearch.action.search.SearchPhaseExecutionException:  
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:729) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:475) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.AbstractSearchAsyncAction.start(AbstractSearchAsyncAction.java:218) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.TransportSearchAction.executeSearch(TransportSearchAction.java:1031) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.TransportSearchAction.executeLocalSearch(TransportSearchAction.java:747) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.TransportSearchAction.lambda$executeRequest$6(TransportSearchAction.java:390) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.index.query.Rewriteable.rewriteAndFetch(Rewriteable.java:112) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.index.query.Rewriteable.rewriteAndFetch(Rewriteable.java:77) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.TransportSearchAction.executeRequest(TransportSearchAction.java:478) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:277) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:103) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:79) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.support.ActionFilter$Simple.apply(ActionFilter.java:53) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:77) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$3(SecurityActionFilter.java:163) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:245) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:575) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.DlsFlsLicenseRequestInterceptor.intercept(DlsFlsLicenseRequestInterceptor.java:100) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:573) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.BulkShardRequestInterceptor.intercept(BulkShardRequestInterceptor.java:86) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:573) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:84) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.ShardSearchRequestInterceptor.intercept(ShardSearchRequestInterceptor.java:26) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:573) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.IndicesAliasesRequestInterceptor.intercept(IndicesAliasesRequestInterceptor.java:123) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:573) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:84) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.SearchRequestInterceptor.intercept(SearchRequestInterceptor.java:26) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:573) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.ResizeRequestInterceptor.intercept(ResizeRequestInterceptor.java:96) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:573) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:84) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.interceptor.UpdateRequestInterceptor.intercept(UpdateRequestInterceptor.java:27) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.runRequestInterceptors(AuthorizationService.java:569) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.handleIndexActionAuthorizationResult(AuthorizationService.java:554) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$authorizeAction$10(AuthorizationService.java:448) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$AuthorizationResultListener.onResponse(AuthorizationService.java:945) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$AuthorizationResultListener.onResponse(AuthorizationService.java:909) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.RBACEngine.lambda$authorizeIndexAction$3(RBACEngine.java:352) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.common.util.concurrent.ListenableFuture.notifyListenerDirectly(ListenableFuture.java:113) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.common.util.concurrent.ListenableFuture.addListener(ListenableFuture.java:55) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.common.util.concurrent.ListenableFuture.addListener(ListenableFuture.java:41) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService$CachingAsyncSupplier.getAsync(AuthorizationService.java:993) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.RBACEngine.authorizeIndexAction(RBACEngine.java:343) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.authorizeAction(AuthorizationService.java:441) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.maybeAuthorizeRunAs(AuthorizationService.java:378) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$authorize$2(AuthorizationService.java:263) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.RBACEngine.lambda$resolveAuthorizationInfo$0(RBACEngine.java:139) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.lambda$getRoles$1(CompositeRolesStore.java:185) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.core.security.authz.store.RoleReferenceIntersection.lambda$buildRole$0(RoleReferenceIntersection.java:47) [x-pack-core-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.support.GroupedActionListener.onResponse(GroupedActionListener.java:55) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.lambda$buildThenMaybeCacheRole$6(CompositeRolesStore.java:353) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.buildRoleFromDescriptors(CompositeRolesStore.java:475) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.buildThenMaybeCacheRole(CompositeRolesStore.java:334) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.lambda$buildRoleFromRoleReference$3(CompositeRolesStore.java:272) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$MappedActionListener.onResponse(ActionListener.java:127) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authc.service.ServiceAccountService.getRoleDescriptorForPrincipal(ServiceAccountService.java:179) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.RoleDescriptorStore.resolveServiceAccountRoleReference(RoleDescriptorStore.java:129) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.core.security.authz.store.RoleReference$ServiceAccountRoleReference.resolve(RoleReference.java:178) [x-pack-core-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.buildRoleFromRoleReference(CompositeRolesStore.java:266) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.core.security.authz.store.RoleReferenceIntersection.lambda$buildRole$1(RoleReferenceIntersection.java:50) [x-pack-core-8.3.1.jar:?]  
at java.lang.Iterable.forEach(Iterable.java:75) [?:?]  
at org.elasticsearch.xpack.core.security.authz.store.RoleReferenceIntersection.buildRole(RoleReferenceIntersection.java:50) [x-pack-core-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.getRole(CompositeRolesStore.java:200) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.getRoles(CompositeRolesStore.java:175) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.RBACEngine.resolveAuthorizationInfo(RBACEngine.java:136) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authz.AuthorizationService.authorize(AuthorizationService.java:265) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$4(SecurityActionFilter.java:159) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.ActionListener$MappedActionListener.onResponse(ActionListener.java:127) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authc.AuthenticatorChain.authenticateAsync(AuthenticatorChain.java:94) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:171) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.applyInternal(SecurityActionFilter.java:155) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:114) [x-pack-security-8.3.1.jar:?]  
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:77) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:54) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.tasks.TaskManager.registerAndExecute(TaskManager.java:165) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.client.internal.node.NodeClient.executeLocally(NodeClient.java:113) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.client.internal.node.NodeClient.doExecute(NodeClient.java:91) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.client.internal.support.AbstractClient.execute(AbstractClient.java:380) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.client.internal.FilterClient.doExecute(FilterClient.java:57) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.client.internal.ParentTaskAssigningClient.doExecute(ParentTaskAssigningClient.java:55) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.client.internal.support.AbstractClient.execute(AbstractClient.java:380) [elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.xpack.core.ClientHelper.executeWithHeadersAsync(ClientHelper.java:311) [x-pack-core-8.3.1.jar:?]  
at org.elasticsearch.xpack.transform.checkpoint.TimeBasedCheckpointProvider.sourceHasChanged(TimeBasedCheckpointProvider.java:80) [transform-8.3.1.jar:8.3.1]  
at org.elasticsearch.xpack.transform.transforms.TransformIndexer.sourceHasChanged(TransformIndexer.java:1017) [transform-8.3.1.jar:8.3.1]  
at org.elasticsearch.xpack.transform.transforms.TransformIndexer.onStart(TransformIndexer.java:366) [transform-8.3.1.jar:8.3.1]  
at org.elasticsearch.xpack.core.indexing.AsyncTwoPhaseIndexer.lambda$maybeTriggerAsyncJob$5(AsyncTwoPhaseIndexer.java:229) [x-pack-core-8.3.1.jar:?]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:710) [elasticsearch-8.3.1.jar:?]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]  
at java.lang.Thread.run(Thread.java:833) [?:?]  
Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: Search rejected due to missing shards [[metrics-endpoint.metadata\_current\_default][0]]. Consider using `allow_partial_search_results` setting to bypass this error.  
at org.elasticsearch.action.search.AbstractSearchAsyncAction.run(AbstractSearchAsyncAction.java:246) ~[elasticsearch-8.3.1.jar:?]  
at org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:470) [elasticsearch-8.3.1.jar:?]  
... 108 more  
[2022-07-03T14:57:17,288][INFO][o.e.i.g.DatabaseNodeService] [NB397-CH] successfully loaded geoip database file [GeoLite2-Country.mmdb]  
[2022-07-03T14:57:17,361][INFO][o.e.i.g.DatabaseNodeService] [NB397-CH] successfully loaded geoip database file [GeoLite2-ASN.mmdb]  
[2022-07-03T14:57:17,450][INFO][o.e.c.r.a.AllocationService] [NB397-CH] current.health="YELLOW" message="Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana-event-log-8.3.1-000001][0]]])." previous.health="RED" reason="shards started [[.kibana-event-log-8.3.1-000001][0]]"  
[2022-07-03T14:57:18,023][INFO][o.e.i.g.DatabaseNodeService] [NB397-CH] successfully loaded geoip database file [GeoLite2-City.mmdb]  
[2022-07-03T14:57:36,685][WARN][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [NB397-CH] http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:55152}  
[2022-07-03T14:57:36,685][WARN][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [NB397-CH] http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:55153}

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 4, 2022, 1:19am UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/8 "2022-07-04T01:19:11Z")

</div>

@Tarun_Kumar_Yerra

I am assuming You installed with default security... correct?

Elasticsearch is running on  
`https://localhost:9200`. ... **https**

with _ **a self signed cert** _ that is why the browser complains. If you are not familiar with self signed certificates perhaps you should read up on them.

you can validate this by running this from the terminal the certs directory will be in the config directory either /etc/elasticsearch or wherever you untared the zip/tar.gz

`curl --cacert /path/config/certs/http_ca.crt -u elastic https://localhost:9200`

Then in your python / jupiter notebook you are trying to connect to

`http://localhost:9200 `

 ![Screen Shot 2022-07-03 at 6.03.37 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/d/dd851a36fd3f5ed10d0efb2aceaeaba05cd5f91d.png)

on **http** not on **https** that will not work because elasticsearch is running **https**.

You will need to connect with elasticsearch on https, tell your python it to ignore ssl validation or point to the CA and you will need to provide the credentials usename (elastic) and password you got at startup.

For how to point to the see here

> **[Configuration | Elasticsearch Python Client \[8.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/config.html)**

```auto
es = Elasticsearch(
    "https://...",
    ca_certs="/path/config/certs/http_ca.crt"
)

```

or turn off certificate verification...

```auto
es = Elasticsearch(
    "https://...",
    verify_certs=False
)

```

And yes please stop the CAPS it is the equivalent of yelling at us...  
Please take the time to format your code / logs using the `</>` button... it helps us help you

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 1, 2022, 1:19am UTC](https://discuss.elastic.co/t/error-while-reloading-the-localhost-9200-and-says-unsecured-and-the-connection-gets-closed-automatically/308765/9 "2022-08-01T01:19:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
