TheHive-Project / TheHive-Project/Cortex

Linux spec user can't find user thehive: no matching entries in passwd file

Open
#282 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.6k
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Request Type

Bug

Work Environment
Question Answer
Environment Kubernetes
K8s version 1.15.5
Cortex version / git hash 3.1.0-0.1RC1 / f47de61
Package Type Docker
Browser type & version Chrome v84.0.4147.125
Problem Description

Due to the reason that Cortex 3.0.1 does not support ES-7.x but(Tested using seperate ES-6.8.8 and OpenDistro 0.9.0) this new RC allows implementation of preexisting infrastructure in the cluster that utilizes OpenDistro 1.9.0 ES-7.8.0 stable version.

I have modified the docker file and created Helm chart referencing docker-compose.yaml to utilize Kubernetes. The deployment fails since daemon in the container can not find thehive user that matches entries in passwd file but after inspecting Docker image I can see that the user is created but can't figure out why it's not symlinking.

Log is listed below in Complimentary information section

Log number is incremental since it has been in the ContainerCreatError then CrashLoopBackOff state for some time.
Knowing how Kubernetes deals with containers, log extraction is impossible and I can not find any logs in Kibana either.

Steps to Reproduce
  1. Create Helm Chart for Cortex
  2. Deploy Cortex together with TheHive4
  3. Error: failed to start container "cortex": Error response from daemon: linux spec user: unable to find user thehive: no matching entries in passwd file; Back-off restarting failed container
  4. Profit ?!
Possible Solutions

Unknown

Complementary information

I am aware that there is no official of Helm chars for the Cortex and most of the time it is do-it-yourself task in order to make it work

failed to try resolving symlinks in path "/var/log/pods/response_thehive-m1dj48x1k2-cortex-dpl-5856988c8d-qpzr4_7cec1ead-b2b0-4111-8f74-a3158a20a65f/cortex/9.log": lstat /var/log/pods/response_thehive-m1dj48x1k2-cortex-dpl-5856988c8d-qpzr4_7cec1ead-b2b0-4111-8f74-a3158a20a65f/cortex/9.log: no such file or directory

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the Dockerfile and docker-compose.yaml with the custom Helm chart and its container user configuration. Reproduce the deployment using the reported Kubernetes and Cortex versions, then verify that the resulting container can resolve thehive from passwd and reaches a running state without the startup error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.