bk-cmdb icon indicating copy to clipboard operation
bk-cmdb copied to clipboard

docker快速部署cmdb,8090端口未监听

Open openstack-test opened this issue 1 year ago • 3 comments

1.根据文档步骤,docker快速部署cmdb https://github.com/Tencent/bk-cmdb/blob/master/docs/wiki/container-support.md 启动命令 docker run -d -p 8081:8090 ccr.ccs.tencentyun.com/bk.io/cmdb-standalone:latest

2.容器正常启动

# docker ps -a
CONTAINER ID   IMAGE                                                 COMMAND                 CREATED              STATUS              PORTS     NAMES
2c49b91db389   ccr.ccs.tencentyun.com/bk.io/cmdb-standalone:latest   "/bin/sh -c ./run.sh"   About a minute ago   Up About a minute             elated_wright

3.问题

# docker exec -it 2c49b91db389 bash
# netstat -anpl
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN      48/mongod           
tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      42/redis-server 0.0 
tcp        0      0 127.0.0.1:57620         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57626         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57624         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57632         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57622         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57630         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57636         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57628         127.0.0.1:6379          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:57608         127.0.0.1:6379          TIME_WAIT   -                   
tcp6       0      0 :::38964                :::*                    LISTEN      18/java             
tcp6       0      0 :::2181                 :::*                    LISTEN      18/java             
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     4533475  48/mongod            /tmp/mongodb-27017.sock
unix  2      [ ]         STREAM     CONNECTED     4527943  18/java              
unix  2      [ ]         STREAM     CONNECTED     4527079  18/java       

容器内部未监听8090 端口,导致主机端口8081未正常监听,服务无法访问。请问怎么处理呢?感谢。

openstack-test avatar Aug 11 '22 08:08 openstack-test

社区没人看这个问题吗 ?

openstack-test avatar Aug 12 '22 09:08 openstack-test

这个已经没有在维护了哈,关于容器化部署cmdb或者整套蓝鲸,可以看下这个链接地址的内容 https://bk.tencent.com/s-mart/community/question/6449?type=answer 查看里面的《部署指引》进行部署

ZQHcode avatar Aug 12 '22 09:08 ZQHcode

@ZQHcode 目前提供的k8s部署方式太繁琐复杂了暂不考虑。我们主要是demo环境体验cmdb。使用make 命令编译前后端,报如下错误 ,请问怎么处理呢?

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none was installed.
npm WARN [email protected] requires a peer of eslint-plugin-prettier@^3.4.0 || ^4.0.0 but none was installed.
npm WARN [email protected] requires a peer of node-sass@^4.0.0 || ^5.0.0 || ^6.0.0 but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of acorn@^8 but none was installed.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm ERR! Linux 3.10.0-1160.59.1.el7.x86_64
npm ERR! argv "/root/node-v6.9.5-linux-x64/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! path /data/gopath/src/configcenter/src/ui/node_modules/.staging/@types/eslint-scope-8ceca106/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open

npm ERR! ENOTDIR: not a directory, open '/data/gopath/src/configcenter/src/ui/node_modules/.staging/@types/eslint-scope-8ceca106/package.json'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /data/gopath/src/configcenter/src/ui/npm-debug.log
make: *** [ui] Error 236

openstack-test avatar Aug 12 '22 10:08 openstack-test