Unable to build the image using the OpenShift build service: Can't instantiate binary build, due to error reading/writing stream - syndesis

When I try to execute a build of the images of Syndesis using Minishift, it finishes with this error:
[ERROR] Failed to execute goal
io.fabric8:fabric8-maven-plugin:3.5.38:build (exec) on project s2i:
Failed to execute the build: Unable to build the image using the
OpenShift build service: Can't instantiate binary build, due to error
reading/writing stream. Can be caused if the output stream was closed
by the server. Connection reset
I cheched that minishift is running with "minishift status":
$ minishift status
Minishift: Running
Profile: minishift
OpenShift: Running (openshift v3.11.0+82a43f6-231)
DiskUsage: 76% of 20G (Mounted On: /mnt/sda1)
CacheUsage: 1.679 GB (used by oc binary, ISO or cached images)
and checked that the proper project/pods are installed with "oc get pods" command.

The problem was that minishift was running out of space.
I could recover some space with the command
$ syndesis dev --cleanup
When you do this, make sure the nip.io domains work on your machine. If that's not the case, add the following entry to your /etc/hosts:
$IP $IP.nip.io syndesis.$IP.nip.io docker-registry-default.$IP.nip.io
where $IP is the IP of minishift, which you can find with:
$ minishift ip
192.168.42.58

Related

GitLab Pipeline / Runner fails after update: failed adding cache volume ... AppArmor enabled ... docker-default profile could not be loaded

After updating GitLab and GitLab Runner to v15.8.1 on a Ubuntu 20.04.05 LTS suddenly none of our pipelines succeeded anymore.
Every job showed the following error message:
ERROR: Preparation failed: adding cache volume: set volume permissions: running permission container "XXXXXXX" for volume "runner-zx-dagtx-project-41-concurrent-0-cache-YYYYYYY": starting permission container: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running apparmor_parser apparmor_parser --version failed with output:
error: exec: "apparmor_parser": executable file not found in $PATH (linux_set.go:105:0s)
Google miss leaded me to re-installations of Docker and the GitLab Runner, to deleting all docker volumes, images and containers and so on. All without success.
How to get GitLab Runner back to work?
What fixed the problem was the installation of AppArmour and the AppArmour Utilities.
sudo apt-get install apparmor apparmor-utils
Another solution would have been to disable AppArmour during the boot process by adding apparmor=0 as boot parameter to the grub file (what I didn't try, so no guarantee for that).

IDEA can't see docker desktop containers on ARM macOS

I downloaded Docker Desktop for Mac and I can run docker-compose up but when I try to run a functional test I get the error
java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
and when I check the logs I see that it is about docker machine I believe.
[main] ERROR o.t.d.DockerClientProviderStrategy - Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
[main] ERROR o.t.d.DockerClientProviderStrategy - UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
[main] ERROR o.t.d.DockerClientProviderStrategy - DockerMachineClientProviderStrategy: failed with exception ShellCommandException (Exception when executing docker-machine status ). Root cause InvalidExitValueException (Unexpected exit value: 1, allowed exit values: [0], executed command [docker-machine, status, ], output was 122 bytes:
Docker machine "" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.)
[main] ERROR o.t.d.DockerClientProviderStrategy - As no valid configuration was found, execution cannot continue
but I believe Docker Desktop should be enough for MacOS, not confident though. I tried to create a docker machine but I couldn't because it needs a virtualbox but virtualbox doesn't support M1 macs. Don't know what to do here to be honest.
I can see the container up and running in Docker Desktop,the docker-compose up also runs. It seems like IntellijIDEA can't see it? Also when I try to add Docker to IntellijIDEA from Preferences -> Build, Execution, Deployment -> Docker, I also get the error
Cannot connect: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (Details: [2] No such file or directory)
Can anyone assist me with this?
Edit: I actually checked var/run and there is no such file as docker.sock. Why is this, I am so confused.

docker-compose up does not work with remote host (but docker itself does)

I would like to deploy an application to a remote server by using docker-compose with a remote context, following this tutorial.
The Dockerfile contains
FROM ubuntu
The docker-compose.yml contains
version: "3.8"
services:
ubuntu_test:
build: .
The remote context remote is set as ssh://root#host
When I run docker-compose --context remote up, it crashes with the following error message
runtime/cgo: pthread_create failed: Resource temporarily unavailable
runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x7fb21d93bfb7 m=3 sigcode=18446744073709551610
goroutine 0 [idle]:
runtime: unknown pc 0x7fb21d93bfb7
stack: frame={sp:0x7fb21aee9840, fp:0x0} stack=[0x7fb21a6ea288,0x7fb21aee9e88)
[...]
ERROR: Couldn't connect to Docker daemon at http+docker://ssh - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
What is already working
Copying the source code to the remote server, logging in and running docker-compose up
Unpacking docker-compose into the corresponding docker commands
docker --context remote build .: works
docker --context remote run ubuntu: works
Using docker-compose --context remote build on the local machine to build the images on the remote server
In summary, everything works except for docker-compose --context remote up and I can't for the live of me figure out why. Everything I got is this cryptic error message (but obviously, Docker is running on the remote server, otherwise docker with remote context would fail).
Edit: My problem can be reduced to: What is the difference between docker --context remote run ubuntu and docker-compose --context remote up (as defined in my case)?

Cannot execute Docker Commands in UNIX environment

I installed the Docker installation to my UNIX (macOS), once I execute simple commands like,
$ docker run ubuntu
it shows following error prompted in terminal:
docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
I tried in several docker commands, but docker daemon throws the mentioned error message.
This is issue of Docker Engine startup not linked with docker demons, I resolved this problem by Reset to Factory Settings option in Docker Troubleshooting pane

gradlew buildDocker fails with Docker Toolbox

after running "jhipster" and creating a monolithic application, I try to run it in Docker according to the manual, and get an error message of the following kind:
What went wrong:
Execution failed for task ':buildDocker'.
com.github.dockerjava.shaded.org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:2375 [/127.0.0.1] failed: Connection refused: connect
after some googling, I sort of figured out that with Docker Toolbox (boy is contemporary IT field fucked) one actually has to connect to Docker Engine running on different IP, so I've set an environment variable like this:
DOCKER_HOST=tcp://192.168.99.100:2376 I get a DockerException (no message) error
It is docker daemon which has to be open to accept non-TLS connection from mvn/gradle build processes. Open Docker window to update settings as shown in attached image
Actually, I think this should be also reflected on the JHipster documentation page: with Docker Toolbox one needs to have 3 (THREE) environment variable set as follows:
DOCKER_HOST=tcp://192.168.99.100:2376
DOCKER_CERT_PATH=C:/Users/<your-name>/.docker/machine/certs
DOCKER_TLS_VERIFY=1
You can check if it's properly setup by running docker images in the same shell where you run gradlew command

Resources