# Can't start elasticsearch with config saml

**URL:** <https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529>\
**Category:** Elasticsearch\
**Created:** [April 10, 2018, 6:03pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529 "2018-04-10T18:03:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zonete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zonete/32/29796_2.png) [@zonete](https://discuss.elastic.co/u/zonete)\
**Post date:** [April 10, 2018, 6:03pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/1 "2018-04-10T18:03:05Z")

</div>

Hi, we are trying configure ELK with SAML (with ADFS) but when we add the realm configuration to elasticsearch.yml we get the following error.

Elasticseach.yml

> bootstrap.memory\_lock: false  
> cluster.name: elasticsearch  
> http.port: 9200  
> node.data: true  
> node.ingest: true  
> node.master: true  
> node.name: ABC  
> path.data: C:\ProgramData\Elastic\Elasticsearch\data  
> path.logs: C:\ProgramData\Elastic\Elasticsearch\logs  
> transport.tcp.port: 9300  
> xpack.license.self\_generated.type: trial  
> xpack.security.authc.token.enabled: true  
> xpack.security.http.ssl.enabled: true  
> xpack.security.http.ssl.keystore.path: certs/elastic-stack-ca.p12  
> xpack.security.http.ssl.truststore.path: certs/elastic-stack-ca.p12
> 
> xpack.security.authc.realms.saml1:  
> attributes.principal: "nameid:persistent"  
> type: saml  
> idp.entity\_id: [http://xxxxx/adfs/services/trust](http://xxxxx/adfs/services/trust)  
> idp.metadata.path: saml/metadata.xml  
> order: 0  
> sp.acs: [https://127.0.0.1:5601/api/security/v1/saml](https://127.0.0.1:5601/api/security/v1/saml)  
> sp.entity\_id: [https://127.0.0.1:5601/](https://127.0.0.1:5601/)  
> sp.logout: [https://127.0.0.1:5601/logout](https://127.0.0.1:5601/logout)

Error  
Failed to instantiate SLF4J LoggerFactory  
Reported exception:  
java.lang.NoClassDefFoundError: org/apache/log4j/Level  
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)  
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)  
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)  
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)  
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)  
at org.opensaml.core.config.InitializationService.getLogger(InitializationService.java:83)  
at org.opensaml.core.config.InitializationService.initialize(InitializationService.java:46)  
at org.elasticsearch.xpack.security.authc.saml.SamlUtils.lambda$initialize$0(SamlUtils.java:100)  
at java.security.AccessController.doPrivileged(Native Method)  
at org.elasticsearch.xpack.security.authc.saml.SamlUtils.initialize(SamlUtils.java:97)  
at org.elasticsearch.xpack.security.authc.saml.SamlRealm.create(SamlRealm.java:185)  
at org.elasticsearch.xpack.security.authc.InternalRealms.lambda$getFactories$5(InternalRealms.java:119)  
at org.elasticsearch.xpack.security.authc.Realms.initRealms(Realms.java:189)  
at org.elasticsearch.xpack.security.authc.Realms.(Realms.java:75)  
at org.elasticsearch.xpack.security.Security.createComponents(Security.java:446)  
at org.elasticsearch.xpack.security.Security.createComponents(Security.java:377)  
[ at org.elasticsearch.node.Node.lambda$new$7(Node.java:397)  
2018-04-10T14:54:22,546] at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)  
[ERROR at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)  
][ at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)  
o.e.b.ElasticsearchUncaughtExceptionHandler] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)  
[x at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)  
] fatal error in thread at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)  
[main at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)  
], exiting at org.elasticsearch.node.Node.(Node.java:400)

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [April 10, 2018, 6:11pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/2 "2018-04-10T18:11:31Z")

</div>

Hi,

Can you please share your Elasticsearch and exact windows OS version ?

---

<div class="post-metadata">

