"Failed to initialize Lua VM with Passenger on Docker - docker

I'm trying to setup a development environment that uses docker but the passenger docker image gives me this error over and over again.
[1] development-passenger-1 | 2022/04/28 10:17:53 [error] 148#148: failed to initialize Lua VM in /etc/nginx/nginx.conf:66
[1] development-passenger-1 | 2022/04/28 10:17:56 [error] 159#159: failed to initialize Lua VM in /etc/nginx/nginx.conf:66
Using an M1 Mac and I'm new to this whole Mac thing so not sure what's wrong.
Our setup has worked without any issues on linux, windows and older macs. Although I'm happy to change my setup from the Master branch just to get this working but ideally it'll be something that works on all platforms.
Docker desktop gives me a !amd64 warning for the passenger container.
I've installed OpenResty and Rosetta, changing platforms for passenger, and basically everything else I could find. Best I could do was get rid of the !amd64 warning but not the Lua VM error.
I can attach more details like parts of our docker-compose or passenger config if need be, but I don't think those will be too helpful at this stage.

I don't know if this exactly helps but you could try to build your docker image with platform: "linux/amd64"
I read something about this here:
https://erica.works/docker-on-mac-m1/
How to make docker-compose work on M1 chip?

Related

visual-studio-code : failed to connect. is docker installed?

my environment :
MacOS M1 chip
VSCode version 1.66.2 arm64
local installed docker version : 20.10.22
I have situations that docker is not working in VSCode.
I already installed docker in local. But when I'm trying to connect docker in VSCode, repeatedly asking install docker extensions. (but I do have docker already ). and if I do reinstall with following the VSCode, the docker version was broken (changed to intel chip docker).
Does anybody know what's wrong?
Docker Extensions for VS Code have nothing to do with the Docker engine itself. They are like an additional layer of tools and commands over the installed Docker. E.g. they provide IntelliSense for editing Docker-related files, you can run Docker commands from F1 drop-down, etc. But you should be able to do all the required tasks even without Docker Extensions, e.g. from the Terminal in VS Code, but for this the path to Docker CLI (command line interface) should be added to PATH environment variable.
If you are getting failed to connect error then maybe Docker engine is not running. Please refer to https://docs.docker.com/desktop/install/mac-install/ and https://docs.docker.com/desktop/troubleshoot/overview/ about how to check if the engine is running and how to troubleshoot the issues.
If that doesn't help, please provide some specific error and steps, which led to it, then we'll try to find out.

PyCharm unable to generate code skeletons, autocomplit, run debug mode with docker interpreter

I am using PyCharm with docker interpreter on macbook with M1. At some point of time it stopped generating code skeletons, providing autocompletion and run debug mode of my code.
When I've tried to run PyCharm in Debug mode it stated me 502 docker error.
Reseting to factory defaults and re-installations didn't helped.
The reason of issue was Docker Desktop's Beta feature Use containerd for pulling and storing images. It failed the whole process. Uncheck it and live happily.

ERROR: Couldn't connect to Docker daemon at http://0.0.0.0:2375 - is it running?

I am watching a course on Hyperledger Composer development online. I installed all the required prerequisites, docker, docker-compose, nodejs, golang. After cloning the fabric-samples repository from github. There is a file called byfn.sh inside a folder called first-network. On running the command ./byfn.sh up, it's giving the following error:
If, someone has experience working on it, please help. Any help would be appreciated. Thank you.
I think the first thing you should do is stop looking at or trying to use Hyperledger Composer. It is end of life now and some of it's components will have problems even if you install the exact required versions (for example the rest server fails to launch now on node 8 but changing to a newer version of node may break other parts of Composer).
As you had planned to use it with hyperledger fabric I would suggest that you just invest your time in Hyperledger fabric, see https://hyperledger-fabric.readthedocs.io/en/latest/
Regarding your problem with docker, I suspect you tried to install docker through the apt command in your wsl window ? I'm guessing that you are using WSL2, but if you are using WSL1 then docker will never work in a WSL1 environment. If it was WSL2 then the docker daemon doesn't automatically start in that environment you need to start it yourself first. I think the command is service docker start. The important thing here is to make sure you are using WSL2 and not WSL1 (see hyperledger fabric link later which provides guidance on making sure you are using WSL2).
An alternative to installing docker into WSL2 directly would be to install Docker Desktop for Windows and follow the hyperledger fabric instructions here https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#wsl2

