如何解决无法检查Docker以在同一主机中发布流量
在Linux主机中安装了一个docker Web应用程序,并且运行良好。我知道这个docker实例正在通过端口5432连接到postgres数据库,并且我正在尝试通过登录linux主机来了解docker和postgres数据库之间的流量。
我运行docker ps
时只看到了Web应用程序,但没有看到Postgres的任何Docker实例。
我看到有ps -ef | grep postgres
运行的postgres进程,但是我看不到端口5432正在使用netstat -an | grep 5432
监听
有趣的部分是/usr/lib/postgresql
文件夹在以下输出中甚至都不存在。
$ ps -ef | grep postgres ubuntu 2622 2555 0 16:09 pts/0 00:00:00 /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c config_file=/etc/postgresql/10/main/postgresql.conf ubuntu 3249 2622 0 16:09 ? 00:00:00 postgres: 10/main: checkpointer process ubuntu 3250 2622 0 16:09 ? 00:00:00 postgres: 10/main: writer process ubuntu 3251 2622 0 16:09 ? 00:00:00 postgres: 10/main: wal writer process ubuntu 3252 2622 0 16:09 ? 00:00:00 postgres: 10/main: autovacuum launcher process ubuntu 3253 2622 0 16:09 ? 00:00:00 postgres: 10/main: stats collector process ubuntu 3254 2622 0 16:09 ? 00:00:00 postgres: 10/main: bgworker: logical replication launcher ubuntu 3821 2622 0 16:10 ? 00:00:00 postgres: 10/main: openvino workbench 127.0.0.1(35548) idle
我跑了sudo tcpdump -i docker0 'port 5432'
,但看不到任何流量。
跟踪postgres PID的PPID:
PID CMD
28691 /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c config_file=/etc/postgresql/10/main/postgresql.conf
PID CMD
28639 bash /opt/intel/openvino/deployment_tools/tools/workbench/docker-entrypoint.sh
PID CMD
28619 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/a129c1514c181b85e9d75d8b20d909b1540f94c39792e370ab82918a681cbcb7 -address /run/contain
PID CMD
5198 /usr/bin/containerd
PID CMD
1 /lib/systemd/systemd --system --deserialize 38
有什么想法吗?请指教。 谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。