创建新FiwareService时Orion CB中出现错误500

创建新FiwareService时Orion CB中出现错误500,fiware,fiware-orion,Fiware,Fiware Orion,我在MongoDB 4.0.5之上使用Fiware Orion CB 2.1.0版。一旦我启动了它,一切似乎都很好,但是,经过一段时间(几天的时间)毫无问题地摄取数据后,现在,每次我尝试在新fiwareservice中创建一个新实体时,我都会从OrionCB收到一个500错误(如果我尝试在现有FS中创建相同的实体,它会工作),我必须重新启动这两个实体,Mongo和Orion容器来获得这个新的FS创建工作 请求是: curl --location --request POST 'context.i

我在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中管理任何现有实体都可以正常工作

更新二:(根据评论)


考虑到UPDATEII中的信息,问题似乎出在MongoDB实例本身,而不是Orion中。我的意思是,MongoShell的失败表明数据库本身不允许创建新数据库(无论是谁创建的数据库,Orion、MongoShell上的您还是连接到MongoDB的第三个应用程序)


因此,我建议您检查数据库设置。有点令人惊讶的是,根据报告,它在一开始工作,但一段时间后开始失败。可能某些带外操作(即管理流程)正在更改移动权限?

查询或更新现有实体如何?它有效吗?与正在退出实体的查询相同(此处不要直接作为注释输入。请升级问题帖子以包含信息:)已更新。(谢谢你的快速反应)还有一个问题。。。在系统出现故障的情况下(即,您从Orion获得500个响应),如果您尝试直接在MongoDB中创建一个新的DB,会发生什么情况?例如,使用mongoshell执行
使用orionfoo
然后
db.entities.insert({x:1})
更新(再次感谢)。猎户座(和Mongo)继续与已经存在的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"
        }
})