Docker for mac on machine that previously had boot2docker installed complains about TLS configuration

I took an older macbook back in use. It previously had boot2docker installed when the native docker for mac didn't exist yet. That might be the root cause of my issue.
I've installed the new docker for mac but when I run docker-compose I've got the following error:
docker.errors.TLSParameterError: Path to a certificate and key files must be provided through the client_config param. TLS configurations should map the Docker CLI client configurations. See https://docs.docker.com/engine/articles/https/ for API details.
I don't want to install a docker machine with virtual box or anything. I just want to run it natively like a fresh docker for mac installation. All the solutions I've found so far require me to use a docker-machine.
Fixed it by unsetting all legacy docker machine environment variables so that it uses the correct docker commands
unset ${!DOCKER_*}
I've found the solution on the docker troubleshooting page over here.

Minishift - cannot start - Error starting the VM: Error getting the state for host: machine does not exist

I ran Docker applications locally in an environment of Windows 10 Home, Oracle Virtualbox, The extension pack, Docker toolbox and Minishift.
Restarting after a few months, I get all kinds of errors. When I re-run minishift, I get a bunch of "OK's" and finally I get this message:
Starting Minishift VM .... FAIL E0807 20:29:20.950373 672
start.go:428] Error starting the VM: Error getting the state for host:
machine does not exist. Retrying.
The command is: $ minishift start --vm-driver=virtualbox --memory=3G
First, I start docker via the Docker Quickstart terminal. Because I can work with docker (and openshift) I know the environment is correct.
How can I get minishift run again?
Clean up using the following command:
minishift delete --clear-cache
Restarting minishift will recreate all necessary stuff.
It is possible that Minishift config contains wrong data. Reasons can be many, one them, for example, is that the VM got deleted via VirtualBox GUI and thus the Minishift has data about VM which does not exist. During the startup Minishift then asks for the status of VM, but VirtualBox cannot provide any information about it as it does not exist. In cases like this my workflow is:
Delete the VM (if there is any) using the hypervisor - for example VirtualBox GUI or KVM's virsh command,
Delete the Minishift home directory, located at %userprofile%\.minishift in case of Windows or ~/.minishift for Unix systems,
Try to start Minishift.
Please note that this is rather destructive way of getting over the problem and if you have valuable data on the VM then you might consider more gentle approaches.
I had the same issue. First clean up minishift cache:
minishift delete --clear-cache
Then launch minishift from its folder (do not use a path env). In my case:
d:\progs\minishift-1.34.2-windows-amd64\minishift start --vm-driver virtualbox
If you get stuck (minishift delete --clear-cache is not working) with the virtual switch applied, type the following to deactivate whatever is set in minishift config view
minishift config set save-start-flags false
Then continue what you started: e.g. minishift start --vm-driver virtualbox
I had the same problem.
My ubuntu machine is running as a VM in windows 10 host.
The below did not work because nested virtualization is by default not allowed in machines running as a guest.
minishift delete --clear-cache
After enabling virtualization engine in the vm settings, I was able to start minishift(after clearing cache ofcourse)
Try to start you virtual machine in you Hyper-V Administrator.
My error was minishift reserve 4Gb of Memory and my system hasn't enought.
Right click over your minishift virtual machine, configuration and get down the memory reserved.
I came to this issue trying to run minishift against an existing VM
Worked with the first VM, deleted that then attempted with a new VM, kept getting this problem and was not able to start the cluster even though it worked first time.
Had to delete the entire ~/.minishift folder and then it started with no issues ¯\_(ツ)_/¯

Resources