Closed iwannabewater closed 5 months ago
the complete process:
docker compose down
Output:
[+] Running 5/5
✔ Container release-openspg-server Removed 1.6s
✔ Container release-openspg-tugraph Removed 10.5s
✔ Container release-openspg-mysql Removed 1.0s
✔ Container release-openspg-elasticsearch Removed 5.2s
✔ Network openspg_default Removed 0.4s
docker compose up -d
Output:
[+] Running 4/5
⠋ Network openspg_default Created 1.1s
✔ Container release-openspg-elasticsearch Started 0.6s
✔ Container release-openspg-mysql Started 0.6s
✔ Container release-openspg-tugraph Started 0.4s
✔ Container release-openspg-server Started 0.8s
docker run --rm --net=host -v /data/xxx/openspg/openspg/:/code -it openspg/openspg-python:latest "/bin/bash"
Output:
(venv) root@host:/# cd code/python/knext/knext/examples/riskmining/
(venv) root@host:/code/python/knext/knext/examples/riskmining# ls
README.md builder reasoner schema
knext project create --prj_path .
Output:
Project [RiskMining] with namespace [RiskMining] was successfully created from [.].
knext schema commit
Output:
Create type: RiskMining.TaxOfRiskUser
Create type: RiskMining.TaxOfRiskApp
Create type: RiskMining.Cert
Create type: RiskMining.App
Create type: RiskMining.Company
Create relation: [RiskMining.Company] hasCert
Create relation: [RiskMining.Company] holdShare
Create type: RiskMining.Device
Create type: RiskMining.Person
Create relation: [RiskMining.Person] hasDevice
Create relation: [RiskMining.Person] hasCert
Create relation: [RiskMining.Person] holdShare
Create relation: [RiskMining.Person] fundTrans
Create relation: [RiskMining.Person] developed
Create relation: [RiskMining.Person] release
ERROR: queryIdx error, and errorMsg=
It seems that access to ElasticSearch failed. Please check the local ElasticSearch environment.
Yes, I changed the elastic search port from 9200 to 9201, and the corresponding location was also changed, like this:
version: "3.7" services: server: restart: always image: openspg/openspg-server:latest container_name: release-openspg-server ports:
mysql -tugraph -elasticsearch command: [ '--server.repository.impl.jdbc.host=mysql', '--server.repository.impl.jdbc.password=openspg', '--cloudext.graphstore.url=tugraph://tugraph:9090?graphName=default&timeout=50000&accessId=admin&accessKey=73@TuGraph', '--cloudext.searchengine.url=elasticsearch://elasticsearch:9201?scheme=http' ]
mysql: restart: always image: openspg/openspg-mysql:latest container_name: release-openspg-mysql environment: TZ: Asia/Shanghai LANG: C.UTF-8 MYSQL_ROOT_PASSWORD: openspg MYSQL_DATABASE: openspg ports:
"3307:3306" command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_general_ci' ]
tugraph: image: tugraph/tugraph-runtime-centos7:4.0.1 container_name: release-openspg-tugraph
ports:
"9090:9090" command: lgraph_server
elasticsearch: image: elasticsearch:8.5.3 container_name: release-openspg-elasticsearch ports:
Is this yml modified incorrectly? It is normal for me to use the default port 9200, but changing it to 9201 does not work (but the elastic search container is started normally and can be accessed through curl or browser 9201). I want to know how to modify the correct yml. Thank you.
It is not recommended to make any modifications to the contents of the yml file. If you must modify it, you can try changing ports: - "9200:9200" to ports: - "9201:9200"
My 9200 port was occupied by other services, so I changed the port. Moreover, I changed "9200:9200" to "9201:9200", and the server dependencies were also modified accordingly, but there is still elastic search's question, the detailed yml is what I showed in my previous reply.
You need to restart your Elasticsearch container. Elasticsearch should be accessible via http://localhost:9201
Yes, I do have access to http://localhost:9201/, but it still gives me the error "ERROR: queryIdx error, and errorMsg=", which is very strange and only works if I don't change the default port (9200) for elasticsearch. Anyway, thanks for your patience in replying
Follow the installation steps step by step, and there are no errors until this step:
This error message looks very simple. I don’t know how to debug it. I sincerely ask you for advice❤ I can provide more information if needed.