Hi all. I created a 'test.py' file to request a gr...
# troubleshoot
p
Hi all. I created a 'test.py' file to request a graphql query. Running this file sometimes results in errors and sometimes returns results normally. print error result
Copy code
{'errors': [{'message': 'An unknown error occurred.', 'locations': [{'line': 2, 'column': 3}], 'path': ['search'], 'extensions': {'code': 500, 'type': 'SERVER_ERROR', 'classification': 'DataFetchingException'}}], 'data': {'search': None}}
print correct result
Copy code
{'data': {'search': {'searchResults': [{'entity': {'urn': 'urn:li:tag:AUM추출', 'properties': {'name': 'AUM추출'}}}]}}}
Could you please advise which part I should correct to prevent this error? I attached the 'test.py' file and the 'datahub-gms-log.txt' file when there was an error.
👀 1
g
You have one ‘{’ missing and extra closing ‘}’ brace in the end in search query query should be something like this
Copy code
{
  search(input: {
      type: TAG, query: "'AUM추출'", start: 0, count: 10
      }) {

    searchResults {
      entity {
        ... on Tag { urn properties { name } }
    
      }
    }
  }
}
p
additional info => ES_JAVA_OPTS: 7GB
b
hmm it looks like search queries are simply failing in your gms logs. is your elasticsearch pod up and healthy?
g
Is the problem is only with this particular Query? or it repeat with other GQL query as well Could you please try out different GQL search queries
it looks like your facing this issue, REST clients keep closing HTTP connections before reading response from ES https://github.com/elastic/elasticsearch/issues/60450 not sure about the exact fix, in this below link some work around suggested you can try out https://github.com/elastic/elasticsearch/issues/65213 I suggest use latest elastic-search client, you may try upgrade your datahub to latest
p
OK, I'll check that links. Thanks :)