Skip to content

Commit d1375bb

Browse files
author
Robin Duda
committed
Merge remote-tracking branch 'origin/master'
2 parents bafb8b5 + feba14e commit d1375bb

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

README.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The application requires ElasticSearch as its output.
2424
Tested with ElasticSearch 5.6.2, 6.4.2 and 7.0.0-alpha1
2525

2626
## Running with docker
27-
```
27+
```console
2828
docker run -it -p 8080:8080 -e es_port=9200 -e es_host=<host IP> codingchili/excelastic
2929
```
3030
Note: ElasticSearch needs to bind to the es_host address, this can be configured as
@@ -34,21 +34,21 @@ connect to it from another machine when binding to all interfaces.
3434
## Running the JAR
3535

3636
Running the application, filename and index is required, to import from the terminal run:
37-
```
37+
```console
3838
java -Xmx2g -jar excelastic.jar <fileName> <indexName> --mapping mappingName --clear
3939
```
4040
If running with --clear, then the existing index will be cleared before the import starts.
4141

4242
To run with the web interface, run the following in your terminal:
43-
```
43+
```console
4444
java -Xmx2g -jar excelastic.jar
4545
```
4646
When the application successfully connects to the ElasticSearch server, the browser will automatically open a new tab.
4747

4848
If any connection errors occur check that the ElasticSearch listen port matches with the elastic_port in the configuration file. Make sure that ElasticSearch is running by directing your browser at [localhost:9200](http://localhost:9200/).
4949

5050
Compiling a new fatjar and run tests,
51-
```
51+
```console
5252
mvn clean package
5353
```
5454

@@ -58,7 +58,7 @@ mvn clean package
5858

5959
The configuration file is placed in the same directory as the jar.
6060
An example of the configuration:
61-
```
61+
```javascript
6262
{
6363
"web_port": 0, // the port the web interface listens on
6464
"elastic_port": 9200, // the port elasticsearch listens on
@@ -74,10 +74,37 @@ Note that the comments cannot be included in the configuration file.
7474

7575
If no configuration file is present a new configuration file will be created using the default values listed here.
7676

77+
### TLS
78+
When using a self-signed certificate on the ElasticSearch server the server certificate needs to be trusted. By default the client uses the JVM truststore, which will work if the certificate was signed by a reputable certificate authority. This isn't the case for most internal resources/servers. In this case we need to explicitly trust the organizations root certificate (issuer) or the servers certificate directly.
79+
80+
Importing a .pem certificate into a new or existing keystore,
81+
82+
```console
83+
keytool -importcert -keystore mytruststore.jks -alias excelastic -file servercert.pem
84+
```
85+
86+
Specify a path to the truststore when starting excelastic,
87+
```console
88+
java -Djavax.net.ssl.trustStore="path/to/mytruststore.jks" -jar excelastic.jar
89+
```
90+
91+
##### Don't have the certificate?
92+
No worries, it can be retrieved using a web browser, browse to <host>:9200 and inspect the certificate from the address bar.
93+
94+
Retrieving certificates with openssl client
95+
```console
96+
openssl s_client -showcerts -connect <host> 9200
97+
# convert to format usable by java keytool.. (openssl x509 -outform PEM)
98+
```
99+
100+
Where <host> is localhost, or wherever the ElasticSearch server is running.
101+
77102
## Contributing
78103

79104
If you want to contribute to this project, open an issue or pull request. :heart_eyes_cat: :metal:
80105

106+
[![donate](https://img.shields.io/badge/donate-%CE%9ETH%20/%20%C9%83TC-ff00cc.svg?style=flat&logo=ethereum)](https://commerce.coinbase.com/checkout/673e693e-be6d-4583-9791-611da87861e3)
107+
81108
---
82109

83110
Thanks to [JetBrains](https://www.jetbrains.com/) for providing free open source licenses! Programmer productivity is boosted!

0 commit comments

Comments
 (0)