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

Problem when using example from device-sdk-go in docker-compose file #1206

Open
tntthanh opened this issue Aug 10, 2022 · 6 comments
Open

Problem when using example from device-sdk-go in docker-compose file #1206

tntthanh opened this issue Aug 10, 2022 · 6 comments
Labels
question Further information is requested

Comments

@tntthanh
Copy link

Hi everyone,
I had built the example of device-sdk-go, had run locally perfectly via make-build execute file, and then pushed it to my docker hub, using it in my docker-compose file, along with other edgex-compose services (e.g: edgex-core-data, edgex-core-metadata,...). I had add "device-simple" into variables: ADD_KNOWN_SECRETS and ADD_SECRETSTORE_TOKENS in secretstore-setup. But, I got this error running the example service with the following log of the errors, please help me solve this:

"...
edgex-device-simple | /edgex-init/ready_to_run_wait_install.sh: exec: line 41: /device-simple: not found
edgex-device-simple | Tue Aug 9 08:16:58 UTC 2022 Starting /device-simple -cp=consul.http://edgex-core-consul:8500/ --registry --confdir=/res ...
edgex-device-simple exited with code 127
..."

@tntthanh tntthanh added the bug Something isn't working label Aug 10, 2022
@cloudxxx8 cloudxxx8 added question Further information is requested and removed bug Something isn't working labels Aug 10, 2022
@cloudxxx8
Copy link
Member

ready_to_run_wait_install.sh is expecting your service binary is under the / path. in your case, it should be /device-simple
where is your binary located when you build the docker image? please check the Dockerfile.

@lenny-goodell
Copy link
Member

also have to have the proper volume mount setup.

@lenny-goodell
Copy link
Member

@tntthanh , You are missing the entrypoint and cmd property overrides plus volume mounts, etc:
if you must run in secure mode, use device-virtual section here as a template.
https://github.com/edgexfoundry/edgex-compose/blob/main/docker-compose.yml#L386

Is there a reason you are doing this with security enabled?

@tntthanh
Copy link
Author

tntthanh commented Aug 15, 2022

@cloudxxx8 I run exactly as source does keep origin, but still got error, I check and try a lots on Dockerfile, but the problem is still not solved: "/edgex-init/ready_to_run_wait_install.sh: exec: line 41: /device-simple: not found". Please help me on Dockerfile or Makefile please, it's so complex on directory structure, I think.

@tntthanh
Copy link
Author

tntthanh commented Aug 15, 2022

Other github sources, for example, for device service mqtt, custom app service, ... (for my example diagnose, built file not in the folder "example" as device-sdk), I can push them to docker hub and run it by docker-compose file very well

@cloudxxx8
Copy link
Member

device-simple is just a sample, and we didn't verify all kinds of deployment scenarios.
you should be able to make a simple adjustment to make it work.
in this case, you just need to modify the file path.

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

No branches or pull requests

3 participants