You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "mikyll (via GitHub)" <gi...@apache.org> on 2024/05/14 13:11:04 UTC
[I] bug: Quickstart script issue on Windows 10 + Git Bash "OCI runtime exec failed" [apisix]
mikyll opened a new issue, #11250:
URL: https://github.com/apache/apisix/issues/11250
### Current Behavior
**Disclaimer**: that's not a issue related to the API Gateway, but I struggled a bit trying to solve the issue and wanted to share my experience.
---
I was following the [Get APISIX](https://apisix.apache.org/docs/apisix/getting-started/) and the [Configure Routes](https://apisix.apache.org/docs/apisix/getting-started/configure-routes/) tutorials.
However, while running the quickstart script, I got an error, which prevented the Docker image from loading the correct configuration:
```bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "C:/Users/mirighi/Programs/Git/usr/bin/bash": stat C:/Users/mirighi/Programs/Git/usr/bin/bash: no such file or directory: unknown
⚠ WARNING: The Admin API key is currently disabled. You should turn on admin_key_required and set a strong Admin API key in production for security.
✔ APISIX is ready!
```
Since I was focusing on the `✔ APISIX is ready!` message, initially I completely ignored the error, but when I tried to add a route, I got `403 Forbidden`, since the configuration hadn't, in fact, been reloaded.
## Solution
After some debugging and research, I was able to correctly setup the gateway by changing the quickstart command from:
```bash
docker exec ${DEFAULT_APP_NAME} /bin/bash -c "echo '[...]' > /usr/local/apisix/conf/config.yaml"
```
to:
```bash
docker exec ${DEFAULT_APP_NAME} bash -c "echo '[...]' > /usr/local/apisix/conf/config.yaml"
```
(simply calling the `bash` command **without the absolute path**).
I later found [this thread](https://stackoverflow.com/questions/48001082/oci-runtime-exec-failed-exec-failed-executable-file-not-found-in-path) on StackOverflow, which furher addressed the issue.
### Expected Behavior
Maybe checking for this error message and call the correct command instead, I actually don't know what would be a solid fix.
### Error Logs
Docker quickstart command logs:
```bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "C:/Users/mirighi/Programs/Git/usr/bin/bash": stat C:/Users/mirighi/Programs/Git/usr/bin/bash: no such file or directory: unknown
⚠ WARNING: The Admin API key is currently disabled. You should turn on admin_key_required and set a strong Admin API key in production for security.
✔ APISIX is ready!
```
### Steps to Reproduce
Just run `curl -sL https://run.api7.ai/apisix/quickstart | sh` on Windows 10 + Git Bash
### Environment
- APISIX version (run `apisix version`): 3.9.0
- Operating system (run `uname -a`): Windows 10
- Command Line Interface: Git Bash
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Quickstart script issue on Windows 10 + Git Bash "OCI runtime exec failed" [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #11250:
URL: https://github.com/apache/apisix/issues/11250#issuecomment-2111426831
Thanks for reporting and sharing the details. I'll take a look.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Quickstart script issue on Windows 10 + Git Bash "OCI runtime exec failed" [apisix]
Posted by "mikyll (via GitHub)" <gi...@apache.org>.
mikyll closed issue #11250: bug: Quickstart script issue on Windows 10 + Git Bash "OCI runtime exec failed"
URL: https://github.com/apache/apisix/issues/11250
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Quickstart script issue on Windows 10 + Git Bash "OCI runtime exec failed" [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #11250:
URL: https://github.com/apache/apisix/issues/11250#issuecomment-2111439114
Just realized the error was windows specific. The quickstart script was not developed with Windows in mind, because APISIX is typically not deployed on Windows in prod. I would guess that most tutorials / docs are based around linux as well. Please use linux or macOS to avoid downstream issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org