Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of docker secrets not working #559

Open
SBlechmann opened this issue Apr 16, 2021 · 2 comments
Open

Use of docker secrets not working #559

SBlechmann opened this issue Apr 16, 2021 · 2 comments

Comments

@SBlechmann
Copy link

Hey there,

in the docker documentation it says that secrets can be used to prevent clear written passwords etc as environment files. I'm using version 1.17.2.

It seems that is not working since I always get a socket error and (0,5). It took me quite some while to figure that out cause the error message really didn't help here:
`
time=2021-04-16T12:07:41.533Z | lvl=FATAL | corr=n/a | trans=n/a | op=n/a | from=n/a | srv=n/a | subsrv=n/a | msg=GLOBAL-002: Couldn't connect with MQTT broker: {} | comp=IoTAgent

time=2021-04-16T12:07:41.533Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: Callback was already called. | comp=IoTAgent`

After changing the - in this case mqtt - username and password to clear text it was working fine again.
(the secrets have been properly mounted into the container).

Just let me know if you need any more information :)

@fgalan
Copy link
Member

fgalan commented Apr 16, 2021

Maybe @jason-fox could provide help on this. I think he was the one that implemented the secret system in docker in this repository (although I'm not fully sure :)

@jason-fox
Copy link
Contributor

I have created a highly insecure debug branch on my personal fork - try building it and checking what comes out in the log?

docker build -t iot-agent . \
    --build-arg GITHUB_ACCOUNT=jason-fox \
    --build-arg GITHUB_REPOSITORY=iotagent-json \
    --build-arg SOURCE_BRANCH=debug \
    --target=distroless|pm2|slim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants