docker install container-selinux hang on centos - docker

i have centos 7 (on Xen) and I'm trying to install the latest stable update.
first thing that I did is to stop the docker service and remove old versions from the procedure
then I have tried to install docker-ce using the command (I have already added the docker repo):
sudo yum install docker-ce
from some reason the installation hang.
command output:
Loaded plugins: fastestmirror, langpacks Loading mirror speeds from
cached hostfile * base: repo1.ash.innoscale.net * epel:
mirror.us.leaseweb.net * extras: mirror.rackspace.com * updates:
ftp.osuosl.org Resolving Dependencies There are unfinished
transactions remaining. You might consider running
yum-complete-transaction, or "yum-complete-transaction --cleanup-only"
and "yum history redo last", first to finish them. If those don't work
you'll have to try removing/installing packages by hand (maybe
package-cleanup can help).
--> Running transaction check
---> Package docker-ce.x86_64 0:17.09.0.ce-1.el7.centos will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-17.09.0.ce-1.el7.centos.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.28-1.git85ce147.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================= Package Arch
Version Repository
Size
================================================================================================================================================================================= Installing: docker-ce x86_64
17.09.0.ce-1.el7.centos docker-ce-stable 21 M Installing for dependencies: container-selinux
noarch 2:2.28-1.git85ce147.el7
extras 29 k
Transaction Summary
================================================================================================================================================================================= Install 1 Package (+1 Dependent package)
Total size: 21 M Installed size: 76 M Is this ok [y/d/N]: y
Downloading packages: Running transaction check Running transaction
test Transaction test succeeded Running transaction Installing :
2:container-selinux-2.28-1.git85ce147.el7.noarch
the installation hang on container-selinux.
after stopping (I have waited 1 hour) the yum install process I'm getting the error:
warning: %post(container-selinux-2:2.28-1.git85ce147.el7.noarch)
scriptlet failed, signal 2 Non-fatal POSTIN scriptlet failure in rpm
package 2:container-selinux-2.28-1.git85ce147.el7.noarch
now here is the strange thing... actually after stopping the process the container-selinux has been installed (not sure if successfully)
so after that I was able to install docker-ce without issue but only after interrupt the fist installation that was hang
any idea how to complete the installation without the be hanging?
remarks:
1) already tried reboot
2) already tried to install using the command: yum install --setopt=obsoletes=0 docker-ce
3) the repository extras already enabled
4) no disk space or performance issue on the server
5) already tried: yum-complete-transaction --cleanup-only
6) there is already containers + volumes that their data (under /var/lib/docker/) is still exist on disk

after several hours of trying things to make the installation work without hanging I have succeeded only after yum update all the packages in the server
looks like that the package (in my case) container-selinux-2.28-1.git85ce147.el7.noarch.rpm (here) contains some Requirements of the packages (here):
libselinux-utils
policycoreutils >= 2.5-11
policycoreutils-python
selinux-policy >= 3.13.1-39
selinux-policy-base >= 3.13.1-39
selinux-policy-targeted >= 3.13.1-39
I didn't try to update only them but probably it will do the work

Related

Command failed with a non-zero return code (123)

I am running into an issue when I try to generate a build with electron-packager (npx electron-packager . --platform=win32 --arch=x64). On Windows with intel chip (inside guext linux vm) the same config (package.json) and same command yield a good *.exe application. However, when I try this inside a guest vm Linux on a macOS arm64, I run into :
Command failed with a non-zero return code (123) : wine64 ...
parameters ...
I haven't found an explanation in the wine website. I also looked online but without any luck. I noticed that I don't have wine32 and wine sometimes recommend the installation. Note that the command does not include the ia32 arch.
In any case, I tried the complete reinstallation of wine on a new guest vm (Ubuntu 22.04). After following the step by step from wineHQ website, I run into the same problems, including when I enter the last command :
sudo apt install --install-recommends winehq-stable
Where the error is :
wine-stable:i386 : Depends libc6:i386 (>= 2.34) but it is not
installable
I tried to install this package but to no avail (libc6:i386; no installation candidate), I did follow the answer here and still no candidate. Package replacing it (libdb1-compat libnss-nis libnss-nisplus libcrypt1) were installed but still no luck.
Not all the time, but sometimes, Ubuntu report a crash of wine64 when running npx electron-packager... . In it is possible to find UnreportableReason : You have some obselete package version installed... libcurl4, libsasl2-2, libsasl2-module, libsasl2-modules-db. -> I did upgrade those, but that does not change the result of the electron-package command. In the Stacktrace the backtrace is stopped due to "cannot access memory at address xxxxxxx".
I also tried to move the project folder directly into a locally emulated drive of the Linux vm, but that does not have a different outcome.
Finally, I also tried to remove the option --out, --ico, etc. and ended up just running :
npx electron-packager . --platform=win32 --arch=x64
I am out of idea.

Cant uninstall Docker from Ubuntu on WSL

