Skip to content

Healthcheck always unhealthy if no anonymous access allowed. #141

@MadMakz

Description

@MadMakz

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The healthcheck fails for me because smbclient also exists with a non zero error when "NT_STATUS_ACCESS_DENIED" is returned (e.g. no anonymous access).

I'm using smbclient -L \\localhost -U % -m SMB3 | grep -q 'NT_STATUS_ACCESS_DENIED' || { [ $? -ne 0 ] && exit 1; } as an override wich does no longer report as unhealthy when anonymous is not allowed but still triggers unhealthy on timeout (e.g. NT_STATUS_IO_TIMEOUT) for example.

Expected behaviour

Don't fail healthcheck if everythings working

Actual behaviour

Fails when it should be healthy

Steps to reproduce

docker-compose up -d

Wait

docker inspect --format "{{json .State.Health }}" samba | jq reports unhealthy

Docker info

Version:    28.5.1

Docker Compose config

Logs

-

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions