Coder Social home page Coder Social logo

centos7下docker安装问题 about actionview HOT 14 CLOSED

lxerxa avatar lxerxa commented on July 20, 2024
centos7下docker安装问题

from actionview.

Comments (14)

lxerxa avatar lxerxa commented on July 20, 2024

应该是重新构建了db container的原故,可以将db文件夹下的文件和目录都删除了再启动,这样原来的数据可能会丢失。

from actionview.

skyshen32 avatar skyshen32 commented on July 20, 2024

恩,测试了一下,删除后确实可以启动了,不过就是数据都丢失了

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

这个地方可以再优化下。
另外,docker主要是用户试用用的,生产用最好还是部署一套。

from actionview.

skyshen32 avatar skyshen32 commented on July 20, 2024

这种情况下不知是否还有可能把数据导出来

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

我来优化下db docker镜像吧

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

已重新build了db镜像,只要pull下最新的db镜像,然后启动,原有db数据不会丢失。

from actionview.

skyshen32 avatar skyshen32 commented on July 20, 2024

启动成功,并且无报错,故意用错误的用户名密码会提示用户名密码错误,但用正常的点了登录后无反应。

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

能否详细描述下你的验证过程?我又验证了一遍是没问题的。

from actionview.

skyshen32 avatar skyshen32 commented on July 20, 2024

我把原来的DOCKER容器都清空了,然后重新运行DOCKER-COMPOSE UP,之前是启动的时候会报数据库连接错误,今天没有报错了,能进登录界面了,但输入完用户名密码后点登录无反应,地址栏后面加上了/admin/scheme/type

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

我的实验步骤:

  1. 所有的container和镜像全部删除, db下的文件和文件夹都删除;
  2. docker-composer up
  3. 进入系统任意创建用户
  4. docker-composer stop
  5. 删除db container
  6. docker-compser up
    查看 3步骤创建的用户还是存在的。

from actionview.

skyshen32 avatar skyshen32 commented on July 20, 2024

好的,我再测试一下,感谢回复

from actionview.

skyshen32 avatar skyshen32 commented on July 20, 2024

DOCKER-COMPOSE UP的过程特别慢,是否有办法可以加快下载过程

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

第一次下载镜像时慢,以后就不慢了。

from actionview.

ainxHub avatar ainxHub commented on July 20, 2024

删了db文件夹也不行
db_1 | nc: connect to localhost port 27017 (tcp) failed: Connection refused db_1 | nc: connect to localhost port 27017 (tcp) failed: Connection refused db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] MongoDB starting : pid=9 port=27017 dbpath=/data 64-bit host=9f4e71c70aca web_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] db version v2.6.10 db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] git version: nogitversion db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016 db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58 db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] allocator: tcmalloc db_1 | 2019-04-12T02:31:12.323+0000 [initandlisten] options: { storage: { dbPath: "/data", journal: { enabled: false } } } db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] dbexit: db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] shutdown: going to close listening sockets... db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] shutdown: going to flush diaglog... db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] shutdown: going to close sockets... cron_1 | * Starting periodic command scheduler cron db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] shutdown: waiting for fs preallocator... db_1 | 2019-04-12T02:31:12.324+0000 [initandlisten] shutdown: closing all files... db_1 | 2019-04-12T02:31:12.325+0000 [initandlisten] closeAllFiles() finished db_1 | 2019-04-12T02:31:12.325+0000 [initandlisten] shutdown: removing fs lock... db_1 | 2019-04-12T02:31:12.325+0000 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor db_1 | 2019-04-12T02:31:12.325+0000 [initandlisten] dbexit: really exiting now db_1 | nc: connect to localhost port 27017 (tcp) failed: Connection refused
提示/data/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
还需要在其它地方设置权限吗?

from actionview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.