I am trying to uninstall Docker but I always get an Error. I already searched in the internet but wasnt succesful to fix the error. I have the impression there are some broken packages but I am very new to Linux in general.
This is the result:
sudo apt-get purge -y docker-ce
1 ↵ Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
docker-ce*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 181 MB disk space will be freed.
(Reading database ... 44147 files and directories currently installed.)
Removing docker-ce (18.03.1~ce-0~ubuntu) ...
invoke-rc.d: could not determine current runlevel
* Stopping Docker: docker start-stop-daemon: warning: failed to kill 466: No such process
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: error processing package docker-ce (--purge):
subprocess installed pre-removal script returned error exit status 1
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
I hope anybody can help me with that. :)
I had this same error trying to remove docker.io from WSL, which is apparently preinstalled. The problem is that the pre-removal script is failing because docker has never run, and therefore it cannot be stopped.
In my case I sudo-edited /var/lib/dpkg/info/docker.io.prerm and replaced /sbin/stop docker (which was failing) with true (which simply returns success). After that, apt remove docker.io worked perfectly.
(I found the solution here, an old problem from 2013: docker can't be uninstalled if it never worked (Ubuntu))
I had the same error while removing docker packages docker-ce docker-ce-cli. Basically docker service was not running on my machine, which is why I wanted to remove it completely and install again. As docker service never ran, script /var/lib/dpkg/info/docker-ce.prerm was failing to stop docker service. Removing this check worked perfectly..

Run Vagrant inside Docker container

I am looking for a way to run vagrant inside docker container. I tried using Ubuntu base container but had faced some issues while doing vagrant up, it failed.
root#991baf290ddc:/srv# vagrant up
VirtualBox is complaining that the installation is incomplete. Please
run VBoxManage --version to see the error message which should contain
instructions on how to fix this error.
root#991baf290ddc:/srv# VBoxManage --version
WARNING: The character device /dev/vboxdrv does not exist. Please install the virtualbox-dkms package and the appropriate headers, most likely linux-headers-.
You will not be able to start VMs until this problem is fixed.
5.0.40_Ubuntur115130
I tried installing virtualbox-dkms package but no help.
Deleting module version: 5.0.40 completely from the DKMS tree.
Done.
Loading new virtualbox-5.0.40 DKMS files...
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
dpkg: warning: version '3.10.0-514.16.1.el7.x86_64' has bad syntax: invalid character in revision number
It is likely that 3.10.0-514.16.1.el7.x86_64 belongs to a chroot's host
Building only for *
Building initial module for *
: using /lib/modules/4.4.0-83-generic/build/.config
(I hope this is the correct config for this kernel)
Done.
Error! The directory /lib/modules/* doesn't exist.
You cannot install a module onto a non-existant kernel.
The command '/bin/sh -c dpkg-reconfigure virtualbox-dkms' returned a non-zero code: 6
[root#test-docker vagrant-in-docker]#

Suse Linux docker file

I have a suse linux 12 ec2 instance. I have activated a image sles11sp3-docker-image using sledocker. In the Dockerfile when I try to install ibm java 1.6 using
RUN zypper in java-1_6_0-ibm, I get following error .
Refreshing service 'container-suseconnect'.
Problem retrieving the repository index file for service 'container-suseconnect':
[|]
Skipping service 'container-suseconnect' because of the above error.
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Loading repository data...
Reading installed packages...
'java-1_6_0-ibm' not found in package names. Trying capabilities.
Resolving package dependencies...
No provider of 'java-1_6_0-ibm' found.
Nothing to do.
The command '/bin/sh -c zypper in java-1_6_0-ibm' returned a non-zero code: 104
Please help
According to the docs (https://www.suse.com/documentation/sles-12/singlehtml/dockerquick/dockerquick.html), running zypper ref -s only gets you repo URLs with 12 hour tokens. Moreover, this command only appears to work while running in Docker on a SLES12 host.
Once I push the image to a repo and run it on another host, zypper ref -s no longer works (same error as yours). I'm basically stuck pre-installing all the base stuff before I publish the image.

capistrano 2 : `tar' could not be found in the path on the local host

I am using Capistrano version 2 and trying to deploy code on server.
but when i enter cap deploy:check command i am getting below error.
* executing "which tar"
servers: ["53.79.454.474"]
[53.79.454.474] executing command
command finished in 1088ms
The following dependencies failed. Please check them and try again:
--> `tar' could not be found in the path on the local host
I also try to install tar on my remote ubuntu machine, but still getting the same error.
sudo apt-get install tar
Reading package lists... Done
Building dependency tree
Reading state information... Done
tar is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I don't know why i am getting this error. please help
Thanks,
This error appears because the machine that holds your repo does not have tar installed (windows). You should have no problems when moving your :repo_url to your production server or any other server with a linux distribution.
** Edit
Before moving the repo, you could try to set the :copy_compression as :zip in your production.rb
if that fails (it might), and you absolutely want/need to stick to microsoft, there will be no way around installing cygwin with tar enabled on the machine your repo lies on and adding cygwin to your PATH variable.
Check this google discussion for more information.

Resources