question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failure to update from 3.0.3 to 3.1.0 - GraphQL initialization fail

See original GitHub issue

Hello,

Description

Upgrading from 3.0.3 to 3.1.0 fails at [OPENCTI] GraphQL initialization fail.

Environment

  1. OS: Ubuntu 18.04
  2. OpenCTI version: 3.1.0
  3. OpenCTI client: frontend
  4. Other environment details:

OpenCTI is installed following the manual installation steps described in the documentation.

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Install OpenCTI 3.0.3
  2. Update to OpenCTI 3.1.0
  3. OpenCTI passes successfully the 4 PRE-CHECK steps but fails at the GRAKN one.

Expected Output

$ yarn serv

info: 🚀 OpenCTI started in production mode with embedded file
info: [PRE-CHECK] > Grakn is alive
info: [PRE-CHECK] > Elasticsearch is alive
info: [PRE-CHECK] > Minio is alive
info: [PRE-CHECK] > Python3 is available
info: [INIT] > Grakn schema loaded
info: [INIT] > Elasticsearch indexes loaded
info: [MIGRATION] > Starting migration process
info: [MIGRATION] > Read 25 migrations from the database
info: [MIGRATION] > Migration process completed, platform is up to date
info: [INIT] > Platform default initialized
info: [ADMIN_SETUP] admin user initialized
info: OPENCTI Ready on port 4000

Actual Output

$ yarn serv

info: 🚀 OpenCTI started in production mode with embedded file
info: [PRE-CHECK] > Grakn is alive
info: [PRE-CHECK] > Elasticsearch is alive
info: [PRE-CHECK] > Minio is alive
info: [PRE-CHECK] > Python3 is available
error: [GRAKN] Write error > 2 UNKNOWN: null. Please check server logs for the stack trace.","stack":"Error: 2 UNKNOWN: null. Please check server logs for the stack trace.\n    at Object.exports.createStatusError (/var/www/opencti/opencti/node_modules/grpc/src/common.js:91:15)\n    at ClientDuplexStream._emitStatusIfDone (/var/www/opencti/opencti/node_modules/grpc/src/client.js:233:26)\n    at ClientDuplexStream._receiveStatus (/var/www/opencti/opencti/node_modules/grpc/src/client.js:211:8)\n    at Object.onReceiveStatus (/var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:1311:15)\n    at InterceptingListener._callNext (/var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:568:42)\n    at InterceptingListener.onReceiveStatus (/var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:618:8)\n    at /var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:1127:18"}
error: [OPENCTI] GraphQL initialization fail > Error: 2 UNKNOWN: null. Please check server logs for the stack trace.\n    at Object.exports.createStatusError (/var/www/opencti/opencti/node_modules/grpc/src/common.js:91:15)\n    at ClientDuplexStream._emitStatusIfDone (/var/www/opencti/opencti/node_modules/grpc/src/client.js:233:26)\n    at ClientDuplexStream._receiveStatus (/var/www/opencti/opencti/node_modules/grpc/src/client.js:211:8)\n    at Object.onReceiveStatus (/var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:1311:15)\n    at InterceptingListener._callNext (/var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:568:42)\n    at InterceptingListener.onReceiveStatus (/var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:618:8)\n    at /var/www/opencti/opencti/node_modules/grpc/src/client_interceptors.js:1127:18","level":"error"}

Additional information

Reverting to 3.0.3 everything works fine, but the update to 3.1.0 always throw out those errors.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
SamuelHassinecommented, Apr 21, 2020

Hello @fr33tux, @powerade661,

We managed to find the problem with Grakn Labs. @fr33tux thanks for the help!

We will implement a migration in the next version but if you have this problem, you can fix it by executing this Python script. Just change YOUR.GRAKN.HOST:PORT by your own Grakn Server hostname and port.

Script is here: https://gist.github.com/SamuelHassine/62e740443d75acc88c993bc9e9b6fba3.

$ pip3 install grakn-client===1.6.1
$ python3 ./clear_unused_roles.py

Errors are gone!

0reactions
fr33tuxcommented, Apr 21, 2020

Thanks for the assistance 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling - Apollo GraphQL Docs
Built-in error codes ; GRAPHQL_VALIDATION_FAILED. The GraphQL operation is not valid against the server's schema. ; BAD_USER_INPUT. The GraphQL operation includes ...
Read more >
Spring for GraphQL Documentation
It provides a builder API to initialize GraphQL Java and build a GraphQlSource . The default GraphQlSource builder, accessible via GraphQlSource ...
Read more >
Building and consuming GraphQL API in ASP.NET Core 3.1
GraphQL is an open source query language, originally developed by FaceBook. In this article, Joydip Kanjilal explains more about GraphQL and ...
Read more >
Unable to Build using MAVEN with ERROR - Failed to execute ...
Your Maven is reading Java version as 1.6.0_65, Where as the pom.xml says the version is 1.7. Try installing the required verison.
Read more >
Migrating from v2.x to v3.x - GraphQL .NET
Name property now is initialized in constructor and is the same as the name of the . ... userContext; // log validation error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found