New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch Indexing Fails with error "converting NULL to string is unsupported" #15357
Comments
|
And our configuration: "ElasticsearchSettings": {
"ConnectionUrl": "REMOVED",
"Username": "",
"Password": "",
"EnableIndexing": true,
"EnableSearching": false,
"EnableAutocomplete": false,
"Sniff": true,
"PostIndexReplicas": 1,
"PostIndexShards": 1,
"ChannelIndexReplicas": 1,
"ChannelIndexShards": 1,
"UserIndexReplicas": 1,
"UserIndexShards": 1,
"AggregatePostsAfterDays": 365,
"PostsAggregatorJobStartTime": "03:00",
"IndexPrefix": "",
"LiveIndexingBatchSize": 1,
"BulkIndexingTimeWindowSeconds": 3600,
"RequestTimeoutSeconds": 30,
"SkipTLSVerification": false,
"Trace": ""
}, This morning, I checked again and this time it appears to have succeeded.... although if you look at the screenshot... the results seem odd that after 862 minutes, it fails, but then succeeds on the next run of only 26 seconds. I enabled search and theres a period of messages that are not returning in the search results... so although it says it completed, I don't think it really did. Appreciate your help, @amyblais! |
Hey @shieldsjared! :) Covering for Amy while she's away. @ethervoid or @svelle would you be open to help review the above and help with troubleshooting? |
The error comes from here and looks like there are posts that have Can you verify that doing a query like this: SELECT count(*) FROM Posts p LEFT JOIN Channels c ON p.ChannelId = c.Id WHERE p.ChannelId IS NULL OR c.Id is NULL OR p.ChannelId = '' ; This way we can verify those cases and check if it's something that shouldn't have happened or a bug in our code |
Hey @jasonblais! @ethervoid - You're quick! Indeed, I got back 1071. Appear to be pointing to a non-existent channel. I'm actually OK with just purging these posts... safe to just delete these posts from the Posts table, or are there any other places that will also require cleanup? I think I know how this happened, and assuming my hunch is correct - it's not as a result of a bug in MM. |
@shieldsjared :) probably the best way to deal with it is calling this endpoint so you get rid of all the intermediate data. Try that and if you get an error we can think about another solution |
@ethervoid - Getting 403 (I'm a sysadmin... tested on other known posts to confirm my call to the API is correct). :/ |
@shieldsjared can you share with me the error message you're seeing in the logs for that 403 so we can see if that is something we can solve? |
Just getting this...
Perhaps because this posts are referencing a channel id of a channel that does not exist? Greatly appreciate your help @ethervoid! I checked and I see no other references to the channel id anywhere else throughout. All I could find were some lingering reactions entries (presumably related to these posts)... I know its not recommended, but i'm not opposed to just wiping these... |
Yes, sadly that is because is trying to check for permissions on that channel. The only way I can think of is to delete them by hand. First of all, I encourage you to make a backup of the database or even better duplicate your installation and test this in a controlled environment to see if this is the cause of your problems and don't have side-effects. The tables with posts relationships are Posts, Reactions, and Fileinfo. So you should make a query that deletes the posts and their relationships. |
Definitely agree on backup and testing! Thanks for confirming the relationships. Appreciate you @ethervoid! |
@ethervoid - Thanks for the help! That solved our issue :) Closing this out. I'm guessing that the folks on #14929 are likely having the same issue w/ Bleve... Thanks again! |
Really glad to know that this fixed the issue :) |
Summary
Unable to create elasticsearch index. Error encountered:
(Checked Jira. Did not see anything relevant. Found others reporting same error message when attempting to use Bleve search #14929, but since that is experimental and potentially a different implementation, reporting this issue separately).
Steps to reproduce
Utilizing MM 5.26.0 (E20) and ElasticSearch 7.9.0. Unable to determine exact conditions that cause this to occur, but it happens each time I attempt to re-index (and fails).
Expected behavior
Indexing should complete successfully.
Observed behavior (that appears unintentional)
When executing the bulk indexing, this occurs after the indexing has been running for quite a long time.
Possible fixes
Checked for the code supporting this to see if I could troubleshoot further, but implementation appears to be in private enterprise repository.
The text was updated successfully, but these errors were encountered: