Giter VIP home page Giter VIP logo

nebula-console's Issues

release console v2.0.0 for docer-hub

Check 2.0.0 for readme.md

$ docker run --rm -ti --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2-nightly

客户端sql截断问题

目前客户端对根据sql整体长度截断(超过4096部分丢失),导致服务端无法正常执行sql,请放开限制。

support oneliner of `:CSV foo.csv` with tailing nGQL.

One of our users was trying to create some script to automate nGQL query to output result in CSV leveraging console :CSV syntax.

The current semantic of :CSV means to save the next line of :CSV result to file, which is clear and making a lot of sense :).

While in this user's need, the shell script is calling console -e, thus the only thing it could done are something like:

console ... -e `use foo; :csv bar.csv; go from ...`

This should not be supported for the initial definition of :CSV as it only means to output query in next line.

The way to support this was to alternatively use -f filename where in the file, multi-line of use foo;\n:csv bar.csv;\n go ... was placed.

But with this, I would like to ask for help on considering changing our semantic of :CSV on allowing its tailing query to output to the file if exists.

 :csv bar.csv; go from ...

Do you think this makes sense?

Thanks

Auto completion problem with SHOW statements

At first I typed SHOW CREATE TAG and pressed Tab, and found a letter I was automatically entered.
image

Then I tried SHOW CREATE EDGE and the same thing happened. I realized this might be a problem related to the auto completion rules. Console may have mistaken the statements I entered as CREATE TAG or CREATE EDGE, so I may need INDEX, IF NOT EXISTS or IF EXISTS. But console ignored SHOW.

FIND SHORTEST PATH crash

This is a weird problem. If I run the following statement with Console installed in docker, every time it gets stuck.
image

But if I run Console outside the docker, everything goes well.
image

FIND SHORTEST PATH FROM "Tim Duncan" TO "Bulls" OVER *

Nebula Graph is deployed with docker compose.

What is the problem with installing console errors?

My version of nebula is:3.0.0
My version of console is:3.0.0 and 2.6.0(Have tested for the same error to occur)
error:
2022/06/03 22:11:29 Fail to initialize the connection pool, host: 127.0.0.1, port: 9669, failed to open connection, error: failed to verify client version: verifyClientVersion failed: wrong method name
panic: Fail to initialize the connection pool, host: 127.0.0.1, port: 9669, failed to open connection, error: failed to verify client version: verifyClientVersion failed: wrong method name

goroutine 1 [running]:
log.Panicf(0xc0003a6000, 0xb6, 0x0, 0x0, 0x0)
/opt/hostedtoolcache/go/1.16.4/x64/src/log/log.go:361 +0xc5
main.main()
/home/runner/work/nebula-console/nebula-console/main.go:535 +0xb10

Console history may leak user info

version:

./bin/nebula-console -v
nebula-console version Git: 3ce5151, Build Time: 2021-08-20T07:22:02+0000

After a user log in as root and create a user called user9 with ******

root@yk-nebula:/usr/local/nebula# ./bin/nebula-console -addr 127.0.0.1 -port 9669 -u root -p ******                                                                            
2021/09/28 09:08:28 [INFO] connection pool is initialized successfully                                                                                                         
                                                                                                                                                                               
Welcome to Nebula Graph!                                                                                                                                                       
                                                                                                                                                                                                                                                                                                
(root@nebula) [(none)]> create user user9 with password "*******"                                                                                                               
Execution succeeded (time spent 6779/7846 us)                                                                                                                                  
                                                                                                                                                                               
Tue, 28 Sep 2021 09:09:24 CST                                                                                                                                                  
                                                                                                                                                                               
(root@nebula) [(none)]> exit 

Another user may login in with same environment as other user and find root's history (even with password).

root@yk-nebula:/usr/local/nebula# ./bin/nebula-console -addr 127.0.0.1 -port 9669 -u us001 -p ******                                                                           
2021/09/28 09:10:38 [INFO] connection pool is initialized successfully                                                                                                         
                                                                                                                                                                               
Welcome to Nebula Graph!                                                                                                                                                       
                                                                                                                                                                               
(us001@nebula) [(none)]> create user user9 with password "*******"                                                                                                              
[ERROR (-1008)]: PermissionError: No permission to write user.                                                                                                                 
                                                                                                                                                                               
Tue, 28 Sep 2021 09:10:57 CST

support help for commands/subcommands