**Author:** ![zonete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zonete/32/29796_2.png) [@zonete](https://discuss.elastic.co/u/zonete)\
**Post date:** [April 10, 2018, 6:17pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/3 "2018-04-10T18:17:30Z")

</div>

Elasticsearch 6.2.3  
Microsoft Windows PRO [version 10.0.16299.309] 64bits

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [April 10, 2018, 6:44pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/4 "2018-04-10T18:44:08Z")

</div>

Hi again,

Please note that Windows 10 is [not one of the supported platforms](https://www.elastic.co/support/matrix#matrix_os) . This is strange as log4j should be in your classpath. Can you restart Elasticsearch and share the starting part of the log and at least the whole stacktrace from that specific exception ?

---

<div class="post-metadata">

**Author:** ![zonete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zonete/32/29796_2.png) [@zonete](https://discuss.elastic.co/u/zonete)\
**Post date:** [April 10, 2018, 7:06pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/5 "2018-04-10T19:06:16Z")

</div>

λ elasticsearch.exe  
[2018-04-10T15:59:59,509][INFO][o.e.n.Node] [PC] initializing ...  
[2018-04-10T15:59:59,607][INFO][o.e.e.NodeEnvironment] [PC] using [1] data paths, mounts [[System (C:)]], net usable\_space [32.8gb], net total\_space [118.7gb], types [NTFS]  
[2018-04-10T15:59:59,608][INFO][o.e.e.NodeEnvironment] [PC] heap size [1.9gb], compressed ordinary object pointers [true]  
[2018-04-10T16:00:00,008][INFO][o.e.n.Node] [PC] node name [PC], node ID [QwwlmWafQ2SZBn4yP90WZw]  
[2018-04-10T16:00:00,008][INFO][o.e.n.Node] [PC] version[6.2.3], pid[20648], build[c59ff00/2018-03-13T10:06:29.741383Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0\_161/25.161-b12]  
[2018-04-10T16:00:00,009][INFO][o.e.n.Node] [PC] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=${ES\_TMPDIR}, -XX:+HeapDumpOnOutOfMemoryError, -Xmx2048m, -Xms2048m, -Delasticsearch, -Des.path.home=C:\Program Files\Elastic\Elasticsearch\6.2.3, -Des.path.conf=C:\ProgramData\Elastic\Elasticsearch\config]  
[2018-04-10T16:00:04,749][INFO][o.e.p.PluginsService] [PC] loaded module [aggs-matrix-stats]  
[2018-04-10T16:00:04,749][INFO][o.e.p.PluginsService] [PC] loaded module [analysis-common]  
[2018-04-10T16:00:04,749][INFO][o.e.p.PluginsService] [PC] loaded module [ingest-common]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [lang-expression]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [lang-mustache]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [lang-painless]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [mapper-extras]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [parent-join]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [percolator]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [rank-eval]  
[2018-04-10T16:00:04,750][INFO][o.e.p.PluginsService] [PC] loaded module [reindex]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded module [repository-url]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded module [transport-netty4]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded module [tribe]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-core]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-deprecation]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-graph]  
[2018-04-10T16:00:04,751][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-logstash]  
[2018-04-10T16:00:04,752][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-ml]  
[2018-04-10T16:00:04,752][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-monitoring]  
[2018-04-10T16:00:04,752][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-security]  
[2018-04-10T16:00:04,752][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-upgrade]  
[2018-04-10T16:00:04,752][INFO][o.e.p.PluginsService] [PC] loaded plugin [x-pack-watcher]  
[2018-04-10T16:00:11,074][INFO][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/18164] [Main.cc@128] controller (64 bit): Version 6.2.3 (Build e43a9a2b267ef4) Copyright (c) 2018 Elasticsearch BV  
Failed to instantiate SLF4J LoggerFactory  
Reported exception:  
java.lang.NoClassDefFoundError: org/apache/log4j/Level  
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)  
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)  
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)  
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)  
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)  
at org.opensaml.core.config.InitializationService.getLogger(InitializationService.java:83)  
at org.opensaml.core.config.InitializationService.initialize(InitializationService.java:46)  
at org.elasticsearch.xpack.security.authc.saml.SamlUtils.lambda$initialize$0(SamlUtils.java:100)  
at java.security.AccessController.doPrivileged(Native Method)  
at org.elasticsearch.xpack.security.authc.saml.SamlUtils.initialize(SamlUtils.java:97)  
at org.elasticsearch.xpack.security.authc.saml.SamlRealm.create(SamlRealm.java:185)  
at org.elasticsearch.xpack.security.authc.InternalRealms.lambda$getFactories$5(InternalRealms.java:119)  
at org.elasticsearch.xpack.security.authc.Realms.initRealms(Realms.java:189)  
at org.elasticsearch.xpack.security.authc.Realms.(Realms.java:75)  
at org.elasticsearch.xpack.security.Security.createComponents(Security.java:446)  
at org.elasticsearch.xpack.security.Security.createComponents(Security.java:377)  
at org.elasticsearch.node.Node.lambda$new$7(Node.java:397)  
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)  
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)  
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)  
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)  
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)  
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)  
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)  
at org.elasticsearch.node.Node.(Node.java:400)  
at org.elasticsearch.node.Node.(Node.java:246)  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323)  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121)  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85)

---

<div class="post-metadata">

**Author:** ![zonete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zonete/32/29796_2.png) [@zonete](https://discuss.elastic.co/u/zonete)\
**Post date:** [April 10, 2018, 7:06pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/6 "2018-04-10T19:06:30Z")

</div>

[Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level  
2018-04-10T16:00:11,728 at java.net.URLClassLoader.findClass(URLClassLoader.java:381)  
][ERROR at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
[o.e.b.ElasticsearchUncaughtExceptionHandler ... 36 more  
] [PC] fatal error in thread [main], exiting  
java.lang.NoClassDefFoundError: org/apache/log4j/Level  
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) ~[slf4j-api-1.7.25.jar:1.7.25]  
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) ~[slf4j-api-1.7.25.jar:1.7.25]  
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412) ~[slf4j-api-1.7.25.jar:1.7.25]  
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357) ~[slf4j-api-1.7.25.jar:1.7.25]  
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) ~[slf4j-api-1.7.25.jar:1.7.25]  
at org.opensaml.core.config.InitializationService.getLogger(InitializationService.java:83) ~[?:?]  
at org.opensaml.core.config.InitializationService.initialize(InitializationService.java:46) ~[?:?]  
at org.elasticsearch.xpack.security.authc.saml.SamlUtils.lambda$initialize$0(SamlUtils.java:100) ~[?:?]  
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0\_161]  
at org.elasticsearch.xpack.security.authc.saml.SamlUtils.initialize(SamlUtils.java:97) ~[?:?]  
at org.elasticsearch.xpack.security.authc.saml.SamlRealm.create(SamlRealm.java:185) ~[?:?]  
at org.elasticsearch.xpack.security.authc.InternalRealms.lambda$getFactories$5(InternalRealms.java:119) ~[?:?]  
at org.elasticsearch.xpack.security.authc.Realms.initRealms(Realms.java:189) ~[?:?]  
at org.elasticsearch.xpack.security.authc.Realms.(Realms.java:75) ~[?:?]  
at org.elasticsearch.xpack.security.Security.createComponents(Security.java:446) ~[?:?]  
at org.elasticsearch.xpack.security.Security.createComponents(Security.java:377) ~[?:?]  
at org.elasticsearch.node.Node.lambda$new$7(Node.java:397) ~[elasticsearch-6.2.3.jar:6.2.3]  
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[?:1.8.0\_161]  
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0\_161]  
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0\_161]  
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0\_161]  
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0\_161]  
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0\_161]  
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0\_161]  
at org.elasticsearch.node.Node.(Node.java:400) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.3.jar:6.2.3]  
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.3.jar:6.2.3]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.3.jar:6.2.3]  
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level  
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0\_161]  
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0\_161]  
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0\_161]  
... 36 more

---

<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:** [May 8, 2018, 7:06pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-with-config-saml/127529/7 "2018-05-08T19:06:32Z")

</div>

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