无法让 Docker 容器加载到本地主机
Can not get Docker container to load on localhost
我正在尝试获取要在本地主机 (OpenVAS) 上打开的容器映像。我做了以下事情:
docker pull atomicorp/openvas
返回以下内容:
Using default tag: latest
latest: Pulling from atomicorp/openvas
Digest: sha256:------------------------------------------------(long sha hash)
Status: Image is up to date for atomicorp/openvas:latest
docker.io/atomicorp/openvas:latest
之后,我尝试使用以下命令 运行 图像:
sudo docker run -d -p 443:443 -e OV_UPDATE=yes --name openvas atomicorp/openvas
它 returns 终端的容器 ID(这是预期的,因为这是选项 -d 的作用。之后,我转到浏览器 (Chrome) 并尝试打开本地主机在端口 443 上。localhost 页面上没有任何显示。(我在浏览器中键入 localhost:443)。当我查看 docker 进程时,容器 ID 存在。
sudo docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0ac7d24c9227 atomicorp/openvas "/bin/sh -c /run.sh" 7 minutes ago Up 7 minutes 0.0.0.0:443->443/tcp, :::443->443/tcp openvas
35825b7bfd96 armedu/mbed_sim "docker-entrypoint.s…" 6 months ago Exited (0) 6 months ago cranky_margulis
f1d3dbcf4bbb armedu/mbed_sim "docker-entrypoint.s…" 7 months ago Exited (0) 7 months ago busy_galileo
a513e4e53d75 armedu/mbed_sim "docker-entrypoint.s…" 7 months ago Exited (0) 7 months ago optimistic_carson
2492d538f000 armedu/mbed_sim "docker-entrypoint.s…" 7 months ago Exited (0) 7 months ago cranky_ptolemy
fb770e031181 hello-world "/hello" 7 months ago Exited (0) 7 months ago exciting_feistel
我已经尝试删除容器 ID,运行 再次删除容器,但它不起作用。有什么建议吗?
编辑:这里是日志:
sudo docker container logs 0ac7d24c92270bf5434eb7c05f4adf0e7c977cb0108a248e061adfc6acd65a4c
Testing redis status...
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Redis not yet ready...
Redis ready.
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
Restarting services
Checking for scanners: Done
Reloading NVTs
Rebuilding NVT cache... done.
Setting admin password
Checking setup
openvas-check-setup 2.3.7
Test completeness and readiness of OpenVAS-9
Please report us any non-detected problems and
help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
Send us the log-file (/tmp/openvas-check-setup.log) to help analyze the problem.
Use the parameter --server to skip checks for client tools
like GSD and OpenVAS-CLI.
Step 1: Checking OpenVAS Scanner ...
OK: OpenVAS Scanner is present in version 5.1.1.
OK: redis-server is present in version v=3.0.7.
OK: scanner (kb_location setting) is configured properly using the redis-server socket: /tmp/redis.sock
OK: redis-server is running and listening on socket: /tmp/redis.sock.
OK: redis-server configuration is OK and redis-server is running.
OK: NVT collection in /var/lib/openvas/plugins contains 46373 NVTs.
WARNING: Signature checking of NVTs is not enabled in OpenVAS Scanner.
SUGGEST: Enable signature checking (see http://www.openvas.org/trusted-nvts.html).
OK: The NVT cache in /var/cache/openvas contains 46373 files for 46373 NVTs.
Step 2: Checking OpenVAS Manager ...
OK: OpenVAS Manager is present in version 7.0.2.
OK: OpenVAS Manager database found in /var/lib/openvas/mgr/tasks.db.
OK: Access rights for the OpenVAS Manager database are correct.
OK: sqlite3 found, extended checks of the OpenVAS Manager installation enabled.
OK: OpenVAS Manager database is at revision 184.
OK: OpenVAS Manager expects database at revision 184.
OK: Database schema is up to date.
OK: OpenVAS Manager database contains information about 46369 NVTs.
OK: At least one user exists.
OK: OpenVAS SCAP database found in /var/lib/openvas/scap-data/scap.db.
OK: OpenVAS CERT database found in /var/lib/openvas/cert-data/cert.db.
OK: xsltproc found.
Step 3: Checking user configuration ...
WARNING: Your password policy is empty.
SUGGEST: Edit the /etc/openvas/pwpolicy.conf file to set a password policy.
Step 4: Checking Greenbone Security Assistant (GSA) ...
OK: Greenbone Security Assistant is present in version 7.0.2.
ERROR: Your OpenVAS certificate infrastructure did NOT pass validation.
FIX: Run 'openvas-manage-certs -a'.
ERROR: Your OpenVAS-9 installation is not yet complete!
Please follow the instructions marked with FIX above and run this
script again.
If you think this result is wrong, please report your observation
and help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
Please attach the log-file (/tmp/openvas-check-setup.log) to help us analyze the problem.
Tailing logs
==> /var/log/openvas/gsad.log <==
gsad main:WARNING:2021-05-19 01h00.27 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h00.32 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h00.32 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h00.32 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h01.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h01.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h01.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h02.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h02.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h02.02 utc:73: MHD: Error: received handshake message out of context
==> /var/log/openvas/openvasmd.log <==
md main: INFO:2021-05-19 01h00.20 utc:116: update_or_rebuild_nvt_cache: Rebuilding NVT cache
base gpgme:MESSAGE:2021-05-19 01h00.20 utc:116: Setting GnuPG dir to '/var/lib/openvas/openvasmd/gnupg'
base gpgme:MESSAGE:2021-05-19 01h00.21 utc:116: Using OpenPGP engine version '2.0.22'
md main: INFO:2021-05-19 01h00.22 utc:116: Updating NVT cache.
md main:MESSAGE:2021-05-19 01h03.35 utc:150: OpenVAS Manager version 7.0.2 (DB revision 184)
md manage: INFO:2021-05-19 01h03.35 utc:150: Getting users.
md main:MESSAGE:2021-05-19 01h03.35 utc:151: OpenVAS Manager version 7.0.2 (DB revision 184)
md manage: INFO:2021-05-19 01h03.35 utc:151: Modifying user password.
md main:MESSAGE:2021-05-19 01h03.36 utc:222: OpenVAS Manager version 7.0.2 (DB revision 184)
md manage: INFO:2021-05-19 01h03.36 utc:222: Getting users.
==> /var/log/openvas/openvassd.dump <==
==> /var/log/openvas/openvassd.log <==
[Mon Jul 23 23:24:16 2018][8912] openvassd 5.1.1 started
[Mon Jul 23 23:24:35 2018][9114] Client not present
[Wed May 19 01:00:22 2021][68] openvassd 5.1.1 started
[Wed May 19 01:00:58 2021][131] Client closed the communication
我不想猜测,但似乎我无法以某种方式连接到 OpenVAS。
问题是容器无法运行更新并出现以下错误:
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
这个issue comment让我相信镜子可能已经改变了。您可以执行到容器中并 运行 来自评论的命令,或者使用此更改创建一个单独的图像并使用它。
我正在尝试获取要在本地主机 (OpenVAS) 上打开的容器映像。我做了以下事情:
docker pull atomicorp/openvas
返回以下内容:
Using default tag: latest
latest: Pulling from atomicorp/openvas
Digest: sha256:------------------------------------------------(long sha hash)
Status: Image is up to date for atomicorp/openvas:latest
docker.io/atomicorp/openvas:latest
之后,我尝试使用以下命令 运行 图像:
sudo docker run -d -p 443:443 -e OV_UPDATE=yes --name openvas atomicorp/openvas
它 returns 终端的容器 ID(这是预期的,因为这是选项 -d 的作用。之后,我转到浏览器 (Chrome) 并尝试打开本地主机在端口 443 上。localhost 页面上没有任何显示。(我在浏览器中键入 localhost:443)。当我查看 docker 进程时,容器 ID 存在。
sudo docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0ac7d24c9227 atomicorp/openvas "/bin/sh -c /run.sh" 7 minutes ago Up 7 minutes 0.0.0.0:443->443/tcp, :::443->443/tcp openvas
35825b7bfd96 armedu/mbed_sim "docker-entrypoint.s…" 6 months ago Exited (0) 6 months ago cranky_margulis
f1d3dbcf4bbb armedu/mbed_sim "docker-entrypoint.s…" 7 months ago Exited (0) 7 months ago busy_galileo
a513e4e53d75 armedu/mbed_sim "docker-entrypoint.s…" 7 months ago Exited (0) 7 months ago optimistic_carson
2492d538f000 armedu/mbed_sim "docker-entrypoint.s…" 7 months ago Exited (0) 7 months ago cranky_ptolemy
fb770e031181 hello-world "/hello" 7 months ago Exited (0) 7 months ago exciting_feistel
我已经尝试删除容器 ID,运行 再次删除容器,但它不起作用。有什么建议吗?
编辑:这里是日志:
sudo docker container logs 0ac7d24c92270bf5434eb7c05f4adf0e7c977cb0108a248e061adfc6acd65a4c
Testing redis status...
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Redis not yet ready...
Redis ready.
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
Restarting services
Checking for scanners: Done
Reloading NVTs
Rebuilding NVT cache... done.
Setting admin password
Checking setup
openvas-check-setup 2.3.7
Test completeness and readiness of OpenVAS-9
Please report us any non-detected problems and
help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
Send us the log-file (/tmp/openvas-check-setup.log) to help analyze the problem.
Use the parameter --server to skip checks for client tools
like GSD and OpenVAS-CLI.
Step 1: Checking OpenVAS Scanner ...
OK: OpenVAS Scanner is present in version 5.1.1.
OK: redis-server is present in version v=3.0.7.
OK: scanner (kb_location setting) is configured properly using the redis-server socket: /tmp/redis.sock
OK: redis-server is running and listening on socket: /tmp/redis.sock.
OK: redis-server configuration is OK and redis-server is running.
OK: NVT collection in /var/lib/openvas/plugins contains 46373 NVTs.
WARNING: Signature checking of NVTs is not enabled in OpenVAS Scanner.
SUGGEST: Enable signature checking (see http://www.openvas.org/trusted-nvts.html).
OK: The NVT cache in /var/cache/openvas contains 46373 files for 46373 NVTs.
Step 2: Checking OpenVAS Manager ...
OK: OpenVAS Manager is present in version 7.0.2.
OK: OpenVAS Manager database found in /var/lib/openvas/mgr/tasks.db.
OK: Access rights for the OpenVAS Manager database are correct.
OK: sqlite3 found, extended checks of the OpenVAS Manager installation enabled.
OK: OpenVAS Manager database is at revision 184.
OK: OpenVAS Manager expects database at revision 184.
OK: Database schema is up to date.
OK: OpenVAS Manager database contains information about 46369 NVTs.
OK: At least one user exists.
OK: OpenVAS SCAP database found in /var/lib/openvas/scap-data/scap.db.
OK: OpenVAS CERT database found in /var/lib/openvas/cert-data/cert.db.
OK: xsltproc found.
Step 3: Checking user configuration ...
WARNING: Your password policy is empty.
SUGGEST: Edit the /etc/openvas/pwpolicy.conf file to set a password policy.
Step 4: Checking Greenbone Security Assistant (GSA) ...
OK: Greenbone Security Assistant is present in version 7.0.2.
ERROR: Your OpenVAS certificate infrastructure did NOT pass validation.
FIX: Run 'openvas-manage-certs -a'.
ERROR: Your OpenVAS-9 installation is not yet complete!
Please follow the instructions marked with FIX above and run this
script again.
If you think this result is wrong, please report your observation
and help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
Please attach the log-file (/tmp/openvas-check-setup.log) to help us analyze the problem.
Tailing logs
==> /var/log/openvas/gsad.log <==
gsad main:WARNING:2021-05-19 01h00.27 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h00.32 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h00.32 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h00.32 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h01.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h01.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h01.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h02.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h02.02 utc:73: MHD: Error: received handshake message out of context
gsad main:WARNING:2021-05-19 01h02.02 utc:73: MHD: Error: received handshake message out of context
==> /var/log/openvas/openvasmd.log <==
md main: INFO:2021-05-19 01h00.20 utc:116: update_or_rebuild_nvt_cache: Rebuilding NVT cache
base gpgme:MESSAGE:2021-05-19 01h00.20 utc:116: Setting GnuPG dir to '/var/lib/openvas/openvasmd/gnupg'
base gpgme:MESSAGE:2021-05-19 01h00.21 utc:116: Using OpenPGP engine version '2.0.22'
md main: INFO:2021-05-19 01h00.22 utc:116: Updating NVT cache.
md main:MESSAGE:2021-05-19 01h03.35 utc:150: OpenVAS Manager version 7.0.2 (DB revision 184)
md manage: INFO:2021-05-19 01h03.35 utc:150: Getting users.
md main:MESSAGE:2021-05-19 01h03.35 utc:151: OpenVAS Manager version 7.0.2 (DB revision 184)
md manage: INFO:2021-05-19 01h03.35 utc:151: Modifying user password.
md main:MESSAGE:2021-05-19 01h03.36 utc:222: OpenVAS Manager version 7.0.2 (DB revision 184)
md manage: INFO:2021-05-19 01h03.36 utc:222: Getting users.
==> /var/log/openvas/openvassd.dump <==
==> /var/log/openvas/openvassd.log <==
[Mon Jul 23 23:24:16 2018][8912] openvassd 5.1.1 started
[Mon Jul 23 23:24:35 2018][9114] Client not present
[Wed May 19 01:00:22 2021][68] openvassd 5.1.1 started
[Wed May 19 01:00:58 2021][131] Client closed the communication
我不想猜测,但似乎我无法以某种方式连接到 OpenVAS。
问题是容器无法运行更新并出现以下错误:
rsync: failed to connect to feed.openvas.org (89.146.224.58): Connection timed out (110)
rsync: failed to connect to feed.openvas.org (2a01:130:2000:127::d1): Cannot assign requested address (99)
这个issue comment让我相信镜子可能已经改变了。您可以执行到容器中并 运行 来自评论的命令,或者使用此更改创建一个单独的图像并使用它。