Could we consider adding help on the client/console side?

  1. help to show commands in topics

  2. help zone to show commands in topic zones(with examples)

log into nebula without a password

Please check the FAQ documentation before raising an issue

Describe the bug (required)

How to log into nebula without a password?

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

image

How To Reproduce(required)

Steps to reproduce the behavior:

  1. First I created a user without password.
(root@nebula) [(none)]> create user foesa
Execution succeeded (time spent 4205/8811 us)

Wed, 12 Oct 2022 09:02:01 UTC
  1. I tried to log in with -p and arbitrary password and without the configuration -p. Both ways can't log in to nebula.
[root@foesa foesa.yang]# ./nebula-console -addr 192.168.8.136 -port 9669 -u foesa -p nebula
2022/10/12 09:02:38 Fail to create a new session from connection pool, fail to authenticate, error: Invalid password
panic: Fail to create a new session from connection pool, fail to authenticate, error: Invalid password

goroutine 1 [running]:
log.Panicf(0x76c2b6, 0x35, 0xc00008de38, 0x1, 0x1)
	/opt/hostedtoolcache/go/1.16.4/x64/src/log/log.go:361 +0xc5
main.main()
	/home/runner/work/nebula-console/nebula-console/main.go:541 +0x9b9

[root@foesa foesa.yang]# ./nebula-console -addr 192.168.8.136 -port 9669 -u foesa
2022/10/12 09:02:41 Error: argument password is empty!
panic: Error: argument password is empty!

goroutine 1 [running]:
log.Panicf(0x76530d, 0x22, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.16.4/x64/src/log/log.go:361 +0xc5
main.validateFlags()
	/home/runner/work/nebula-console/nebula-console/main.go:473 +0x14f
main.main()
	/home/runner/work/nebula-console/nebula-console/main.go:503 +0x10b
  1. And actually, I can use show users to see the user foesa.
(root@nebula) [(none)]> show users
+---------+--------------+
| Account | IP Whitelist |
+---------+--------------+
| "foesa" | ""           |
| "root"  | ""           |
+---------+--------------+
Got 2 rows (time spent 1104/2228 us)

Expected behavior

Additional context

docker image for arm64

  • in nightly build, it's not actully pushed as we are missing push: true for build-push-action@v3

- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
tags: vesoft/nebula-console/nightly, vesoft/nebula-console/v3-nightly

  • the docker build and push in release.yaml is still the old one for single arch.

  • nightly image

  • release image

The default port is missing

When I run nebula without any ports I'm getting this error

./bin/nebula 
--port must be specified

It works after I added the port

./bin/nebula --port 3699
Welcome to Nebula Graph (Version d878eb4)

The port should default to 3699.

profile/explain via -e/eval with issues

$ nebula-console-linux-amd64-v3.0.0 -addr 10.1.1.168 -port 9669 -user root -p nebula -e 'USE basketballplayer; explain MATCH (m) RETURN m'
(root@nebula) [(none)]> USE basketballplayer; explain MATCH (m) RETURN m
[ERROR (-1004)]: SyntaxError: syntax error near `explain'

Mon, 24 Oct 2022 10:08:00 UTC


$ nebula-console-linux-amd64-v3.0.0 -addr 10.1.1.168 -port 9669 -user root -p nebula -e 'USE basketballplayer; profile MATCH (m) RETURN m'
(root@nebula) [(none)]> USE basketballplayer; profile MATCH (m) RETURN m
[ERROR (-1004)]: SyntaxError: syntax error near `profile'

Mon, 24 Oct 2022 10:09:41 UTC

I could mitigate with -f though

❯ echo 'USE basketballplayer;\nPROFILE MATCH (m)-[e0:follow]->(n),(m)-[e1:serve]->(n) WHERE id(m)=="player100" RETURN n,e0,e1;' > profile0.ngql

❯ cat profile0.ngql
USE basketballplayer;
PROFILE MATCH (m)-[e0:follow]->(n),(m)-[e1:serve]->(n) WHERE id(m)=="player100" RETURN n,e0,e1;

❯ nebula-console-linux-amd64-v3.0.0 -addr 10.1.1.168 -port 9669 -user root -p nebula -f profile0.ngql > profile0.log


❯ head profile0.log -n 20
(root@nebula) [(none)]> USE basketballplayer;
Execution succeeded (time spent 1207/1677 us)

Mon, 24 Oct 2022 09:56:46 UTC

(root@nebula) [basketballplayer]> PROFILE MATCH (m)-[e0:follow]->(n),(m)-[e1:serve]->(n) WHERE id(m)=="player100" RETURN n,e0,e1;
+----------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| n                                | e0                                               | e1                                                                    |
+----------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| ("team204" :team{name: "Spurs"}) | [:follow "player100"->"team204" @0 {degree: 95}] | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] |
+----------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
Got 1 rows (time spent 8638/9799 us)

