簡體   English   中英

創建新的 FiwareService 時 Orion CB 中的錯誤 500

[英]Error 500 in Orion CB when creating a new FiwareService

我在 MongoDB 4.0.5 之上使用 Fiware Orion CB 版本 2.1.0。 一旦我啟動它,一切似乎都可以正常工作,但是,經過一段時間(幾天)攝取數據沒有問題,現在,每次我嘗試在新的 fiwareservice 中創建新實體時,我都會收到來自 OrionCB 的 500 錯誤(如果我嘗試在現有的 FS 中創建相同的實體,它可以工作),並且我必須重新啟動 Mongo 和 Orion 容器才能使這個新的 FS 創建工作。

請求是:

curl --location --request POST 'context.infinitech.easier-ai.eu/v2/entities/' \
--header 'fiware-service: itscenterctag' \
--header 'fiware-servicepath: /vehicle' \
--header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw ' {
        "id": "TEST",
        "type": "test",
        "dateObserved": {
            "type": "DateTime",
            "value": "2020-10-02T14:00:00.00Z",
            "metadata": {}
        },
        "test": {
            "type": "Number",
            "value": 6.1,
            "metadata": {
                "timestamp": {
                    "type": "DateTime",
                    "value": "2020-10-02T14:00:00.00Z"
                }
            }
        },
        "location": {
            "type": "geo:json",
            "value": {
                "type": "Point",
                "coordinates": [
                    -7.733611,
                    42.079166
                ]
            },
            "metadata": {}
        },
        "name": {
            "type": "Text",
            "value": "test",
            "metadata": {}
        }
    }'

獵戶座回應:

{
    "error": "InternalError",
    "description": "Database Error (collection: orion-itscenterctag.entities - insert(): { _id: { id: "TEST", type: "test", servicePath: "/vehicle" }, attrNames: [ "dateObserved", "test", "location", "name" ], attrs: { dateObserved: { type: "DateTime", creDate: 1603208149, modDate: 1603208149, value: 1601647200.0, mdNames: [] }, test: { type: "Number", creDate: 1603208149, modDate: 1603208149, value: 6.1, md: { timestamp: { type: "DateTime", value: 1601647200.0 } }, mdNames: [ "timestamp" ] }, location: { type: "geo:json", creDate: 1603208149, modDate: 1603208149, value: { type: "Point", coordinates: [ -7.733611, 42.079166 ] }, mdNames: [] }, name: { type: "Text", creDate: 1603208149, modDate: 1603208149, value: "test", mdNames: [] } }, creDate: 1603208149, modDate: 1603208149, location: { attrName: "location", coords: { type: "Point", coordinates: [ -7.733611, 42.079166 ] } }, lastCorrelator: "ec0dba3a-12e9-11eb-a65d-52e1fcc227da" } - exception: OperationException: { index: 0, code: 8, errmsg: "1: Operation not permitted", op: { _id: { id: "TEST", type: "test", servicePath: "/vehicle" }, attrNames: [ "dateObserved", "test", "location", "name" ], attrs: { dateObserved: { type: "DateTime", creDate: 1603208149, modDate: 1603208149, value: 1601647200.0, mdNames: [] }, test: { type: "Number", creDate: 1603208149, modDate: 1603208149, value: 6.1, md: { timestamp: { type: "DateTime", value: 1601647200.0 } }, mdNames: [ "timestamp" ] }, location: { type: "geo:json", creDate: 1603208149, modDate: 1603208149, value: { type: "Point", coordinates: [ -7.733611, 42.079166 ] }, mdNames: [] }, name: { type: "Text", creDate: 1603208149, modDate: 1603208149, value: "test", mdNames: [] } }, creDate: 1603208149, modDate: 1603208149, location: { attrName: "location", coords: { type: "Point", coordinates: [ -7.733611, 42.079166 ] } }, lastCorrelator: "ec0dba3a-12e9-11eb-a65d-52e1fcc227da" } })"
}

從 MongoDB 日志我得到:

2020-10-20T15:35:49.592+0000 E STORAGE  [conn1] WiredTiger error (1) [1603208149:592173][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-18--6388608708582174430.wt: handle-open: open: Operation not permitted Raw: [1603208149:592173][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-18--6388608708582174430.wt: handle-open: open: Operation not permitted
2020-10-20T15:35:49.592+0000 E -        [conn1] Assertion: UnknownError: 1: Operation not permitted src/mongo/db/catalog/database_impl.cpp 831
2020-10-20T15:35:49.597+0000 I STORAGE  [conn1] createCollection: orion-itscenterctag.entities with generated UUID: a9c4273f-cddd-42bf-af6b-cbd96cbe034d
2020-10-20T15:35:49.598+0000 E STORAGE  [conn1] WiredTiger error (1) [1603208149:598543][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-19--6388608708582174430.wt: handle-open: open: Operation not permitted Raw: [1603208149:598543][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-19--6388608708582174430.wt: handle-open: open: Operation not permitted
2020-10-20T15:35:49.598+0000 E -        [conn1] Assertion: UnknownError: 1: Operation not permitted src/mongo/db/catalog/database_impl.cpp 831
2020-10-20T15:35:49.598+0000 I STORAGE  [conn1] createCollection: orion-itscenterctag.entities with generated UUID: 49b14431-f217-48e7-93ed-d2f2f8e7a4fc
2020-10-20T15:35:49.600+0000 E STORAGE  [conn1] WiredTiger error (1) [1603208149:600253][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-20--6388608708582174430.wt: handle-open: open: Operation not permitted Raw: [1603208149:600253][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-20--6388608708582174430.wt: handle-open: open: Operation not permitted
2020-10-20T15:35:49.600+0000 E -        [conn1] Assertion: UnknownError: 1: Operation not permitted src/mongo/db/catalog/database_impl.cpp 831
2020-10-20T15:35:49.600+0000 I STORAGE  [conn1] createCollection: orion-itscenterctag.entities with generated UUID: 600ec5a0-6841-4948-93c8-4fd062223479
2020-10-20T15:35:49.601+0000 E STORAGE  [conn1] WiredTiger error (1) [1603208149:601495][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-21--6388608708582174430.wt: handle-open: open: Operation not permitted Raw: [1603208149:601495][1:0x7ff40cab4700], WT_SESSION.create: __posix_open_file, 715: /data/db/collection-21--6388608708582174430.wt: handle-open: open: Operation not permitted
2020-10-20T15:35:49.601+0000 E -        [conn1] Assertion: UnknownError: 1: Operation not permitted src/mongo/db/catalog/database_impl.cpp 831

更新:

這僅在嘗試創建新 FiwareService 時發生(通過在新 FS 中創建新實體)。 在已創建的 FS 中管理任何現有實體工作正常。

更新二:(根據評論)

> use orion-foo
switched to db orion-foo
> db.entities.insert({x:1})
WriteResult({
        "nInserted" : 0,
        "writeError" : {
                "code" : 8,
                "errmsg" : "1: Operation not permitted"
        }
})

考慮到 UPDATEII 中的信息,問題似乎出在 MongoDB 實例本身,而不是在 Orion 中。 我的意思是,mongo shell 的失敗表明數據庫本身不允許創建新數據庫(無論是誰在創建它們,無論是 Orion,你在 mongo shell 還是連接到 MongoDB 的第三個應用程序)。

因此,我建議檢查您的數據庫設置。 有點令人驚訝的是,根據報告,它在開始時有效,但一段時間后開始失敗。 也許某些帶外操作(即管理過程)正在移動中更改權限?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM