Tag Archives: docker error

How to Solve Docker Error: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];

The error may be caused by an es error, which can be determined by viewing the system log: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];

The reason for this error is that when the disk space is less than 85%, the default value is 85%, which means that Elasticsearch will not allocate fragments to nodes that use more than 85% of the disk. All the above errors will be reported.

 

The solution to this error:

Since the es container has already been mapped, there is no need to enter the container and execute the reset all index instructions outside.

 

curl -XPUT -H “Content-Type: application/json”  http://127.0.0.1:9200/_all/_settings  -d'{“index.blocks.read_only_allow_delete”: null}’

[Sovled] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I turned on centos7 today. Since I did not set the boot-up auto-start, when I started docker, I found that docker-related commands would report errors. Baidu has said that I have tried reinstalling docker, but I still can’t solve the problem. Post a set of questions:

1. For example, I check the version information

 

 

2. Restart the container

 

 

3. Systemctl status docker Checking the docker status also found an error:

 

 

The final solution to the problem is:
enter /etc/docker, create a new one without a daemon.json file:

cd /etc/docker

 

 

 

Edit the daemon.json file:
add this code:

{
“registry-mirrors”: [“https://registry.docker-cn.com”]
}

 

Then restart docker:

When systemctl restart docker.service

uses the docker command again, there is no problem.
I hope this method is useful for you.

How to Solve Docker ERROR: Service’workspace’ failed to build: ERROR: Service’php-fpm’ failed to build

Use Laradock to build a PHP development environment based on Docker in Windows system to
execute commandsdocker-compose up nginx mysql redis

Errors occur during execution
newspaper laradock ERROR: Service ‘workspace’ failed to build:
reporteddocker ERROR: Service 'php-fpm' failed to build:

Solution: .envthe WORKSPACE_TIMEZONE=UTCchange WORKSPACE_TIMEZONE=PRC.

In C:\Windows\System32\drivers\etcthe Add

199.232.28.133 raw.githubusercontent.com

Then you need to try a few more times, and the network may have problems.

Warning: failed to get default registry endpoint from daemon

Docker error

Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?) .

operating system: CentOS7
execution command: docker info, docker search, docker pull
execution user: non-root, has sudo permission

guess error and execute user permission, use sudo docker info will also report error, but docker --version normal
execute sudo dockerd after CTRL +c interrupt, stop docker service and then restart, then use sudo docker info normal, No attempt to use root user directly is normal

停服启动命令
$ sudo systemctl stop docker.service
$ sudo systemctl start docker.service

不加sudo依然会报以下错误
被允许否认在试图连接到码头工人在unix守护进程插座:/// var /运行/码头工人。袜子:获取http://%2Fvar%2Frun%2Fdocker.sock/v1.38/info:拨打unix/var/run/docker.html。sock: connect:权限被拒绝