[help wanted] Invalid index name [_security]

Kibana version:
7.7

Elasticsearch version:
7.7

APM Server version:
7.7

APM Agent language and version:
go, go.elastic.co/apm v1.8.0

Browser version:
Chrome 81

Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Docker repo

Fresh install or upgraded from other version?
Fresh install

Is there anything special in your setup?
I used a customized agent config:

apm-server:
  host: '0.0.0.0:8200'
  kibana.enabled: true
  kibana.host: 'http://kibana:5601'
output.elasticsearch:
	hosts: ['http://es:9200']
logging.level: warning

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
When I routed to http://localhost:5601/app/apm, a message pop out and displayed internal server error 500 and my console printed the error message below at the same time:

{"type":"log","@timestamp":"2020-05-15T04:21:52Z","tags":["error","http"],"pid":6,"message":"{ Error: [invalid_index_name_exception] Invalid index name [_security], must not start with '_', '-', or '+', with { index_uuid=\"_na_\" & index=\"_security\" }\n    at respond (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)\n    at checkRespForFailure (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)\n    at HttpConnector.<anonymous> (/usr/share/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n    at IncomingMessage.wrapper (/usr/share/kibana/node_modules/elasticsearch/node_modules/lodash/lodash.js:4929:19)\n    at IncomingMessage.emit (events.js:203:15)\n    at endReadableNT (_stream_readable.js:1145:12)\n    at process._tickCallback (internal/process/next_tick.js:63:19)\n  status: 400,\n  displayName: 'BadRequest',\n  message:\n   '[invalid_index_name_exception] Invalid index name [_security], must not start with \\'_\\', \\'-\\', or \\'+\\', with { index_uuid=\"_na_\" & index=\"_security\" }',\n  path: '/_security/user/_has_privileges',\n  query: undefined,\n  body:\n   { error:\n      { root_cause: [Array],\n        type: 'invalid_index_name_exception',\n        reason:\n         'Invalid index name [_security], must not start with \\'_\\', \\'-\\', or \\'+\\'',\n        index_uuid: '_na_',\n        index: '_security' },\n     status: 400 },\n  statusCode: 400,\n  response:\n   '{\"error\":{\"root_cause\":[{\"type\":\"invalid_index_name_exception\",\"reason\":\"Invalid index name [_security], must not start with \\'_\\', \\'-\\', or \\'+\\'\",\"index_uuid\":\"_na_\",\"index\":\"_security\"}],\"type\":\"invalid_index_name_exception\",\"reason\":\"Invalid index name [_security], must not start with \\'_\\', \\'-\\', or \\'+\\'\",\"index_uuid\":\"_na_\",\"index\":\"_security\"},\"status\":400}',\n  toString: [Function],\n  toJSON: [Function] }"}

Steps to reproduce:

  1. docker-compose up
  2. click APM tab in kibana sidebar
  3. wait for the popup

Errors in browser console (if relevant):

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

:5601/api/apm/security/indices_privileges:1

config

# kibana.yml
logging.quiet: true
elasticsearch.hosts: ['http://es:9200']
server.host: '0.0.0.0'
server.name: kibana
elasticsearch.ssl.verificationMode: none
xpack.security.enabled: false
xpack.license_management.enabled: false
# elasticsearch.yml
cluster.name: 'go-es-cluster'
network.host: 0.0.0.0
xpack.security.enabled: false
# docker-compose es service part
es:
	image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
	environment:
		- bootstrap.memory_lock=true
		- discovery.type=single-node
		- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
	ulimits:
		memlock:
			soft: -1
			hard: -1
	healthcheck:
		test: ['CMD', 'curl', 'localhost:9200']
		timeout: 20s
		retries: 3
	# ports:
	#   - '9200:9200'
	volumes:
		- edata:/usr/share/elasticsearch/data
		- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
		- ./log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties

Hi @Null_None, thanks for your message.

The fix for this error is going to be released on v7.8, you can find the fix here.

But you can keep using APM even with this error. :grinning:

Good to hear that.

Luckily, the issue won't affect the functionality, I can just go with it. Thanks for your response!

1 Like

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