简体   繁体   中英

kube-arangodb: Can not connect with `arangosh`

I am using arango-single-server on minikube. Installed using kubectl by following: https://www.arangodb.com/docs/stable/tutorials-kubernetes.html

Following the error message:

➜ kubectl exec -it arango-single-server-sngl-d0leq3in-d9649f -- arangosh --server.endpoint "tcp://localhost:8529" --server.database "_system" 
Defaulted container "server" out of: server, init-lifecycle (init), uuid (init)
Please specify a password: 

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

arangosh (ArangoDB 3.9.3 [linux] 64bit, using jemalloc, build tags/v3.9.3-0-gb9cd8359a1a, VPack 0.1.35, RocksDB 6.27.0, ICU 64.2, V8 7.9.317, OpenSSL 1.1.1q  5 Jul 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://localhost:8529', database: '_system', username: 'root'
Error message: 'Connection closed'

localhost:8529@_system> 

following the result of netstat;

➜  kubectl exec -it arango-single-server-sngl-d0leq3in-d9649f -- netstat -a                                                                    
Defaulted container "server" out of: server, init-lifecycle (init), uuid (init)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 localhost:56568         localhost:8529          ESTABLISHED 
tcp        0      0 :::8529                 :::*                    LISTEN      
tcp        0      0 localhost:8529          localhost:56568         ESTABLISHED 
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  3      [ ]         DGRAM                    3845565 
unix  3      [ ]         DGRAM                    3845564 

Any idea, what is the issue?

I can access the gui interface.

It works by putting --server.endpoint "https://localhost:8529" or --server.endpoint "http+ssl://localhost:8529" instead of --server.endpoint "tcp://localhost:8529"

I got help from https://www.arangodb.com/docs/stable/programs-arangosh-examples.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM