Error: Cannot set default strategy more than once

Hi all,
trying to install the latest search guard ES and Kibana plugins for 6.1.3 (6.1.3-10 for Kibana) and I’m getting the following error

Error: Cannot set default strategy more than once
at Object.exports.assert (/usr/share/kibana/node_modules/hoek/lib/index.js:736:11)
at internals.Auth.default (/usr/share/kibana/node_modules/hapi/lib/auth.js:77:10)
at internals.Auth.strategy (/usr/share/kibana/node_modules/hapi/lib/auth.js:70:21)
at internals.Plugin._applyChild (/usr/share/kibana/node_modules/hapi/lib/plugin.js:584:19)
at Object.strategy (/usr/share/kibana/node_modules/hapi/lib/plugin.js:64:54)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:92:17
at next (native)
at step (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:191)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:437
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:99
at ScopedPlugin.init [as externalInit] (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:74:22)
at ScopedPlugin.tryCatcher (/usr/share/kibana/node_modules/bluebird/js/main/util.js:26:23)
at Promise.attempt.Promise.try (/usr/share/kibana/node_modules/bluebird/js/main/method.js:30:24)
at /usr/share/kibana/src/server/plugins/plugin.js:196:46

``

This is the docker compose file I’m using to deploy the test:

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
command: /elasticsearch/bin/elasticsearch -E network.bind_host=0.0.0.0
ports:
- “9200:9200”
environment:
- ES_JAVA_OPTS=-Xms2g -Xmx2g

kibana:
image: docker.elastic.co/kibana/kibana:6.1.3
links:
- elasticsearch
ports:

  • “5601:5601”
    environment:
    - PROJECT_NAME=sanacl
    - NODE_OPTIONS=–max-old-space-size=3200
    - ELASTICSEARCH_URL=https://elasticsearch:9200

``

I guess it is related to the Kibana setup, this is the one I’m using for the tests

server.name: kibana
elasticsearch.url: https://elasticsearch:9200
xpack.monitoring.ui.container.elasticsearch.enabled: false
server.host: 0.0.0.0
kibana.defaultAppId: “dashboard/Overview”
elasticsearch.username: “kibanaserver”
elasticsearch.password: “kibanaserver”
elasticsearch.ssl.verificationMode: none
elasticsearch.requestHeadersWhitelist: [ “Authorization”, “sgtenant” ]

``

Can you shed some light on the issue? Thank you!

I forgot to mention I’m using the open source version for the Elastic Search plugin

···

El miércoles, 21 de marzo de 2018, 15:56:45 (UTC+1), Luis Cañas Díaz escribió:

Hi all,
trying to install the latest search guard ES and Kibana plugins for 6.1.3 (6.1.3-10 for Kibana) and I’m getting the following error

Error: Cannot set default strategy more than once
at Object.exports.assert (/usr/share/kibana/node_modules/hoek/lib/index.js:736:11)
at internals.Auth.default (/usr/share/kibana/node_modules/hapi/lib/auth.js:77:10)
at internals.Auth.strategy (/usr/share/kibana/node_modules/hapi/lib/auth.js:70:21)
at internals.Plugin._applyChild (/usr/share/kibana/node_modules/hapi/lib/plugin.js:584:19)
at Object.strategy (/usr/share/kibana/node_modules/hapi/lib/plugin.js:64:54)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:92:17
at next (native)
at step (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:191)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:437
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:99
at ScopedPlugin.init [as externalInit] (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:74:22)
at ScopedPlugin.tryCatcher (/usr/share/kibana/node_modules/bluebird/js/main/util.js:26:23)
at Promise.attempt.Promise.try (/usr/share/kibana/node_modules/bluebird/js/main/method.js:30:24)
at /usr/share/kibana/src/server/plugins/plugin.js:196:46

``

This is the docker compose file I’m using to deploy the test:

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
command: /elasticsearch/bin/elasticsearch -E network.bind_host=0.0.0.0
ports:
- “9200:9200”
environment:
- ES_JAVA_OPTS=-Xms2g -Xmx2g

kibana:
image: docker.elastic.co/kibana/kibana:6.1.3
links:
- elasticsearch
ports:

  • “5601:5601”
    environment:
    - PROJECT_NAME=sanacl
    - NODE_OPTIONS=–max-old-space-size=3200
    - ELASTICSEARCH_URL=https://elasticsearch:9200

``

I guess it is related to the Kibana setup, this is the one I’m using for the tests

server.name: kibana
elasticsearch.url: https://elasticsearch:9200
xpack.monitoring.ui.container.elasticsearch.enabled: false
server.host: 0.0.0.0
kibana.defaultAppId: “dashboard/Overview”
elasticsearch.username: “kibanaserver”
elasticsearch.password: “kibanaserver”
elasticsearch.ssl.verificationMode: none
elasticsearch.requestHeadersWhitelist: [ “Authorization”, “sgtenant” ]

``

Can you shed some light on the issue? Thank you!

we are on it …

···

On Wednesday, 21 March 2018 16:23:53 UTC+1, Luis Cañas Díaz wrote:

I forgot to mention I’m using the open source version for the Elastic Search plugin

El miércoles, 21 de marzo de 2018, 15:56:45 (UTC+1), Luis Cañas Díaz escribió:

Hi all,
trying to install the latest search guard ES and Kibana plugins for 6.1.3 (6.1.3-10 for Kibana) and I’m getting the following error

