首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在本地主机上装载Docker容器

无法在本地主机上装载Docker容器
EN

Stack Overflow用户
提问于 2021-05-19 01:04:24
回答 1查看 383关注 0票数 1

我试图在localhost (OpenVAS)上打开一个容器映像。我做了以下工作:

代码语言:javascript
复制
docker pull atomicorp/openvas

并返回以下内容:

代码语言:javascript
复制
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

之后,我尝试使用以下命令运行该映像:

代码语言:javascript
复制
sudo docker run -d -p 443:443 -e OV_UPDATE=yes --name openvas atomicorp/openvas

它将容器id返回到终端(这是预期的,因为选项-d是这样做的。之后,我进入浏览器(Chrome),尝试在端口443上打开本地主机。本地主页上没有显示任何内容。(我在浏览器中键入localhost:443 )。当我查看码头进程时,容器ID就出现了。

代码语言:javascript
复制
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,再次运行容器,但它不工作。有什么建议吗?

编辑:根据请求,这里是日志:

代码语言:javascript
复制
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。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-19 01:52:20

问题是容器无法运行以下错误的更新:

代码语言:javascript
复制
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)

这个发行评论让我相信镜子可能已经变了。您可以将exec放入容器并从注释中运行该命令,也可以使用此更改创建一个单独的映像。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67595681

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档