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

st2makesecrets, st2client, and st2chatops containers fail to start successfully #265

Open
enthusedcoder opened this issue Jun 25, 2024 · 3 comments

Comments

@enthusedcoder
Copy link

enthusedcoder commented Jun 25, 2024

Describe the problem
Hey. So, I just want to admit, up front, that I have very little experience with Docker, and even less with docker-compose, so I apologize in advance if the creation of this ticket is because I don't know what I am doing. So, I am trying to build out the stackstorm containers defined in this repo, but, for some reason, the st2makesecrets, st2client, and st2chatops containers just will not start. As I have been trying to troubleshoot this problem myself, I have noticed that these containers have one thing in common: They are displaying the same error:

    exec /<scriptname>.sh: no such file or directory

Where "<scriptname>" is the name of the script configured under the "command" configuration. So, st2makesecrets can't find /makesecrets.sh, st2client can't find /st2client-startup.sh, and st2chatops can't find /st2chatops-startup.sh. Initially, I thought it was some kind of permissions issue that occurred when attempting to copy the scripts to the root of the container, but that does not appear to be the case, as the st2web container copies st2web-healthcheck.sh over to the root of its container, but it is NOT configured to run the script via the "command" parameter (and I was able to connect to the container and verify the script does exist at the specified location). This appears to have something to do with containers using the "Command" property, but I have no idea why.... Also, I should clarify that I have replicated this on two entirely separate computers running Windows

Versions

  • Host OS: Windows 11 23H2. Using Docker Desktop running in WSL 2
  • docker:
 docker --version
 Docker version 26.1.4, build 5650f9b
  • docker-compose: [e.g. 1.21.1]
docker-compose --version
Docker Compose version v2.27.1-desktop.1
  • stackstorm version: [e.g. v3.3.0]

I cannot provide this information, as I am unable to connect to the client container to run the query, since it will not start

To Reproduce

  1. On a windows system, install docker desktop.
  2. run docker-compose up -d
@sudhanshujoshi23
Copy link

+1
Facing the same issue and with the same configuration.

@stevenbalthazor
Copy link

I had the same issue. In my case I am on a windows machine and using vscode to clone the repo.

This gave me the necessary hint: liximomo/vscode-sftp#40 (comment)

In my case, the easiest solution was to go into the scripts folder under st2-docker on my windows machine and convert the files to have LF line endings. In vscode you do this by opening the file and in the lower right hand corner click the CRLF and make it LF; then save the file.

After doing this for all the files in the scripts folder, do the docker compose up -d command again.

This solved the problem for me.

@sudhanshujoshi23
Copy link

Yes, the solution that @stevenbalthazor has mentioned worked for me as well.

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