简体   繁体   English

Arangodb Docker 容器:无法连接到端点 'tcp://127.0.0.1:8529',数据库:'_system',用户名:'root' docker

[英]Arangodb Docker Container: Could not connect to endpoint 'tcp://127.0.0.1:8529', database: '_system', username: 'root' docker

I've installed ArangoDb in Ubuntu 20.04 through docker , and started an instance:我已经通过ArangoDb在 Ubuntu 20.04 中安装了docker ,并启动了一个实例:

raphy@pc:~$ sudo docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -d --name arangodb-instance arangodb/arangodb
ca6c80f7895c1e6b379937c8b2e71a3d0134ab0d39b09b87ecd2a0feb55b53e4
raphy@pc:~$ sudo docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --name playground --link arangodb-instance:db-link arangodb/arangodb
===========================================
GENERATED ROOT PASSWORD: Uyi2Su3XNQggybWR
===========================================
Initializing root user...Hang on...
2022-07-04T16:34:01Z [9] INFO [f6e0e] {aql} memory limit per AQL query automatically set to 20163799449 bytes. to modify this value, please adjust the startup option `--query.memory-limit`
2022-07-04T16:34:01Z [9] INFO [a1c60] {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2022-07-04T16:34:02Z [9] INFO [c1b63] {arangosearch} ArangoSearch maintenance: [1..1] commit thread(s), [1..1] consolidation thread(s)
2022-07-04T16:34:02Z [9] INFO [7da27] {startup} server will now shut down due to upgrade, database initialization or admin restoration.
Initializing database...Hang on...
Database initialized...Starting System...
2022-07-04T16:34:06Z [1] INFO [e52b0] {general} ArangoDB 3.9.2 [linux] 64bit, using jemalloc, build tags/v3.9.2-0-g8bf70c5f5b6, VPack 0.1.35, RocksDB 6.27.0, ICU 64.2, V8 7.9.317, OpenSSL 1.1.1o  3 May 2022
2022-07-04T16:34:06Z [1] INFO [75ddc] {general} detected operating system: Linux version 5.13.0-52-generic (buildd@lcy02-amd64-067) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #59~20.04.1-Ubuntu SMP Thu Jun 16 21:21:28 UTC 2022
2022-07-04T16:34:06Z [1] INFO [25362] {memory} Available physical memory: 33606332416 bytes, available cores: 8
2022-07-04T16:34:06Z [1] INFO [3bb7d] {cluster} Starting up with role SINGLE
2022-07-04T16:34:06Z [1] INFO [f6e0e] {aql} memory limit per AQL query automatically set to 20163799449 bytes. to modify this value, please adjust the startup option `--query.memory-limit`
2022-07-04T16:34:06Z [1] INFO [a1c60] {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2022-07-04T16:34:06Z [1] INFO [fe333] {engines} RocksDB recovery starting, scanning WAL starting from sequence number 94, latest sequence number: 205
2022-07-04T16:34:06Z [1] INFO [a4ec8] {engines} RocksDB recovery finished, WAL entries scanned: 115, recovery start sequence number: 94, latest WAL sequence number: 205, max tick value found in WAL: 116, last HLC value found in WAL: 1737440567212638208
2022-07-04T16:34:06Z [1] INFO [c1b63] {arangosearch} ArangoSearch maintenance: [1..1] commit thread(s), [1..1] consolidation thread(s)
2022-07-04T16:34:06Z [1] INFO [6ea38] {general} using endpoint 'http+tcp://0.0.0.0:8529' for non-encrypted requests
2022-07-04T16:34:07Z [1] INFO [cf3f4] {general} ArangoDB (version 3.9.2 [linux]) is ready for business. Have fun!

Now, I want to use ArangoShell :现在,我想使用ArangoShell

I opened another console我打开了另一个控制台

raphy@pc:~$ sudo docker ps

CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS          PORTS      NAMES
608013c29220   arangodb/arangodb   "/entrypoint.sh aran…"   33 minutes ago   Up 33 minutes   8529/tcp   playground
ca6c80f7895c   arangodb/arangodb   "/entrypoint.sh aran…"   34 minutes ago   Up 34 minutes   8529/tcp   arangodb-instance

But , trying to follow these indications: https://hub.docker.com/r/arangodb/arangodb/但是,尝试遵循这些指示: https ://hub.docker.com/r/arangodb/arangodb/

I get this error:我收到此错误:

Could not connect to endpoint 'tcp://127.0.0.1:8529', database: '_system', username: 'root'

raphy@pc:~$ sudo docker exec playground arangosh

                                       _     
  __ _ _ __ __ _ _ __   __ _  ___  ___| |__  
 / _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \ 
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
 \__,_|_|  \__,_|_| |_|\__, |\___/|___/_| |_|
                       |___/                 

arangosh (ArangoDB 3.9.2 [linux] 64bit, using jemalloc, build tags/v3.9.2-0-g8bf70c5f5b6, VPack 0.1.35, RocksDB 6.27.0, ICU 64.2, V8 7.9.317, OpenSSL 1.1.1o  3 May 2022)
Copyright (c) ArangoDB GmbH

Command-line history will be persisted when the shell is exited. You can use `--console.history false` to turn this off
Could not connect to endpoint 'tcp://127.0.0.1:8529', database: '_system', username: 'root'
Error message: 'not authorized to execute this request'


Uf wiederluege! 再见! Na shledanou! Auf Wiedersehen! Bye Bye! Adiau! ¡Hasta luego! Εις το επανιδείν! ءاقللا ىلإ
להתראות! Arrivederci! Tot ziens! Adjö! Au revoir! さようなら До свидания! Até Breve! خداحافظ! Uz redzēšanos! შეხვედრამდე 안녕히 가세요! Sampai jumpa!
raphy@pc:~$ 

How to connect to arangosh to an instance of an arangodb container ?如何将 arangosh 连接到arangosh arangodb container的实例?

In this way it seems working fine:通过这种方式,它似乎工作正常:

raphy@pc:~$ sudo docker run -e ARANGO_ROOT_PASSWORD=mypwd -p 8529:8529 -d --name arangodb-instance arangodb/arangodb
10fea7fd22ff14e6e2c773adaedb79df4698d25e2b57fb35ae896988d495f298
raphy@pc:~$ sudo docker ps
CONTAINER ID   IMAGE               COMMAND                  CREATED         STATUS         PORTS                                       NAMES
10fea7fd22ff   arangodb/arangodb   "/entrypoint.sh aran…"   2 minutes ago   Up 2 minutes   0.0.0.0:8529->8529/tcp, :::8529->8529/tcp   arangodb-instance
raphy@pc:~$ sudo docker exec -it arangodb-instance arangosh
Please specify a password: 

                                       _     
  __ _ _ __ __ _ _ __   __ _  ___  ___| |__  
 / _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \ 
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
 \__,_|_|  \__,_|_| |_|\__, |\___/|___/_| |_|
                       |___/                 

arangosh (ArangoDB 3.9.2 [linux] 64bit, using jemalloc, build tags/v3.9.2-0-g8bf70c5f5b6, VPack 0.1.35, RocksDB 6.27.0, ICU 64.2, V8 7.9.317, OpenSSL 1.1.1o  3 May 2022)
Copyright (c) ArangoDB GmbH

Command-line history will be persisted when the shell is exited. You can use `--console.history false` to turn this off
Connected to ArangoDB 'http+tcp://127.0.0.1:8529, version: 3.9.2 [SINGLE, server], database: '_system', username: 'root'

Type 'tutorial' for a tutorial or 'help' to see common examples
127.0.0.1:8529@_system> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Docker tcp 只能使用“localhost”而不能使用“127.0.0.1”或ip来连接 - Docker tcp can only use "localhost" but not "127.0.0.1" or ip to connect 拨号 tcp 127.0.0.1:8000: 连接:连接被拒绝 golang docker 容器 - dial tcp 127.0.0.1:8000: connect: connection refused golang docker containers 使用其他Docker容器连接本地系统mongodb数据库 - connect with local system mongodb database with other docker container 无法将zipkin docker容器连接到mysql容器 - Could not connect zipkin docker container to mysql container PHP 应用程序无法连接到 127.0.0.1 处的 docker mysql 容器 - PHP app cannot connect to docker mysql container at 127.0.0.1 以 root 以外的用户身份连接到 docker 容器 - Connect to docker container as user other than root Docker - PostgreSQL 无法连接到服务器:连接被拒绝 127.0.0.1:5432 - Docker - PostgreSQL could not connect to server: Connection refused 127.0.0.1:5432 连接到Docker容器上的PostgreSQL数据库 - Connect to a PostgreSQL database on a Docker container 无法在 127.0.0.1:6379 连接到 Redis:docker 中的连接被拒绝 - Could not connect to Redis at 127.0.0.1:6379: Connection refused in docker 成为官方 Oracle 数据库 docker 容器的 root - Become root in the official Oracle Database docker container
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM