Informatievlaanderen / VSDS-LDES-E2E-message-generator

Message generator used for end-to-end testing the LDES components created as part of the VSDS project.
European Union Public License 1.2
0 stars 0 forks source link

2023-05-03 13:54:54 Error: EISDIR: illegal operation on a directory, read: test-message-generator:20230421T1043 #4

Closed xdxxxdx closed 1 year ago

xdxxxdx commented 1 year ago

E2E commit tag for sprint 25: VSDS-LDES-E2E-testing: 50091609d92389b58c6c5c6030c83c77c95a467

Scenario: 1.Follow the test plan https://github.com/Informatievlaanderen/VSDS-LDES-E2E-testing/tree/main/demos/023.nifi-workbench-upgrade

  1. run the docker compose --env-file .env up test-message-generator -d

Current result: test-message-generator crashed

Error:
2023-05-03 13:54:53 Arguments:  {
2023-05-03 13:54:53   _: [],
2023-05-03 13:54:53   silent: 'false',
2023-05-03 13:54:53   mimeType: 'application/ld+json',
2023-05-03 13:54:53   targetUrl: '',
2023-05-03 13:54:53   cron: '* * * * * *',
2023-05-03 13:54:53   template: '',
2023-05-03 13:54:53   templateFile: '/tmp/data/device.template.json'
2023-05-03 13:54:53 }
2023-05-03 13:54:53 Runs at:  * * * * * *
2023-05-03 13:54:54 node:fs:749
2023-05-03 13:54:54   handleErrorFromBinding(ctx);
2023-05-03 13:54:54   ^
2023-05-03 13:54:54 
2023-05-03 13:54:54 Error: EISDIR: illegal operation on a directory, read
2023-05-03 13:54:54     at Object.readSync (node:fs:749:3)
2023-05-03 13:54:54     at tryReadSync (node:fs:449:20)
2023-05-03 13:54:54     at readFileSync (node:fs:495:19)
2023-05-03 13:54:54     at CJ.<anonymous> (file:///usr/vsds/generator/index.js:18:74)
2023-05-03 13:54:54     at CJ.fireOnTick (/usr/vsds/generator/node_modules/cron/lib/job.js:102:23)
2023-05-03 13:54:54     at Timeout.callbackWrapper [as _onTimeout] (/usr/vsds/generator/node_modules/cron/lib/job.js:174:10)
2023-05-03 13:54:54     at listOnTimeout (node:internal/timers:569:17)
2023-05-03 13:54:54     at process.processTimers (node:internal/timers:512:7) {
2023-05-03 13:54:54   errno: -21,
2023-05-03 13:54:54   syscall: 'read',
2023-05-03 13:54:54   code: 'EISDIR'
2023-05-03 13:54:54 }
2023-05-03 13:54:54 
2023-05-03 13:54:54 Node.js v18.16.0
rorlic commented 1 year ago

I tested this on windows. Here are the results:

Test 1 If you run:

echo http://old-nifi-workflow:9012/ngsi/device > ./data/TARGETURL
docker compose up test-message-generator

All works fine.

Test 2 If you run (delete the file ./data/TARGETURL from test 1 first):

docker compose up test-message-generator

It fails with the message: Error: EISDIR: illegal operation on a directory, read -- the message you got. Note that Docker on Windows will create ./data/TARGETURL as a directory and that is why you see this error. So, I am pretty sure you forgot to execute that line to create this as a file.

Test 3 If you run (without deleting the directory from test 2):

echo http://old-nifi-workflow:9012/ngsi/device > ./data/TARGETURL

It fails with error: bash: ./data/TARGETURL: Is a directory -- obviously :slightly_smiling_face:

Test 4 If you run (deleting the directory but without deleting the container):

echo http://old-nifi-workflow:9012/ngsi/device > ./data/TARGETURL
docker compose up test-message-generator

The docker container fails to start with a very long error message because the docker container expects a directory while it is now a file.

Conclusion Please delete the test message generator container and the directory ./data/TARGETURL if they exist and run the commands from test 1 (from the README.md file).

xdxxxdx commented 1 year ago

TARGETURL file was not properly created. image became un-writable.

Configuration issue on: ghcr.io/informatievlaanderen/test-message-generator:20230502T1217