Skip to content
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

Problem updating from 5.12.4 to 5.12.7. Stuck at [MIGRATION] #5244

Closed
AlexSanchezN opened this issue Dec 16, 2023 · 10 comments
Closed

Problem updating from 5.12.4 to 5.12.7. Stuck at [MIGRATION] #5244

AlexSanchezN opened this issue Dec 16, 2023 · 10 comments
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@AlexSanchezN
Copy link

Description

I'm trying to update from 5.12.4. I've tried with 5.12.6 and 5.12.7 versions but the errors below appear during migration.
Tried to go to 5.12.4 again, but it did not work either. So I'm stuck without the platform :-(
Maybe it will solve itself by waiting if the migration is very long, but as the redis errors appear I've labeled this as a bug. Admins feel free to change it.
At the moment It is trying to upgrade to 5.12.7 since 12/16/2023 12:40
It has been trying to upgrade to 5.12.6 from 12/15/2023 21:30 to 12/16/2023 12:30 repeating the error message about every 30 seconds.

{"category":"APP","level":"info","message":"[MIGRATION] Saving current configuration, 1701354091187-file_mappings.js","timestamp":"2023-12-16T12:21:40.808Z","version":"5.12.7"} {"category":"APP","level":"info","message":"[MIGRATION] Starting 1701354091161-files-registration.js","timestamp":"2023-12-16T12:21:40.808Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:22:29.381Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:23:18.780Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:24:08.178Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:24:57.576Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:25:46.976Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:26:36.375Z","version":"5.12.7"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-16T12:27:25.774Z","version":"5.12.7"}

Environment

Ubuntu 22.04 baremetal with healthy Redis

CPU Use: (The drop shows when we stopped the platform to upgrade)

chart2

Memory Use:

chart2

Redis instantaneous bytes/second:

chart2

Redis instantaneous operations/second:

chart2

@AlexSanchezN AlexSanchezN added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Dec 16, 2023
@AlexSanchezN
Copy link
Author

More information from the process we left working at night, upgrade to 5.12.6 from 12/15/2023 21:30 to 12/16/2023 12:30, In the error log, there are the 2 lines shown below.
The second line is 502MB long, looks like a bulk operation on all the files in the platform.
I've splited it for readability

{"category":"APP","error":{"context":{},"message":"","name":"ResponseError","stack":"ResponseError: \n at ELt.request (/opt/opencti/build/node_modules/@elastic/transport/src/Transport.ts:553:17)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at t8e.BulkApi [as bulk] (/opt/opencti/build/node_modules/@elastic/elasticsearch/src/api/api/bulk.ts:75:10)\n at elIndexElementsFn (/opt/opencti/build/src/database/engine.js:2826:7)\n at dNu.up (/opt/opencti/build/src/migrations/1701354091189-files-registration.js:17:3)"},"level":"error","message":"[MIGRATION] Error during migration","timestamp":"2023-12-16T02:09:02.856Z","version":"5.12.6"} {"category":"APP","error":{"context":{"category":"technical","error":{"meta":{"body":"","headers":{"content-length":"0"},"meta":{"aborted":false,"attempts":0,"connection":{"_openRequests":0,"deadCount":0,"headers":{"authorization":"[redacted]"},"id":"https://eticoctielastic01.etic.security:9200/","pool":{"_events":{},"_eventsCount":0},"resurrectTimeout":0,"timeout":30000,"tls":{"ca":{"0":45,"1":45,"10":32,"100":120,"1000":48,"1001":105,"1002":10,"1003":88,"1004":53,"1005":80,"1006":104,"1007":86,"1008":57,"1009":121,"101":79,"1010":118,"1011":98,"1012":80,"1013":108,"1014":57,"1015":68,"1016":52,"1017":117,"1018":104,"1019":73,"102":106,"1020":104,"1021":57,"1022":68,"1023":43,"1024":49,"1025":116,"1026":98,"1027":56,"1028":67,"1029":106,"103":65,"1030":122,"1031":68,"1032":71,"1033":86,"1034":54,"1035":118,"1036":98,"1037":109,"1038":50,"1039":75,"104":52,"1040":121,"1041":103,"1042":52,"1043":55,"1044":43,"1045":85,"1046":67,"1047":65,"1048":119,"1049":69,"105":66,"1050":65,"1051":65,"1052":97,"1053":78,"1054":84,"1055":77,"1056":70,"1057":69,"1058":119,"1059":72,"106":103,"1060":81,"1061":89,"1062":68,"1063":86,"1064":82,"1065":48,"1066":79,"1067":10,"1068":66,"1069":66,"107":78,"1070":89,"1071":69,"1072":70,"1073":80,"1074":117,"1075":49,"1076":72,"1077":77,"1078":65,"1079":73,"108":86,"1080":112,"1081":68,"1082":73,"1083":68,"1084":117,"1085":108,"1086":113,"1087":87,"1088":99,"1089":112,"109":66,"1090":71,"1091":103,"1092":121,"1093":52,"1094":65,"1095":76,"1096":121,"1097":75,"1098":86,"1099":53,"11":67,"110":65,"1100":77,"1101":66,"1102":56,"1103":71,"1104":65,"1105":49,"1106":85,"1107":100,"1108":73,"1109":119,"111":77,"1110":81,"1111":89,"1112":77,"1113":66,"1114":97,"1115":65,"1116":70,"1117":80,"1118":117,"1119":49,"112":84,"1120":72,"1121":77,"1122":65,"1123":73,"1124":112,"1125":68,"1126":73,"1127":68,"1128":117,"1129":108,"113":77,"1130":113,"1131":87,"1132":10,"1133":99,"1134":112,"1135":71,"1136":103,"1137":121,"1138":52,"1139":65,"114":85,"1140":76,"1141":121,"1142":75,"1143":86,"1144":53,"1145":77,"1146":65,"1147":56,"1148":71,"1149":65,"115":86,"1150":49,"1151":85,"1152":100,"1153":69,"1154":119,"1155":69,"1156":66,"1157":47,"1158":119,"1159":81,"116":115,"1160":70,"1161":77,"1162":65,"1163":77,"1164":66,"1165":65,"1166":102,"1167":56,"1168":119,"1169":68,"117":89,"1170":81,"1171":89,"1172":74,"1173":75,"1174":111,"1175":90,"1176":73,"1177":104,"1178":118,"1179":99,"118":88,"1180":78,"1181":65,"1182":81,"1183":69,"1184":76,"1185":66,"1186":81,"1187":65,"1188":68,"1189":103,"119":78,"1190":103,"1191":73,"1192":66,"1193":65,"1194":71,"1195":53,"1196":77,"1197":10,"1198":107,"1199":77,"12":69,"120":48,"1200":55,"1201":86,"1202":88,"1203":43,"1204":119,"1205":65,"1206":120,"1207":67,"1208":80,"1209":108,"121":97,"1210":110,"1211":103,"1212":57,"1213":87,"1214":111,"1215":108,"1216":74,"1217":111,"1218":110,"1219":113,"122":87,"1220":57,"1221":121,"1222":76,"1223":73,"1224":105,"1225":55,"1226":43,"1227":102,"1228":119,"1229":121,"123":78,"1230":80,"1231":108,"1232":107,"1233":65,"1234":110,"1235":51,"1236":43,"1237":105,"1238":43,"1239":114,"124":122,"1240":77,"1241":115,"1242":116,"1243":100,"1244":78,"1245":108,"1246":77,"1247":108,"1248":104,"1249":74,"125":90,"1250":49,"1251":121,"1252":122,"1253":81,"1254":56,"1255":118,"1256":121,"1257":114,"1258":53,"1259":109,"126":87,"1260":87,"1261":84,"1262":10,"1263":107,"1264":102,"1265":54,"1266":56,"1267":84,"1268":70,"1269":71,"127":70,"1270":48,"1271":49,"1272":103,"1273":67,"1274":69,"1275":75,"1276":122,"1277":72,"1278":88,"1279":77,"128":121,"1280":108,"1281":74,"1282":77,"1283":107,"1284":104,"1285":83,"1286":121,"1287":52,"1288":47,"1289":122,"129":89,"1290":85,"1291":49,"1292":54,"1293":114,"1294":75,"1295":68,"1296":109,"1297":102,"1298":100,"1299":48,"13":82,"130":50,"1300":109,"1301":112,"1302":112,"1303":52,"1304":69,"1305":101,"1306":48,"1307":57,"1308":86,"1309":115,"131":103,"1310":76,"1311":105,"1312":73,"1313":109,"1314":115,"1315":68,"1316":118,"1317":57,"1318":84,"1319":53,"132":103,"1320":116,"1321":114,"1322":102,"1323":67,"1324":102,"1325":76,"1326":107,"1327":10,"1328":76,"1329":56,"133":99,"1330":101,"1331":48,"1332":81,"1333":71,"1334":114,"1335":88,"1336":70,"1337":100,"1338":89,"1339":111,"134":50,"1340":69,"1341":81,"1342":101,"1343":102,"1344":114,"1345":68,"1346":67,"1347":99,"1348":68,"1349":97,"135":86,"1350":105,"1351":66,"1352":105,"1353":87,"1354":57,"1355":80,"1356":103,"1357":98,"1358":97,"1359":98,"136":106,"1360":111,"1361":113,"1362":108,"1363":111,"1364":97,"1365":48,"1366":83,"1367":100,"1368":101,"1369":103,"137":100,"1370":121,"1371":86,"1372":80,"1373":90,"1374":52,"1375":73,"1376":122,"1377":50,"1378":106,"1379":119,"138":88,"1380":43,"1381":66,"1382":43,"1383":105,"1384":80,"1385":117,"1386":78,"1387":82,"1388":110,"1389":108,"139":74,"1390":119,"1391":114,"1392":10,"1393":89,"1394":65,"1395":118,"1396":102,"1397":84,"1398":73,"1399":89,"14":84,"140":112,"1400":116,"1401":70,"1402":49,"1403":55,"1404":48,"1405":111,"1406":114,"1407":107,"1408":104,"1409":111,"141":100,"1410":120,"1411":107,"1412":87,"1413":117,"1414":81,"1415":76,"1416":52,"1417":112,"1418":66,"1419":101,"142":72,"1420":86,"1421":111,"1422":49,"1423":56,"1424":117,"1425":83,"1426":104,"1427":74,"1428":67,"1429":51,"143":107,"1430":88,"1431":77,"1432":120,"1433":117,"1434":55,"1435":68,"1436":74,"1437":48,"1438":56,"1439":66,"144":103,"1440":50,"1441":73,"1442":65,"1443":50,"1444":106,"1445":117,"1446":84,"1447":98,"1448":71,"1449":47,"145":89,"1450":49,"1451":72,"1452":47,"1453":69,"1454":43,"1455":76,"1456":88,"1457":10,"1458":73,"1459":66,"146":88,"1460":109,"1461":99,"1462":110,"1463":117,"1464":52,"1465":87,"1466":70,"1467":122,"1468":74,"1469":100,"147":86,"1470":102,"1471":108,"1472":116,"1473":73,"1474":118,"1475":85,"1476":71,"1477":49,"1478":99,"1479":71,"148":48,"1480":67,"1481":49,"1482":50,"1483":76,"1484":100,"1485":73,"1486":52,"1487":101,"1488":50,"1489":110,"149":98,"1490":90,"1491":108,"1492":79,"1493":121,"1494":73,"1495":108,"1496":79,"1497":79,"1498":115,"1499":113,"15":73,"150":121,"1500":66,"1501":83,"1502":51,"1503":104,"1504":52,"1505":48,"1506":120,"1507":74,"1508":68,"1509":117,"151":49,"1510":54,"1511":55,"1512":115,"1513":119,"1514":78,"1515":104,"1516":107,"1517":67,"1518":79,"1519":71,"152":106,"1520":107,"1521":48,"1522":10,"1523":103,"1524":112,"1525":116,"1526":83,"1527":57,"1528":78,"1529":73,"153":98,"1530":74,"1531":84,"1532":97,"1533":122,"1534":74,"1535":74,"1536":82,"1537":71,"1538":88,"1539":117,"154":50,"1540":49,"1541":120,"1542":109,"1543":76,"1544":75,"1545":84,"1546":117,"1547":99,"1548":75,"1549":104,"155":53,"1550":53,"1551":102,"1552":111,"1553":50,"1554":87,"1555":68,"1556":101,"1557":68,"1558":86,"1559":97,"156":109,"1560":78,"1561":85,"1562":65,"1563":83,"1564":114,"1565":83,"1566":98,"1567":103,"1568":104,"1569":53,"157":10,"1570":121,"1571":115,"1572":98,"1573":115,"1574":104,"1575":109,"1576":82,"1577":119,"1578":76,"1579":98,"158":97,"1580":66,"1581":87,"1582":69,"1583":100,"1584":72,"1585":78,"1586":102,"1587":10,"1588":90,"1589":100,"159":87,"1590":79,"1591":47,"1592":111,"1593":89,"1594":102,"1595":121,"1596":73,"1597":99,"1598":99,"1599":106,"16":70,"160":100,"1600":97,"1601":80,"1602":107,"1603":52,"1604":98,"1605":73,"1606":105,"1607":83,"1608":51,"1609":75,"161":49,"1610":48,"1611":43,"1612":69,"1613":88,"1614":74,"1615":74,"1616":50,"1617":115,"1618":117,"1619":81,"162":99,"1620":53,"1621":114,"1622":90,"1623":78,"1624":88,"1625":75,"1626":43,"1627":86,"1628":112,"1629":111,"163":109,"1630":89,"1631":74,"1632":117,"1633":54,"1634":82,"1635":104,"1636":122,"1637":84,"1638":99,"1639":121,"164":70,"1640":114,"1641":47,"1642":47,"1643":97,"1644":86,"1645":100,"1646":70,"1647":80,"1648":71,"1649":66,"165":48,"1650":102,"1651":43,"1652":10,"1653":48,"1654":84,"1655":81,"1656":115,"1657":97,"1658":67,"1659":97,"166":97,"1660":115,"1661":82,"1662":87,"1663":79,"1664":86,"1665":116,"1666":99,"1667":100,"1668":116,"1669":103,"167":87,"1670":122,"1671":75,"1672":99,"1673":97,"1674":115,"1675":98,"1676":69,"1677":78,"1678":47,"1679":117,"168":57,"1680":101,"1681":107,"1682":100,"1683":109,"1684":80,"1685":48,"1686":43,"1687":47,"1688":82,"1689":47,"169":117,"1690":101,"1691":54,"1692":120,"1693":105,"1694":76,"1695":85,"1696":100,"1697":82,"1698":106,"1699":90,"17":73,"170":73,"1700":74,"1701":98,"1702":65,"1703":117,"1704":54,"1705":86,"1706":53,"1707":113,"1708":78,"1709":65,"171":69,"1710":47,"1711":50,"1712":69,"1713":107,"1714":97,"1715":52,"1716":106,"1717":10,"1718":80,"1719":100,"172":104,"1720":107,"1721":88,"1722":49,"1723":81,"1724":113,"1725":70,"1726":120,"1727":74,"1728":56,"1729":105,"173":85,"1730":98,"1731":80,"1732":53,"1733":101,"1734":108,"1735":71,"1736":79,"1737":72,"1738":116,"1739":49,"174":86,"1740":87,"1741":102,"1742":120,"1743":90,"1744":56,"1745":73,"1746":116,"1747":86,"1748":77,"1749":101,"175":70,"1750":83,"1751":105,"1752":116,"1753":55,"1754":106,"1755":73,"1756":43,"1757":52,"1758":56,"1759":66,"176":65,"1760":71,"1761":68,"1762":69,"1763":55,"1764":70,"1765":87,"1766":47,"1767":105,"1768":65,"1769":83,"177":103,"1770":49,"1771":108,"1772":97,"1773":71,"1774":112,"1775":53,"1776":54,"1777":85,"1778":48,"1779":101,"178":81,"1780":53,"1781":67,"1782":10,"1783":66,"1784":88,"1785":68,"1786":70,"1787":105,"1788":54,"1789":76,"179":48,"1790":112,"1791":111,"1792":71,"1793":121,"1794":77,"1795":71,"1796":65,"1797":110,"1798":99,"1799":82,"18":67,"180":69,"1800":100,"1801":87,"1802":97,"1803":109,"1804":103,"1805":47,"1806":56,"1807":115,"1808":86,"1809":105,"181":119,"1810":115,"1811":98,"1812":49,"1813":79,"1814":90,"1815":69,"1816":67,"1817":107,"1818":75,"1819":52,"182":72,"1820":48,"1821":115,"1822":75,"1823":50,"1824":99,"1825":86,"1826":72,"1827":101,"1828":107,"1829":89,"183":104,"1830":122,"1831":89,"1832":57,"1833":108,"1834":67,"1835":97,"1836":103,"1837":110,"1838":65,"1839":112,"184":99,"1840":79,"1841":76,"1842":103,"1843":65,"1844":76,"1845":112,"1846":77,"1847":10,"1848":114,"1849":86,"185":78,"1850":104,"1851":109,"1852":116,"1853":47,"1854":84,"1855":105,"1856":119,"1857":100,"1858":43,"1859":100,"186":77,"1860":89,"1861":97,"1862":56,"1863":77,"1864":73,"1865":112,"1866":54,"1867":109,"1868":67,"1869":111,"187":106,"1870":79,"1871":87,"1872":57,"1873":117,"1874":80,"1875":72,"1876":118,"1877":72,"1878":115,"1879":117,"188":73,"1880":121,"1881":117,"1882":110,"1883":86,"1884":81,"1885":52,"1886":48,"1887":109,"1888":10,"1889":45,"189":119,"1890":45,"1891":45,"1892":45,"1893":45,"1894":69,"1895":78,"1896":68,"1897":32,"1898":67,"1899":69,"19":65,"190":79,"1900":82,"1901":84,"1902":73,"1903":70,"1904":73,"1905":67,"1906":65,"1907":84,"1908":69,"1909":45,"191":68,"1910":45,"1911":45,"1912":45,"1913":45,"1914":10,"192":65,"193":122,"194":77,"195":84,"196":69,"197":122,"198":78,"199":106,"2":45,"20":84,"200":85,"201":119,"202":87,"203":104,"204":99,"205":78,"206":77,"207":106,"208":85,"209":119,"21":69,"210":79,"211":68,"212":65,"213":121,"214":77,"215":84,"216":69,"217":122,"218":78,"219":106,"22":45,"220":85,"221":119,"222":10,"223":87,"224":106,"225":65,"226":56,"227":77,"228":84,"229":111,"23":45,"230":119,"231":79,"232":65,"233":89,"234":68,"235":86,"236":81,"237":81,"238":68,"239":69,"24":45,"240":122,"241":70,"242":70,"243":98,"244":71,"245":70,"246":122,"247":100,"248":71,"249":108,"25":45,"250":106,"251":99,"252":50,"253":86,"254":104,"255":99,"256":109,"257":78,"258":111,"259":73,"26":45,"260":72,"261":78,"262":108,"263":89,"264":51,"265":86,"266":121,"267":97,"268":88,"269":82,"27":10,"270":53,"271":73,"272":71,"273":70,"274":49,"275":100,"276":71,"277":56,"278":116,"279":89,"28":77,"280":50,"281":57,"282":117,"283":90,"284":109,"285":108,"286":110,"287":10,"288":100,"289":88,"29":73,"290":74,"291":104,"292":100,"293":71,"294":108,"295":118,"296":98,"297":105,"298":66,"299":73,"3":45,"30":73,"300":86,"301":70,"302":82,"303":81,"304":73,"305":69,"306":78,"307":66,"308":77,"309":73,"31":70,"310":73,"311":67,"312":73,"313":106,"314":65,"315":78,"316":66,"317":103,"318":107,"319":113,"32":87,"320":104,"321":107,"322":105,"323":71,"324":57,"325":119,"326":48,"327":66,"328":65,"329":81,"33":106,"330":69,"331":70,"332":65,"333":65,"334":79,"335":67,"336":65,"337":103,"338":56,"339":65,"34":67,"340":77,"341":73,"342":73,"343":67,"344":67,"345":103,"346":75,"347":67,"348":65,"349":103,"35":67,"350":69,"351":65,"352":10,"353":118,"354":120,"355":78,"356":105,"357":112,"358":80,"359":111,"36":65,"360":99,"361":103,"362":111,"363":69,"364":98,"365":80,"366":79,"367":43,"368":69,"369":99,"37":48,"370":81,"371":86,"372":112,"373":74,"374":115,"375":103,"376":85,"377":100,"378":70,"379":114,"38":75,"380":50,"381":109,"382":106,"383":47,"384":110,"385":101,"386":109,"387":113,"388":53,"389":102,"39":103,"390":113,"391":57,"392":51,"393":65,"394":82,"395":80,"396":50,"397":76,"398":86,"399":48,"4":45,"40":65,"400":51,"401":110,"402":104,"403":100,"404":74,"405":99,"406":48,"407":119,"408":85,"409":70,"41":119,"410":120,"411":48,"412":71,"413":71,"414":101,"415":52,"416":71,"417":10,"418":104,"419":83,"42":73,"420":101,"421":72,"422":83,"423":117,"424":49,"425":101,"426":110,"427":77,"428":56,"429":77,"43":66,"430":51,"431":119,"432":86,"433":76,"434":98,"435":55,"436":120,"437":118,"438":68,"439":67,"44":65,"440":56,"441":105,"442":53,"443":56,"444":101,"445":116,"446":109,"447":112,"448":113,"449":102,"45":103,"450":106,"451":51,"452":114,"453":82,"454":74,"455":114,"456":77,"457":85,"458":116,"459":54,"46":73,"460":105,"461":107,"462":69,"463":104,"464":89,"465":109,"466":113,"467":106,"468":77,"469":82,"47":86,"470":105,"471":47,"472":87,"473":82,"474":47,"475":65,"476":108,"477":121,"478":113,"479":65,"48":65,"480":52,"481":67,"482":10,"483":54,"484":86,"485":55,"486":67,"487":50,"488":53,"489":122,"49":78,"490":71,"491":67,"492":79,"493":84,"494":100,"495":117,"496":72,"497":72,"498":49,"499":108,"5":66,"50":120,"500":77,"501":113,"502":120,"503":99,"504":47,"505":101,"506":98,"507":57,"508":70,"509":107,"51":108,"510":49,"511":71,"512":110,"513":120,"514":52,"515":111,"516":53,"517":109,"518":117,"519":72,"52":70,"520":111,"521":76,"522":113,"523":68,"524":100,"525":52,"526":88,"527":113,"528":119,"529":107,"53":119,"530":65,"531":122,"532":70,"533":88,"534":77,"535":118,"536":98,"537":74,"538":119,"539":121,"54":57,"540":52,"541":50,"542":90,"543":74,"544":116,"545":85,"546":90,"547":10,"548":75,"549":57,"55":72,"550":106,"551":89,"552":68,"553":112,"554":43,"555":72,"556":89,"557":87,"558":88,"559":83,"56":106,"560":90,"561":79,"562":110,"563":81,"564":101,"565":103,"566":76,"567":69,"568":88,"569":105,"57":74,"570":49,"571":83,"572":89,"573":119,"574":99,"575":82,"576":115,"577":101,"578":53,"579":116,"58":98,"580":79,"581":69,"582":66,"583":48,"584":103,"585":89,"586":98,"587":100,"588":85,"589":67,"59":72,"590":97,"591":104,"592":65,"593":89,"594":118,"595":90,"596":71,"597":48,"598":78,"599":56,"6":69,"60":112,"600":110,"601":72,"602":72,"603":114,"604":68,"605":86,"606":50,"607":48,"608":97,"609":118,"61":90,"610":117,"611":73,"612":10,"613":72,"614":107,"615":54,"616":43,"617":99,"618":68,"619":87,"62":51,"620":103,"621":118,"622":120,"623":70,"624":68,"625":87,"626":104,"627":98,"628":100,"629":74,"63":75,"630":103,"631":118,"632":86,"633":54,"634":112,"635":121,"636":99,"637":78,"638":54,"639":101,"64":51,"640":110,"641":97,"642":56,"643":106,"644":81,"645":113,"646":109,"647":102,"648":101,"649":112,"65":66,"650":118,"651":112,"652":122,"653":88,"654":68,"655":80,"656":78,"657":79,"658":88,"659":104,"66":47,"660":102,"661":57,"662":85,"663":89,"664":74,"665":51,"666":68,"667":103,"668":74,"669":67,"67":98,"670":65,"671":102,"672":69,"673":98,"674":68,"675":74,"676":111,"677":10,"678":87,"679":90,"68":73,"680":85,"681":86,"682":51,"683":106,"684":110,"685":98,"686":82,"687":80,"688":68,"689":121,"69":84,"690":74,"691":53,"692":68,"693":48,"694":83,"695":83,"696":43,"697":109,"698":117,"699":76,"7":71,"70":79,"700":89,"701":86,"702":89,"703":79,"704":113,"705":72,"706":75,"707":116,"708":70,"709":99,"71":121,"710":72,"711":86,"712":119,"713":102,"714":99,"715":65,"716":111,"717":82,"718":53,"719":69,"72":83,"720":111,"721":87,"722":67,"723":89,"724":112,"725":121,"726":116,"727":76,"728":56,"729":100,"73":57,"730":110,"731":113,"732":119,"733":102,"734":52,"735":71,"736":50,"737":116,"738":115,"739":57,"74":105,"740":103,"741":71,"742":10,"743":87,"744":82,"745":101,"746":70,"747":82,"748":56,"749":78,"75":83,"750":108,"751":78,"752":114,"753":80,"754":122,"755":111,"756":70,"757":88,"758":109,"759":50,"76":77,"760":52,"761":65,"762":83,"763":48,"764":79,"765":77,"766":113,"767":122,"768":78,"769":43,"77":65,"770":101,"771":73,"772":99,"773":103,"774":86,"775":113,"776":74,"777":68,"778":53,"779":85,"78":48,"780":78,"781":51,"782":106,"783":74,"784":70,"785":89,"786":79,"787":109,"788":43,"789":119,"79":71,"790":52,"791":105,"792":90,"793":98,"794":56,"795":74,"796":121,"797":108,"798":67,"799":120,"8":73,"80":67,"800":98,"801":50,"802":114,"803":52,"804":107,"805":85,"806":76,"807":10,"808":97,"809":115,"81":83,"810":98,"811":100,"812":101,"813":82,"814":116,"815":99,"816":102,"817":56,"818":69,"819":52,"82":113,"820":89,"821":65,"822":121,"823":121,"824":48,"825":75,"826":75,"827":117,"828":81,"829":121,"83":71,"830":98,"831":121,"832":77,"833":121,"834":79,"835":89,"836":87,"837":78,"838":113,"839":111,"84":83,"840":66,"841":111,"842":78,"843":98,"844":102,"845":71,"846":84,"847":117,"848":117,"849":104,"85":73,"850":81,"851":77,"852":72,"853":74,"854":99,"855":49,"856":73,"857":118,"858":49,"859":84,"86":98,"860":119,"861":85,"862":120,"863":114,"864":88,"865":57,"866":65,"867":122,"868":84,"869":76,"87":51,"870":67,"871":79,"872":10,"873":75,"874":76,"875":75,"876":87,"877":75,"878":55,"879":102,"88":68,"880":70,"881":54,"882":89,"883":110,"884":119,"885":100,"886":80,"887":102,"888":73,"889":100,"89":81,"890":88,"891":106,"892":84,"893":88,"894":76,"895":69,"896":78,"897":54,"898":57,"899":118,"9":78,"90":69,"900":48,"901":52,"902":114,"903":106,"904":56,"905":51,"906":49,"907":98,"908":117,"909":77,"91":66,"910":117,"911":54,"912":82,"913":84,"914":88,"915":121,"916":90,"917":106,"918":107,"919":54,"92":10,"920":103,"921":101,"922":101,"923":75,"924":108,"925":79,"926":43,"927":69,"928":47,"929":85,"93":67,"930":65,"931":100,"932":89,"933":117,"934":112,"935":56,"936":55,"937":10,"938":78,"939":104,"94":119,"940":106,"941":57,"942":102,"943":81,"944":105,"945":43,"946":106,"947":76,"948":109,"949":52,"95":85,"950":89,"951":116,"952":81,"953":107,"954":88,"955":80,"956":101,"957":52,"958":89,"959":69,"96":65,"960":43,"961":82,"962":98,"963":97,"964":115,"965":82,"966":98,"967":54,"968":100,"969":88,"97":77,"970":105,"971":111,"972":114,"973":111,"974":112,"975":89,"976":78,"977":74,"978":115,"979":100,"98":68,"980":98,"981":107,"982":56,"983":109,"984":76,"985":65,"986":48,"987":48,"988":98,"989":97,"99":119,"990":110,"991":76,"992":87,"993":105,"994":43,"995":107,"996":99,"997":97,"998":103,"999":54},"rejectUnauthorized":false},"url":"https://eticoctielastic01.etic.security:9200/","weight":500},"context":null,"name":"elasticsearch-js","request":{"id":43,"options":{},"params":{"body":"{\"index\":{\"_index\":\"octi_internal_objects\",\"_id\":\"export/IPv4-Addr/54394b82-e710-4023-b1f7-b6a3ec281cc3/2023-09-22T18:13:15.594Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-49.64.112.130_full.json\",\"retry_on_conflict\":5}}\n{\"name\":\"2023-09-22T18:13:15.594Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-49.64.112.130_full.json\",\"size\":3581,\"information\":\"\",\"lastModified\":\"2023-09-22T18:13:17.000Z\",\"lastModifiedSinceMin\":121391,\"metaData\":{\"creator_id\":\"XXXXXXXXX-9732-4444-913b-3e5bcd99427d\",\"encoding\":\"7bit\",\"entity_id\":\"54394b82-e710-4023-b1f7-b6a3ec281cc3\",\"filename\":\"2023-09-22T18%3A13%3A15.594Z_TLP%3AALL_(ExportFileStix)_IPv4-Addr-49.64.112.130_full.json\",\"mimetype\":\"application/json\",\"version\":\"2023-09-22T18:13:17.288Z\",\"messages\":[],\"errors\":[]},\"uploadStatus\":\"complete\",\"internal_id\":\"export/IPv4-Addr/54394b82-e710-4023-b1f7-b6a3ec281cc3/2023-09-22T18:13:15.594Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-49.64.112.130_full.json\",\"standard_id\":\"50b3ab52-e446-537e-8071-0dded4a6d07d\",\"entity_type\":\"InternalFile\"}\n{\"index\":{\"_index\":\"octi_internal_objects\",\"_id\":\"export/IPv4-Addr/a3fa274e-7a41-4ccb-a2ee-ea84469b04d6/2023-03-07T10:30:33.553Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-158.160.49.147_full.json\",\"retry_on_conflict\":5}}\n{\"name\":\"2023-03-07T10:30:33.553Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-158.160.49.147_full.json\",\"size\":9510,\"information\":\"\",\"lastModified\":\"2023-03-07T10:30:41.000Z\",\"lastModifiedSinceMin\":408414,\"metaData\":{\"creator_id\":\"XXXXXXXXX-9732-4444-913b-3e5bcd99427d\",\"encoding\":\"7bit\",\"entity_id\":\"a3fa274e-7a41-4ccb-a2ee-ea84469b04d6\",\"filename\":\"2023-03-07T10%3A30%3A33.553Z_TLP%3AALL_(ExportFileStix)_IPv4-Addr-158.160.49.147_full.json\",\"mimetype\":\"application/json\",\"version\":\"2023-03-07T10:30:41.812Z\",\"messages\":[],\"errors\":[]},\"uploadStatus\":\"complete\",\"internal_id\":\"export/IPv4-Addr/a3fa274e-7a41-4ccb-a2ee-ea84469b04d6/2023-03-07T10:30:33.553Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-158.160.49.147_full.json\",\"standard_id\":\"0acc9c7c-30a1-52d9-bd7e-989700de5c88\",\"entity_type\":\"InternalFile\"}\n{\"index\":{\"_index\":\"octi_internal_objects\",\"_id\":\"export/IPv4-Addr/b935572d-e08d-4f03-8dd8-169208710fce/2023-09-18T10:12:45.814Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-67.140.138.224_full.json\",\"retry_on_conflict\":5}}\n{\"name\":\"2023-09-18T10:12:45.814Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-67.140.138.224_full.json\",\"size\":5594,\"information\":\"\",\"lastModified\":\"2023-09-18T10:12:46.000Z\",\"lastModifiedSinceMin\":127632,\"metaData\":{\"creator_id\":\"XXXXXXXXX-9732-4444-913b-3e5bcd99427d\",\"encoding\":\"7bit\",\"entity_id\":\"b935572d-e08d-4f03-8dd8-169208710fce\",\"filename\":\"2023-09-18T10%3A12%3A45.814Z_TLP%3AALL_(ExportFileStix)_IPv4-Addr-67.140.138.224_full.json\",\"mimetype\":\"application/json\",\"version\":\"2023-09-18T10:12:46.907Z\",\"messages\":[],\"errors\":[]},\"uploadStatus\":\"complete\",\"internal_id\":\"export/IPv4-Addr/b935572d-e08d-4f03-8dd8-169208710fce/2023-09-18T10:12:45.814Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-67.140.138.224_full.json\",\"standard_id\":\"4f855e44-2cdf-5585-a785-a8816ef1057a\",\"entity_type\":\"InternalFile\"}\n{\"index\":{\"_index\":\"octi_internal_objects\",\"_id\":\"export/IPv4-Addr/cc118f82-b92d-4854-8500-5f760be39ca2/2023-11-13T13:16:38.403Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-162.142.125.232_full.json\",\"retry_on_conflict\":5}}\n{\"name\":\"2023-11-13T13:16:38.403Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-162.142.125.232_full.json\",\"size\":166095,\"information\":\"\",\"lastModified\":\"2023-11-13T13:17:19.000Z\",\"lastModifiedSinceMin\":46807,\"metaData\":{\"creator_id\":\"XXXXXXXXX-9732-4444-913b-3e5bcd99427d\",\"encoding\":\"7bit\",\"entity_id\":\"cc118f82-b92d-4854-8500-5f760be39ca2\",\"filename\":\"2023-11-13T13%3A16%3A38.403Z_TLP%3AALL_(ExportFileStix)_IPv4-Addr-162.142.125.232_full.json\",\"mimetype\":\"application/json\",\"version\":\"2023-11-13T13:17:19.780Z\",\"messages\":[],\"errors\":[]},\"uploadStatus\":\"complete\",\"internal_id\":\"export/IPv4-Addr/cc118f82-b92d-4854-8500-5f760be39ca2/2023-11-13T13:16:38.403Z_TLP:ALL_(ExportFileStix)_IPv4-Addr-162.142.125.232_full.json\",\"standard_id\":\"b609f6da-3574-552b-bfd3-2d555ca7d280\",\"entity_type\":\"InternalFile\"}\n{\"index\":{\"_index\":\"octi_internal_objects\",\"_id\":\"export/Indicator/953c51f4-339d-4238-a1f1-fcff8cd9c2eb/2023-03-07T17:04:25.897Z_TLP:ALL_(ExportFileStix)_Indicator-49.206.194.35_full.json\",\"retry_on_conflict\":5}}\n{\"name\":\"2023-03-07T17:04:25.897Z_TLP:ALL_(ExportFileStix)_Indicator-49.206.194.35_full.json\",\"size\":8513,\"information\":\"\",\"lastModified\":\"2023-03-07T17:04:47.000Z\",\"lastModifiedSinceMin\":408020,\"metaData\":{\"creator_id\":\"XXXXXXX-9732-4444-913b-3e5bcd99427d\",\"encoding\":\"7bit\",\"entity_id\":\"953c51f4-339d-4238-a1f1-fcff8cd9c2eb\",\"filename\":\"2023-03-07T17%3A04%3A25.897Z_TLP%3AALL_(ExportFileStix)_Indicator-49.206.194.35_full.json\",\"mimetype\":\"application/json\",\"version\":\"2023-03-07T17:04:47.410Z\",\"messages\":[],\"errors\":[]},\"uploadStatus\":\"complete\",\"internal_id\":\"export/Indicator/953c51f4-339d-4238-a1f1-fcff8cd9c2eb/2023-03-07T17:04:25.897Z_TLP:ALL_(ExportFileStix)_Indicator-49.206.194.35_full.json\",\"standard_id\":\"cee855ee-7d2e-5419-a26e-d2434ab988c4\",\"entity_type\":\"InternalFile\"}\n{\"index\":{\"_index\":\"octi_internal_objects\",\"_id\":\"export/Indicator/9d5857ae-73aa-4468-abd7-ed2d57259de1/2023-10-16T13:31:31.463Z_TLP:ALL_(ExportFileStix)_Indicator-91.243.97.144_full.json\",\"retry_on_conflict\":5}}\n{\"name\":\"2023-10-16T13:31:31.463Z_TLP:ALL_(ExportFileStix)_Indicator-91.243.97.144_full.json\",\"size\":9746,\"information\":\"\",\"lastModified\":\"2023-10-16T13:32:01.000Z\",\"lastModifiedSinceMin\":87156,\"metaData\":{\"creator_id\":\"XXXXXXXXX-9732-4444-913b-3e5bcd99427d\",\"encoding\":\"7bit\",\"entity_id\":\"9d5857ae-73aa-4468-abd7-ed2d57259de1\",

ABOUT 502MB of text

Tribe_ Evolution analysis, part 2 _ Securelist.pdf\",\"standard_id\":\"50788d8e-69df-5bf1-9aed-3e5074f2a9c9\",\"entity_type\":\"InternalFile\"}\n","headers":{"accept":"application/vnd.elasticsearch+json; compatible-with=8","content-length":"484894437","content-type":"application/vnd.elasticsearch+x-ndjson; compatible-with=8","user-agent":"elasticsearch-js/8.11.0 (linux 5.15.0-91-generic-x64; Node.js 18.17.1; Transport 8.4.0)","x-elastic-client-meta":"es=8.11.0,js=18.17.1,t=8.4.0,hc=18.17.1"},"method":"POST","path":"/_bulk","querystring":"refresh=true&timeout=5m"}}},"statusCode":413,"warnings":null},"name":"ResponseError","options":{"redaction":{"additionalKeys":[],"type":"replace"}}},"http_status":500,"reason":"[OPENCTI] Platform initialization fail"},"message":"An unknown error has occurred","name":"UnknownError","stack":"UnknownError: An unknown error has occurred\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at UnknownError (/opt/opencti/build/src/config/errors.js:72:47)\n at platformInit (/opt/opencti/build/src/initialization.js:386:13)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at platformStart (/opt/opencti/build/src/boot.js:231:5)"},"level":"error","message":"[OPENCTI] Platform start fail","timestamp":"2023-12-16T02:09:28.427Z","version":"5.12.6"}

@richard-julien
Copy link
Member

Seems related to lot of files in your s3. PR open to prevent too many operations done at the same time

@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Dec 17, 2023
@SamuelHassine
Copy link
Member

Hello @AlexSanchezN,

Thanks for reporting this. Release 5.12.8 should solve your problem.

Kind regards,
Samuel

@AlexSanchezN
Copy link
Author

Updating right now.
Will let you know.

Thanks for your effort. Very much appreciated

@AlexSanchezN
Copy link
Author

It has been upgrading for 10 minutes now.
The errors below appear in opencti.log.2023-12-17
But no errors in error.log.2023-12-17 at the moment

{"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-17T11:41:36.676Z","version":"5.12.8"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-17T11:42:26.118Z","version":"5.12.8"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-17T11:43:15.535Z","version":"5.12.8"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-17T11:44:04.982Z","version":"5.12.8"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-17T11:44:54.403Z","version":"5.12.8"} {"category":"APP","level":"warn","locks":["{locks}:platform_init_lock"],"message":"[REDIS] Extending resources for long processing task","stack":"Error: \n at lockResource (/opt/opencti/build/src/database/redis.ts:318:28)\n at initialization_default (/opt/opencti/build/src/initialization.js:359:18)\n at platformStart (/opt/opencti/build/src/boot.js:231:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2023-12-17T11:45:43.807Z","version":"5.12.8"}

There are over 530.000 objects in the Minio bucket, so I suppose we have to wait

image

@richard-julien
Copy link
Member

500K files .. thats a lot :)
There is a progression log but in INFO level :(
Yes please wait for the end. If you kill and restart in INFO level it will restart the index from the beginning.

@AlexSanchezN
Copy link
Author

The process finished correctly in 5.12.8.
Platform is up and running well.

Thanks again for your work, especially as it has been over the weekend

@richard-julien
Copy link
Member

Cool news. Thanks for sharing. Any idea of the time it required to migrate the 500K files?

@AlexSanchezN
Copy link
Author

Sorry for the late answer.
Find attached the complete log of the migration.
It looks like counting files took forever, after that the process was fast enough

Migration.txt

@richard-julien
Copy link
Member

4 hours to get the list from S3/Minio and then 1 minute to index everything in elastic.
Thats the main reason we decide to mirror the list of files in elastic to be able to do quick operations instead of using the S3 Api.
Thanks for these metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

3 participants