Tag Archives: container

[Solved] docker skywalking error: no provider found for module storage

When I use docker to deploy skywalking, I always report an error: no provider found for module storage

Details are as follows:

Conditions:

  1. skywalking 9.1
  2. elasticsearch 7

Execute command:

docker run --name skywalking-oap --restart always -d \
-p 12800:12800 \
-p 11800:11800 \
--link es7:es7 \
-e SW_STORAGE=elasticsearch7 \
-e SW_STORAGE_ES_CLUSTER_NODES=es7:9200 \
skywalking-oap-server

report errors:

no provider found for module storage

Solution:

Modify

docker run --name skywalking-oap --restart always -d \
-p 12800:12800 \
-p 11800:11800 \
--link es7:es7 \
-e SW_STORAGE=elasticsearch7 \
-e SW_STORAGE_ES_CLUSTER_NODES=es7:9200 \
skywalking-oap-server

to

docker run --name skywalking-oap --restart always -d \
-p 12800:12800 \
-p 11800:11800 \
--link es7:es7 \
-e SW_STORAGE=elasticsearch \
-e SW_STORAGE_ES_CLUSTER_NODES=es7:9200 \
skywalking-oap-server

Modify sw_ Storage=elasticsearch7 to sw_ STORAGE=elasticsearch

Cause analysis:

  1. Before skywalking 8.8, it cannot automatically sense what the storage source is, and you need to manually specify whether it is es6 or 7;
  2. After 8.8, the version of the storage source can be automatically sensed, and there is no need to manually specify es6 or 7, just write es directly;

 

[ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: “configs“

[ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: “configs“

[error systemverification]: failed to parse kernel config: unable to load kernel module: “configs”.

When installing kubernetes cluster, the above error is reported.

 

Solution:

Method 1: ignore the error

Add the –ignore-preflight-errors=SystemVerification option to ignore the error. It is not possible to tell if other problems will occur subsequently with this option.

Method 2: Upgrade kernel version

I installed the kubernetes cluster using kernel version 4.19.12, and the problem did not occur after upgrading the kernel to 5.13.7. I am not sure if it is a kernel version problem.

Method 3:

Manually compile the config kernel module

 

[Solved] Error response from daemon: driver failed programming external connectivity on endpoint mysql

Error response from daemon: driver failed programming external connectivity on endpoint mysql

docker command:
docker start container_name/id
Container Start Error:

Error response from daemon: driver failed programming external connectivity on endpoint mysql (cf1ba9f9e0613e14f42332d187a51429f8213aaf91d775f2ec3600614c78e6e1): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: mysql

 

Solution: restart docker:systemctl restart docker

https://blog.csdn.net/qq_45652428/article/details/124870923

[Solved] Error from server (InternalError): error when creating “ingress.yaml”: Internal error occurred: fail

When using the ingress exposure service, kubectl apply -f ingress.yaml reports the following error.
Reported error:

Error from server (InternalError): error when creating “ingress.yaml”: Internal error occurred: failed calling webhook “validate.nginx.ingress.kubernetes.io”: failed to call webhook: Post “https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s”: x509: certificate has expired or is not yet valid: current time 2022-03-26T14:45:34Z is before 2022-03-26T20:16:32Z

 

Solution:
Check kubectl apply -f ingress.yaml

kubectl get validatingwebhookconfigurations

Delete ingress-nginx-admission

kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission

Then execute

kubectl apply -f ingress.yaml 

stream copy error: reading from a closed fifo [How to Solve]

The docker service on the Linux server cannot be started after running for a period of time

Record a docker service problem encountered at the customer’s site

Problem description

After running the docker service for a period of time, some services are killed and cannot be restarted successfully through docker compose. Check the docker service log and report an error stream copy error: reading from a closed FIFO

Troubleshooting process:

1. The initial positioning is that there is not enough memory. Check with Free -g and find that the content is enough

2 After searching the Internet, some bloggers said that restarting docker could solve the problem. After restarting docker, they found that the error changed, and the service that didn’t get up before still couldn’t get up. The error became failed to allocate network resources for node *****
3 The network of docker service is the default. Regardless of the problem of docker network, changing the stack name and restarting still won’t work
4 Docker service PS ID/docker service logs ID check the service log that failed to start. It is found that the error log is still stream copy error: reading from a closed FIFO
5 Finally, before restarting the server, check the disk with the df -h command and find that the/dev/mapper/centosroot disk is full

Solution:

Go to cd /var/log to delete some useless log files, if the current log files are small, you can use du -sh in the root directory to view those folders occupy a lot of space, generally the /var folder and /root folder will occupy the root disk, you need to delete the contents of these two folders

[Solved] error during connect: This error may indicate that the docker daemon is not running

Because the shortcut key of my screenshot tool is Ctrl+q , and the shortcut key of docker desktop exit is also Ctrl+q, when I press Ctrl+q, docker desktop exits, and then when I enter the docker command in the console,

burst this line of error

error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json": open //./pipe/docker_engine: The system cannot find the file specified.

Solution:
reopen docker desktop

when the color of the icon in the lower-left corner is the same as that shown in the picture, it proves that docker operates normally
then I go to CMD and enter the docker command

to see that there is no error

[Solved] docker Commands Execute Error: Segmentation fault

If you execute any docker command, you will report an error segmentation fault. There have been no similar errors when using docker before. After troubleshooting, it was found that the available memory was only 110m. It was speculated that the memory was not enough, so the command to clean the memory was executed, but the parameters were changed to 1, 2 and 3, which could not clean the memory.

sync
echo 1 > /proc/sys/vm/drop_caches

The solution is found on GitHub. First enter

sysctl vm.overcommit_memory

The output is 0, and then change the parameters

sysctl vm.overcommit_memory=1

At this time, the application that occupies a lot of memory has been restarted automatically. If not, execute the above cleaning command.

[Solved] nvidia-docker runtime Error: (Unknown runtime specified nvidia)

1. An error is reported when running the docker command

root@test:~# docker run --runtime=nvidia -ti  -v $(pwd):/workspace -w /workspace -v /nfs:/nfs $@ --privileged -v /var/run/docker.sock:/var/run/docker.sock registry.test.cn/mla/cxx_toolchains:latest
docker: Error response from daemon: Unknown runtime specified nvidia.
See 'docker run --help'.

According to the error prompt, check whether NVIDIA-docker is installed

root@test:~# nvidia-docker
nvidia-docker: command not found
root@test:~# 

Obviously, it is not installed

2 execute the script and install NVIDIA-docker

root@test:~# cat install-nvidia-docker.sh
sudo curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
sudo curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
root@test:~#

Check that NVIDIA-docker and NVIDIA-container-Runtim are installed successfully

root@test:~# which nvidia-docker
/usr/bin/nvidia-docker
root@test:~# which nvidia-container-runtime
/usr/bin/nvidia-container-runtime
root@test:~#

3 edit /etc/docker/daemon.JSON is as follows

root@test:~# cat /etc/docker/daemon.json
{
  "insecure-registries": ["registry.test.cn"],
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  },
  "live-restore": true,
  "metrics-addr": "0.0.0.0:9323",
  "default-runtime": "nvidia",
  "experimental": true,
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}
root@test:~#

4 restart docker

root@test:~# systemctl daemon-reload
root@test:~# systemctl restart docker

5 verification

root@test:~# docker run --runtime=nvidia -ti  -v $(pwd):/workspace -w /workspace -v /nfs:/nfs $@ --privileged -v /var/run/docker.sock:/var/run/docker.sock registry.test.cn/mla/cxx_toolchains:latest
root@c3a43f4564a8:/workspace#
root@c3a43f4564a8:/workspace# ls
root@c3a43f4564a8:/workspace# pwd
/workspace
root@c3a43f4564a8:/workspace#

[Solved] docker Error: bridge docker0 failed: exchange full

Error reported: Bridge docker0 failed: exchange full

the default docker0 bridge only supports 1024 links. If it exceeds 1024, it will report bridge docker0 failed: exchange full

you can remove the restriction by creating another network bridge. When docker run creates a container, you specify our own network bridge. Of course, we only support 1024 network bridges. You can use this method to create unlimited network bridges as long as there is enough memory to create a docker container

1. View Bridge

[root@bj ~]# docker network ls
NETWORK ID     NAME      DRIVER    SCOPE
0c49b2d827f5   bridge    bridge    local
8ec28361848f   host      host      local
3b929af4064c   none      null      local

2. Create Bridge

[root@bj ~]# docker network create xinnet
[root@bj ~]# docker network ls
NETWORK ID     NAME      DRIVER    SCOPE
0c49b2d827f5   bridge    bridge    local
8ec28361848f   host      host      local
3b929af4064c   none      null      local
604ccc72661a   xinnet    bridge    local
[root@bj ~]# docker network inspect xinnet
[
    {
        "Name": "xinnet",
        "Id": "604ccc72661af52f0889bfea4664d70e899427418b1a9301d8a46e6ce95e46ee",
        "Created": "2021-12-08T13:50:43.973901095+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.19.0.0/16",
                    "Gateway": "172.19.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "e92f81a6fe11b6e2c82de38fbe4e06a9cfcdb1dcd1f64485e5b805e3714bd163": {
                "Name": "zabbix-agent-22000",
                "EndpointID": "b7ac1a57b2e91435c676a7b4203ab50237893a3714aff185d8cdac45b1251356",
                "MacAddress": "02:42:ac:13:00:02",
                "IPv4Address": "172.19.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

3. Create container specified bridge – network

[root@bj ~]# docker run -m 100m --name zabbix-agent-22001 --network=xinnet -e HOSTNAME="TEST22001" -e ZBX_HOSTNAME="TEST22001" -e ZBX_SERVER_HOST="10.20.9.246" -p 22001:10050 -e ZBX_SERVER_PORT=10051 -d zabbix-agent:4.0.35 
[root@bj ~]# docker ps -a
CONTAINER ID   IMAGE                 COMMAND                  CREATED          STATUS          PORTS                      NAMES
e92f81a6fe11   zabbix-agent:4.0.35   "/usr/bin/tini -- /u…"   15 minutes ago   Up 15 minutes   0.0.0.0:22001->10050/tcp   zabbix-agent-22001

If – network is not specified, the created containers will be hung on docker0 by default, and the IP of docker0 interface on the local host will be used as the default gateway for all containers

[Solved] Harbor image replicate Error: Fetchartifacts error when collect tags for repos

Solution:

https://github.com/goharbor/harbor/issues/12003

postgresql.conf:
sudo sed 's/max_connections =.*/max_connections=999/g'

This issue is because the postgres database connection exceeded.
The default max connection is 100.
However ever it's still not working even set database.max_open_conns in harbor.yaml.
You have to also manually edit postgresql.conf like
sudo sed 's/max_connections =.*/max_connections=999/g' /data/database/postgresql.conf
and restart harbor-db

track db issue with #12124