hugegraph / hugegraph-hubble

Please move to Apache Hugegraph-Toolchain, Thanks
https://github.com/apache/hugegraph-toolchain/tree/master/hugegraph-hubble
Apache License 2.0
40 stars 42 forks source link

hugegraph-hubble reports error "no gremlin script supplied" when trying to create graph #293

Closed notsharable closed 3 years ago

notsharable commented 3 years ago

Hi,

when trying to create graph hugegraph-hubble reports error "no gremlin script supplied"

Looking in hugegraph-server.log I see : 2021-03-01 12:40:02 5677614 [gremlin-server-worker-1] [WARN ] org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler [] - Invalid request - responding with 400 Bad Request and no gremlin script supplied

Is anyone else encountering this issue? I'm using hugegraph-hubble version 1.5.0 with hugegraph-server version 0.11.2.

I am totally new to huggegraph and very interested in exploring what hugegraph-hubble has to offer. The concept is so appealing.

Thanks in advance. D.N.D

Linary commented 3 years ago

@notsharable Thanks for your feedback. How do you create a graph in hubble? Please paste the script. In fact, it is not supported to create a graph online at present. You can only configure a new graph statically and restart the hugegraph-server.

notsharable commented 3 years ago

@Linary once hubble is opened on the browser and I want to create a graph, what data should I pass in. Sorry if I am asking stupid questions.

The image shows what I get when I use dummy graph id/name (do not care about the "Figure" I guess its wrong translation) and try to create a graph. Notice the "no gremlin script supplied" error notification?

image

Linary commented 3 years ago

Have you ever modified the code of hubble?

notsharable commented 3 years ago

@Linary never even tried. I discovered Hubble only lately (same goes with Hugegraph as a whole). I am just trying to explore hubble's features. Clearly the vision is really the way to go in my opinion.

notsharable commented 3 years ago

With hubble's logs not being verbose and with no way to configure the log level, I am totally powerless to workaround this issue.

Lowering hugegraph-server log level to debug I get the logs except below which I think is clearly indicating that hubble is not sending what is expected. Un

2021-03-02 16:18:30 211054 [gremlin-server-worker-1] [WARN ] org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler [] - Invalid request - responding with 400 Bad Request and no gremlin script supplied 2021-03-02 16:18:30 211064 [gremlin-server-worker-1] [DEBUG] log-aggregator-encoder [] - [id: 0x26576b81, L:/127.0.0.1:8182 - R:/127.0.0.1:54839] WRITE: 100B +-------------------------------------------------+ | 0 1 2 3 4 5 6 7 8 9 a b c d e f | +--------+-------------------------------------------------+----------------+ |00000000| 48 54 54 50 2f 31 2e 31 20 34 30 30 20 42 61 64 |HTTP/1.1 400 Bad| |00000010| 20 52 65 71 75 65 73 74 0d 0a 63 6f 6e 74 65 6e | Request..conten| |00000020| 74 2d 74 79 70 65 3a 20 61 70 70 6c 69 63 61 74 |t-type: applicat| |00000030| 69 6f 6e 2f 6a 73 6f 6e 0d 0a 0d 0a 7b 22 6d 65 |ion/json....{"me| |00000040| 73 73 61 67 65 22 3a 22 6e 6f 20 67 72 65 6d 6c |ssage":"no greml| |00000050| 69 6e 20 73 63 72 69 70 74 20 73 75 70 70 6c 69 |in script suppli| |00000060| 65 64 22 7d |ed"} | +--------+-------------------------------------------------+----------------+

@Linary am I doing something wrong on the input? What is hubble expected to send to the hugegraph-server as part of create graph use case?

I am completely stuck. Help welcomed.

notsharable commented 3 years ago

Hi @Linary ,

I have assumed that the problem could be environment related and decided to deploy hugegraph server and hubble on pure linux hosted machine in the cloud (on Azure). Unfortunately I am still getting the exact same problem as you can see on the screenshot.

image

Here is a log of what I to setup thing in Azure for Hugegraph

Install required packages

sudo apt-get update
sudo apt-get install openjdk-8-jdk
#GCC +4.3.0 reuired for RockDB
sudo apt install gcc

#Add custom inbound security rule for the followinf potrts
8080
8088
8182

#Config host=VM INTERNAL IP with port=8088 and start/stop hubble
conf/hugegraph-hubble.properties
./bin/start-hubble.sh
./bin/stop-hubble.sh

#Set backend store in 
conf/hugegraph.properties

#Config host=VM INTERNAL IP with ports 8080(for REST) and 8182 (for grenlim )
conf/rest-server.properties
conf/gremlin-server.yaml

#Init store (ONLY ONCE) and start/stop hugegraph
./bin/init-store.sh
.bin/start-hugegrap.sh
.bin/stop-hugegrap.sh

Some feedback would be appreciated. Regards.

dwave commented 3 years ago

Hello, I also encountered the same problem. When I created the graph, it prompted no gremlin script supplied, where do I need to configure it? image

dwave commented 3 years ago

Hello, I have solved the question. First, the graph id needs to be consistent with the configuration file name of the server startup, and then the port number needs to be the restserver.url=http://127.0.0.1:8080 configuration in rest-server.properties , The external port number image

notsharable commented 3 years ago

Hi Dwave,

Indeed it works when setting restserver.url=http://127.0.0.1:8080

This also means that currently, hubble MUST be installed on the the same machine as the hugegraph rest server.

I think this is counterintuitive. I would strongly to make it possible to also configure restserver.url in hugegraph-hubble.properties file.

Thank you for the support.