Execution Plan (optimize time 294 us)

-----+----------------+--------------+--------------------------------------------------------------------------------------------------------+----------------------------------
| id | name           | dependencies | profiling data                                                                                         | operator info                   |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------+----------------------------------
| 13 | Project        | 12           | ver: 0, rows: 1, execTime: 35us, totalTime: 37us                                                       | outputVar: {                    |
|    |                |              |                                                                                                        |   "colNames": [                 |

keep session alive(not idle) or add session-respawn when expired

option 0: send YIELD "foo" to keep the session alive(i.e. by default every 59 minutes)
option 1: catch Session not existed! and do something.

To mitigate this case:

[ERROR (-1002)]: Get sessionId[1667208687399203] failed: Session `1667208687399203' not found: Session not existed!

clean screen error

If a () is included in a statement, when use ctrl +U to clean the screen, the ) is always there.

image

-v does not return version information

-v does not return version information
log

[nebula@hadoop-node-2 ~]$ ./nebula-console-linux-amd64-v2.0.0-ga -v
nebula-console version Git: , Build Time:
[nebula@hadoop-node-2 ~]$

Thrift rpc call failed: AsyncSocketException: connect failed

connect to nebula error:

docker run --rm -ti --network nebula-docker-compose_nebula-net vesoft/nebula-console:nightly --addr 127.0.0.1 --port 9669
E0407 02:43:50.550912 1 GraphClient.cpp:54] Thrift rpc call failed: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused Connection failed

docker-compose ps
nebula-docker-compose_graphd1_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32818->19669/tcp, 0.0.0.0:32817->19670/tcp, 0.0.0.0:32819->9669/tcp nebula-docker-compose_graphd2_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32812->19669/tcp, 0.0.0.0:32811->19670/tcp, 0.0.0.0:32813->9669/tcp nebula-docker-compose_graphd_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32804->19669/tcp, 0.0.0.0:32803->19670/tcp, 0.0.0.0:9669->9669/tcp nebula-docker-compose_metad0_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32801->19559/tcp, 0.0.0.0:32800->19560/tcp, 0.0.0.0:32802->9559/tcp, 9560/tcp nebula-docker-compose_metad1_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32795->19559/tcp, 0.0.0.0:32794->19560/tcp, 0.0.0.0:32796->9559/tcp, 9560/tcp nebula-docker-compose_metad2_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32798->19559/tcp, 0.0.0.0:32797->19560/tcp, 0.0.0.0:32799->9559/tcp, 9560/tcp nebula-docker-compose_storaged0_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32809->19779/tcp, 0.0.0.0:32808->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:32810->9779/tcp, 9780/tcp nebula-docker-compose_storaged1_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32815->19779/tcp, 0.0.0.0:32814->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:32816->9779/tcp, 9780/tcp nebula-docker-compose_storaged2_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32806->19779/tcp, 0.0.0.0:32805->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:32807->9779/tcp, 9780/tcp

some display problem when connect to a wrong ip

image

I connect to a wrong ip, and the console print

"xxxx successfully"

It's meaningless to show the internal pool is created successfully (unless in a debug mode).

Just tell the user if the connection is OK or Error.

Something wrong with the -file option

As shown in the image, I imported an ngql file, created tags and edge types, but can't insert vertices.
image

The lines at the beginning are as follows.

drop space nba;
create space nba(partition_num=10,replica_factor=1,vid_type=fixed_string(32));
use nba;
create tag player(name string,age int);
create tag team(name string);
create edge serve(start_year int,end_year int);
create edge like(likeness int);
insert vertex player(name,age) values "player100":("Tim Duncan", 42);
insert vertex player(name,age) values "player101":("Tony Parker", 36);
insert vertex player(name,age) values "player102":("LaMarcus Aldridge", 33);
insert vertex player(name,age) values "player103":("Rudy Gay", 32);

Please take a look. Thank you.

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.