Error: Cannot set default strategy more than once
at Object.exports.assert (/usr/share/kibana/node_modules/hoek/lib/index.js:736:11)
at internals.Auth.default (/usr/share/kibana/node_modules/hapi/lib/auth.js:77:10)
at internals.Auth.strategy (/usr/share/kibana/node_modules/hapi/lib/auth.js:70:21)
at internals.Plugin._applyChild (/usr/share/kibana/node_modules/hapi/lib/plugin.js:584:19)
at Object.strategy (/usr/share/kibana/node_modules/hapi/lib/plugin.js:64:54)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:92:17
at next (native)
at step (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:191)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:437
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:99
at ScopedPlugin.init [as externalInit] (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:74:22)
at ScopedPlugin.tryCatcher (/usr/share/kibana/node_modules/bluebird/js/main/util.js:26:23)
at Promise.attempt.Promise.try (/usr/share/kibana/node_modules/bluebird/js/main/method.js:30:24)
at /usr/share/kibana/src/server/plugins/plugin.js:196:46

``

This is the docker compose file I’m using to deploy the test:

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
command: /elasticsearch/bin/elasticsearch -E network.bind_host=0.0.0.0
ports:
- “9200:9200”
environment:
- ES_JAVA_OPTS=-Xms2g -Xmx2g

kibana:
image: docker.elastic.co/kibana/kibana:6.1.3
links:
- elasticsearch
ports:

  • “5601:5601”
    environment:
    - PROJECT_NAME=sanacl
    - NODE_OPTIONS=–max-old-space-size=3200
    - ELASTICSEARCH_URL=https://elasticsearch:9200

``

I guess it is related to the Kibana setup, this is the one I’m using for the tests

server.name: kibana
elasticsearch.url: https://elasticsearch:9200
xpack.monitoring.ui.container.elasticsearch.enabled: false
server.host: 0.0.0.0
kibana.defaultAppId: “dashboard/Overview”
elasticsearch.username: “kibanaserver”
elasticsearch.password: “kibanaserver”
elasticsearch.ssl.verificationMode: none
elasticsearch.requestHeadersWhitelist: [ “Authorization”, “sgtenant” ]

``

Can you shed some light on the issue? Thank you!

Tthe error message already has it:

   at step (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:191)
   at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:437
   at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:99

You have installed the X-Pack Kibana plugin alongside Search Guard, and you have both Search Guard and X-Pack Security active. You can only have one security plugin running, either X-Pack Security or Search Guard, but not both.

The docs explain how to properly set up X-Pack plus Search Guard at the same time, e.g.:

···

On Wednesday, March 21, 2018 at 4:23:53 PM UTC+1, Luis Cañas Díaz wrote:

I forgot to mention I’m using the open source version for the Elastic Search plugin

El miércoles, 21 de marzo de 2018, 15:56:45 (UTC+1), Luis Cañas Díaz escribió:

Hi all,
trying to install the latest search guard ES and Kibana plugins for 6.1.3 (6.1.3-10 for Kibana) and I’m getting the following error

Error: Cannot set default strategy more than once
at Object.exports.assert (/usr/share/kibana/node_modules/hoek/lib/index.js:736:11)
at internals.Auth.default (/usr/share/kibana/node_modules/hapi/lib/auth.js:77:10)
at internals.Auth.strategy (/usr/share/kibana/node_modules/hapi/lib/auth.js:70:21)
at internals.Plugin._applyChild (/usr/share/kibana/node_modules/hapi/lib/plugin.js:584:19)
at Object.strategy (/usr/share/kibana/node_modules/hapi/lib/plugin.js:64:54)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:92:17
at next (native)
at step (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:191)
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:437
at /usr/share/kibana/plugins/x-pack/plugins/security/index.js:34:99
at ScopedPlugin.init [as externalInit] (/usr/share/kibana/plugins/x-pack/plugins/security/index.js:74:22)
at ScopedPlugin.tryCatcher (/usr/share/kibana/node_modules/bluebird/js/main/util.js:26:23)
at Promise.attempt.Promise.try (/usr/share/kibana/node_modules/bluebird/js/main/method.js:30:24)
at /usr/share/kibana/src/server/plugins/plugin.js:196:46

``

This is the docker compose file I’m using to deploy the test:

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
command: /elasticsearch/bin/elasticsearch -E network.bind_host=0.0.0.0
ports:
- “9200:9200”
environment:
- ES_JAVA_OPTS=-Xms2g -Xmx2g

kibana:
image: docker.elastic.co/kibana/kibana:6.1.3
links:
- elasticsearch
ports:

  • “5601:5601”
    environment:
    - PROJECT_NAME=sanacl
    - NODE_OPTIONS=–max-old-space-size=3200
    - ELASTICSEARCH_URL=https://elasticsearch:9200

``

I guess it is related to the Kibana setup, this is the one I’m using for the tests

server.name: kibana
elasticsearch.url: https://elasticsearch:9200
xpack.monitoring.ui.container.elasticsearch.enabled: false
server.host: 0.0.0.0
kibana.defaultAppId: “dashboard/Overview”
elasticsearch.username: “kibanaserver”
elasticsearch.password: “kibanaserver”
elasticsearch.ssl.verificationMode: none
elasticsearch.requestHeadersWhitelist: [ “Authorization”, “sgtenant” ]

``

Can you shed some light on the issue? Thank you!