Date series and academic events (indices) are occasionally missing
Summary
The backend indexes the data, but it happens often that date series and academic events are missing.
EDIT: The real reason why this happens (but it's possible that sometimes happened because of memory problems) is that backend deletes these indices because of different ways how backend saves alias names and type name in index (with underscores vs without spaces: pointofinterest vs point_of_interest):
"stapps_point_of_interest_stapps-core-sample-data_ae68b059": {
"aliases": {
"pointofinterest": {}
}
},
For that reason backend is deleting the indices of each "multiword type" like academic event or point of interest.
Steps to reproduce
??? and then:
curl --request POST \
--url https://mobile.server.uni-frankfurt.de/search \
--header 'Content-Type: application/json' \
--header 'X-StApps-Version: 2.0.0' \
--data '{
"filter": {
"type": "value",
"arguments": {
"field": "type",
"value": "date series"
}
}
}'
Which version of the software did you use ?
The backend on mobile server (mobile.server.uni-frankfurt.de), core version 0.28.
What is the expected correct behavior?
These indices should be always indexed with the other university data.
Relevant logs and/or screenshots
[INFO] Created index, stapps_date_series_vlv-connector_6d6b8d0a
[INFO] deleted old index, stapps_date_series_vlv-connector_9846569b
[INFO] swapped alias index alias, stapps_date_series_vlv-connector_9846569b, =>, stapps_date_series_vlv-connector_6d6b8d0a
[ERROR] socket hang up, ConnectionError: socket hang up
at onResponse (/app/node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
at ClientRequest.request.on.err (/app/node_modules/@elastic/elasticsearch/lib/Connection.js:99:9)
[INFO] Created index, stapps_date_series_vlv-connector_0c6b9268
at ClientRequest.emit (events.js:198:13)
at Socket.socketOnEnd (_http_client.js:435:9)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[ERROR] socket hang up, ConnectionError: socket hang up
at onResponse (/app/node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
at ClientRequest.request.on.err (/app/node_modules/@elastic/elasticsearch/lib/Connection.js:99:9)
at ClientRequest.emit (events.js:198:13)
at Socket.socketCloseListener (_http_client.js:373:11)
at Socket.emit (events.js:203:15)
at TCP._handle.close (net.js:607:12)
[ERROR] connect ECONNREFUSED 172.28.0.3:9200, ConnectionError: connect ECONNREFUSED 172.28.0.3:9200
at onResponse (/app/node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
at ClientRequest.request.on.err (/app/node_modules/@elastic/elasticsearch/lib/Connection.js:99:9)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:401:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
[ERROR] connect ECONNREFUSED 172.28.0.3:9200, ConnectionError: connect ECONNREFUSED 172.28.0.3:9200
at onResponse (/app/node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
at ClientRequest.request.on.err (/app/node_modules/@elastic/elasticsearch/lib/Connection.js:99:9)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:401:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
[ERROR] connect ECONNREFUSED 172.28.0.3:9200, ConnectionError: connect ECONNREFUSED 172.28.0.3:9200
at onResponse (/app/node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
at ClientRequest.request.on.err (/app/node_modules/@elastic/elasticsearch/lib/Connection.js:99:9)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:401:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
SMTP config failed.
[WARN] Deleted old indices: oldIndicesToDelete
[INFO] Created index, stapps_date_series_vlv-connector_312acd1b
[INFO] swapped alias index alias, [], =>, stapps_date_series_vlv-connector_312acd1b
Possible fixes
See the edit above
Increase the request timeout of the elasticsearch library?
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/5.x/_basic_options.html
Unfortunately there is not much data from the elasticsearch, except e.g.:
[2020-12-09T05:06:33,081][INFO ][o.e.c.m.MetaDataCreateIndexService] [IKUrboG] [stapps_date_series_vlv-connector_0c6b9268] creating index, cause [api], templates [template_date_series], shards [1]/[0], m
appings [date series]
[2020-12-09T05:06:33,117][INFO ][o.e.c.r.a.AllocationService] [IKUrboG] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[stapps_date_series_vlv-connector_0c6b9268][0]] .$
.]).
[2020-12-09T05:09:30,338][INFO ][o.e.c.r.a.AllocationService] [IKUrboG] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[stapps_date_series_vlv-connector_6d6b8d0a][0], [stap
ps_building_library-connector_5766fea0][0]] ...]).
[2020-12-09T05:09:37,175][INFO ][o.e.c.m.MetaDataDeleteIndexService] [IKUrboG] [stapps_date_series_vlv-connector_6d6b8d0a/nuPwg1jARQu5lCTFi-Musg] deleting index
[2020-12-09T05:09:37,175][INFO ][o.e.c.m.MetaDataDeleteIndexService] [IKUrboG] [stapps_date_series_vlv-connector_0c6b9268/3gkdou5VQTyBhBnkl0YIwg] deleting index
cc: @abcdev @wulkanat