You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installed it on Ubuntu 18.0.4 after upgrading the server, the installation using the installation script went smoothly, after than, the xAPI were not working.
It shows in the screenshot 2 instances for xAPI, the status of one keeps on launching with the error logs being added every second, the second xAPI status errored.
While trying to fix this, I reached that the first one is online and the second is stopped, even with the this, I have connected it to Moodle using logstore xAPI; statements are not passed.
Now it is running as per the next screenshot, but if I restart it returns to the issue in the first screenshot.
i didn't know what the coursing of this issue, but i solved it by adding code const { TextEncoder, TextDecoder } = require("util");on the top of file /usr/local/learninglocker/releases/ll-20230206-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/mongodb-connection-string-url/node_modules/whatwg-url/lib/encode.js.
@looperEit Thanks for the code, it worked just perfect. Still have a problem that it is not sending data from Moodle, although it is added using Logstore xAPI.
To know where does the problem reside, I connected logstore to the LRS of cloud.scorm.com, this worked fine and I have seen results, but when connecting the instance of learninglocker mentioned above, it does not provide any data, practically this means that the problem is till within learninglocker.
sorry i don't know. Now there is a new issue that have confused me mach time. i try to use Postman send xAPI statement to the Learning locker store. The configurations of client and postman is complete. But it did't work!
We are hoping that someone from learninglocker would help us in such situations.
I do not have any coding, I am using logstore xAPI which was created by learninglocker team, it is passing data correctly, but learninglocker itself is not receiving any.
@looperEit and me @SolutionsDEV both have problems with learninglocker, one thing in common and is obvious in screenshots that we both have xAPI as 2 entries.
Is it possible that this is the reason it is not responding?
I am referring to some contributors with hope someone would help.
@SolutionsDEV
I believe Cannot GET /data/xAPI is expected behaviour. A GET on /data/xAPI/statements should give results if the Authorization header is correctly set.
@looperEit Your second set of screenshots without the trailing comma in the POST request is to a different URL. To send in a statement it needs to be to /data/xAPI/statements as you first had.
@looperEit
It looks like the UI is working but all requests to the xAPI Service via paths starting with /data/xAPI give a 502 Bad Gateway. This suggests that maybe the xAPI Service is not running properly and nginx is failing to forward on the requests.
Your message on #1627 has screenshots that appear to back this up if you are still having the same errors in pm2 logs from the xAPI service.
Hello, may I ask if your installation was successful? Does the Xapi service report no error? What is your system configuration like? After I installed it on my Ubuntu18, the Xapi service could not be started, and I have not been able to find a solution.
Previously it was giving 500 suggesting that the requests were being processed but with an error:
sorry i don't know. Now there is a new issue that have confused me mach time. i try to use Postman send xAPI statement to the Learning locker store. The configurations of client and postman is complete. But it did't work!
从那时到现在,你有什么改变吗?
At that time, I installed LL on a virtual machine on my own computer. PC-VM-Ubuntu20. Now I installed LL on my school server. server-Ubuntu20. But I used the official deployLL.sh to install and did not make any changes. So I wonder why the Xapi service can't receive it. And using postman to send statements also reported an error.
pm2 logs like:
`learninglocker@ubuntu18:/usr/local/learninglocker/current/xapi$ pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/learninglocker/.pm2/pm2.log last 15 lines:
PM2 | 2023-04-05T06:06:12: PM2 log: pid=30586 msg=process killed
PM2 | 2023-04-05T06:06:12: PM2 log: App [xAPI:5] starting in -cluster mode-
PM2 | Error: EACCES: permission denied, open '/var/run/xapi-5.pid'
PM2 | at Object.openSync (fs.js:443:3)
PM2 | at Object.writeFileSync (fs.js:1194:35)
PM2 | at ProcessContainer (/usr/lib/node_modules/pm2/lib/ProcessContainer.js:71:10)
PM2 | at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainer.js:104:3)
PM2 | at Module._compile (internal/modules/cjs/loader.js:778:30)
PM2 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
PM2 | at Module.load (internal/modules/cjs/loader.js:653:32)
PM2 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
PM2 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
PM2 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
PM2 | 2023-04-05T06:06:38: PM2 log: App [xAPI:4] online
PM2 | 2023-04-05T06:06:42: PM2 log: App [xAPI:5] online
/var/log/learninglocker/ui_stderr-1.log last 15 lines:
1|UIServer | (node:26408) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:29712) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:9205) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engi ne, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:16084) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:18438) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:29636) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:30427) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:32342) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/var/log/learninglocker/ui_stdout-1.log last 15 lines:
1|UIServer | ==> 💻 Open http://127.0.0.1 in a browser to view the app.
1|UIServer | ---
1|UIServer |
1|UIServer | 2023-04-05 06:01:31:276 - info:
1|UIServer | ---
1|UIServer | ==> ✅ Learning Locker is running, talking to API server on 8080.
1|UIServer | ==> 💻 Open http://127.0.0.1 in a browser to view the app.
1|UIServer | ---
1|UIServer |
1|UIServer | 2023-04-05 06:06:06:619 - info:
1|UIServer | ---
1|UIServer | ==> ✅ Learning Locker is running, talking to API server on 8080.
1|UIServer | ==> 💻 Open http://127.0.0.1 in a browser to view the app.
1|UIServer | ---
1|UIServer |
/var/log/learninglocker/api_stdout-0.log last 15 lines:
0|API | ==> 💻 Send requests to http://undefined:8080
0|API | ---
0|API |
0|API | 2023-04-05 06:01:32:268 - info:
0|API | ---
0|API | ==> 🌎 API is running on port 8080
0|API | ==> 💻 Send requests to http://undefined:8080
0|API | ---
0|API |
0|API | 2023-04-05 06:06:07:271 - info:
0|API | ---
0|API | ==> 🌎 API is running on port 8080
0|API | ==> 💻 Send requests to http://undefined:8080
0|API | ---
0|API |
/var/log/learninglocker/scheduler_stderr-3.log last 15 lines:
3|Schedule | (node:26485) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:29961) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:9455) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engi ne, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:16212) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:18516) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:29716) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:30513) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:32428) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/var/log/learninglocker/worker_stderr-2.log last 15 lines:
2|Worker | (node:26449) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:26449) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
2|Worker | (node:29865) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:9365) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engi ne, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:16163) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:18492) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:29679) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:30476) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:32394) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/var/log/learninglocker/xapi_stderr-4.log last 15 lines:
4|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)',
4|xAPI | ' at require (internal/modules/cjs/helpers.js:25:18)',
4|xAPI | ' at Object. (/usr/local/learninglocker/releases/ll-20230404-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermi ssionCommand.js:8:21)',
4|xAPI | ' at Module._compile (internal/modules/cjs/loader.js:778:30)',
4|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)' ] }
/var/log/learninglocker/xapi_stdout-4.log last 15 lines:
4|xAPI | 2023-04-05 05:20:21:545 - info: Starting retry 1 in 1000ms
4|xAPI | 2023-04-05 05:20:52:566 - info: Starting retry 2 in 1000ms
4|xAPI | 2023-04-05 05:21:23:581 - info: Starting retry 3 in 1000ms
4|xAPI | 2023-04-05 05:24:55:272 - info: Created new Mongo connection
4|xAPI | 2023-04-05 05:59:50:494 - info: Created new Mongo connection
4|xAPI | 2023-04-05 06:01:35:629 - info: Created new Mongo connection
4|xAPI | 2023-04-05 06:06:12:552 - info: Created new Mongo connection
/var/log/learninglocker/xapi_stderr-5.log last 15 lines:
5|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
5|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
5|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
5|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
5|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
5|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)',
5|xAPI | ' at require (internal/modules/cjs/helpers.js:25:18)',
5|xAPI | ' at Object. (/usr/local/learninglocker/releases/ll-20230404-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermi ssionCommand.js:8:21)',
5|xAPI | ' at Module._compile (internal/modules/cjs/loader.js:778:30)',
5|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
5|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
5|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
5|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
5|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
5|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)' ] }
/var/log/learninglocker/xapi_stdout-5.log last 15 lines:
5|xAPI | 2023-04-05 05:20:24:234 - info: Starting retry 1 in 1000ms
5|xAPI | 2023-04-05 05:20:55:253 - info: Starting retry 2 in 1000ms
5|xAPI | 2023-04-05 05:21:26:270 - info: Starting retry 3 in 1000ms
5|xAPI | 2023-04-05 05:25:00:069 - info: Created new Mongo connection
5|xAPI | 2023-04-05 05:59:53:365 - info: Created new Mongo connection
5|xAPI | 2023-04-05 06:01:38:567 - info: Created new Mongo connection
5|xAPI | 2023-04-05 06:06:15:094 - info: Created new Mongo connection
/var/log/learninglocker/api_stderr-0.log last 15 lines:
0|API | ine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor .
0|API | (node:16078) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:16078) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:16078) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
0|API | (node:18434) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:18434) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:29630) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:29630) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:29630) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
0|API | (node:30421) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:30421) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:32336) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:32336) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:32336) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
`
The previous time, that is, the statements were able to be sent, but the error 502 was reported. There is no fix for this bug const { TextEncoder, TextDecoder } = require("util");.
This time the nginx error was reported, which fixed the proble
I have tried to deploy LL on Ubuntu16, 18, and 20. First, there will be a problem that the Xapi service cannot be launched.
After I fix the const { TextEncoder, TextDecoder } = require("util");, . the xapi service can be started successfully, but there is no way to send statements, and a new bug appears. That is, the nginx error you see is reported when the statements are sent.
I experienced the same "TextEncoder" issue and fixed it with the suggested fix in this issue.
Though I now get:
xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/protocols/Aws_query.js:1100
if (input.AWSAccountIds?.length === 0) {
^
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/learninglocker/releases/ll-20230910-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermissionCommand.js:8:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
Activity
looperEit commentedon Feb 8, 2023
i also got this issue,there is no way to make it.

looperEit commentedon Feb 8, 2023
logs like:

looperEit commentedon Feb 8, 2023
i didn't know what the coursing of this issue, but i solved it by adding code
const { TextEncoder, TextDecoder } = require("util");on the top of file/usr/local/learninglocker/releases/ll-20230206-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/mongodb-connection-string-url/node_modules/whatwg-url/lib/encode.js.maybe it is a version issue of nodejs.


SolutionsDEV commentedon Feb 8, 2023
@looperEit Thanks for the code, it worked just perfect. Still have a problem that it is not sending data from Moodle, although it is added using Logstore xAPI.
Any ideas what to do?
Thanks,
SolutionsDEV commentedon Feb 8, 2023
To know where does the problem reside, I connected logstore to the LRS of cloud.scorm.com, this worked fine and I have seen results, but when connecting the instance of learninglocker mentioned above, it does not provide any data, practically this means that the problem is till within learninglocker.
Any help appreciated.
Thanks,
looperEit commentedon Feb 9, 2023
sorry i don't know. Now there is a new issue that have confused me mach time. i try to use Postman send xAPI statement to the Learning locker store. The configurations of client and postman is complete. But it did't work!



SolutionsDEV commentedon Feb 9, 2023
We are hoping that someone from learninglocker would help us in such situations.
I do not have any coding, I am using logstore xAPI which was created by learninglocker team, it is passing data correctly, but learninglocker itself is not receiving any.
@looperEit and me @SolutionsDEV both have problems with learninglocker, one thing in common and is obvious in screenshots that we both have xAPI as 2 entries.
Is it possible that this is the reason it is not responding?
I am referring to some contributors with hope someone would help.
@ryansmith94 @ht2 @cbishopvelti @davetosh
SolutionsDEV commentedon Feb 9, 2023
When I visit http://local.ip/data/xAPI it replies with:
Cannot GET /data/xAPI
Is this normal?
looperEit commentedon Feb 9, 2023
i got too. I am referring to some contributors with hope someone would help.
ToranSharma commentedon Feb 9, 2023
@looperEit,
Try your POST request to the xAPI endpoint without the trailing commas on line 4 and 8 that Postman is warning you about.
looperEit commentedon Mar 30, 2023
The problem still exists, and after I complete the configuration, an nginx error occurs when I visit this page.
@ToranSharma
looperEit commentedon Mar 30, 2023
SolutionsDEV commentedon Mar 30, 2023
Problems still exist, I am wondering if anyone has got it working fine at all. Still no feedback from the developers.
ToranSharma commentedon Apr 5, 2023
@SolutionsDEV
I believe
Cannot GET /data/xAPIis expected behaviour. AGETon/data/xAPI/statementsshould give results if theAuthorizationheader is correctly set.@looperEit Your second set of screenshots without the trailing comma in the POST request is to a different URL. To send in a statement it needs to be to
/data/xAPI/statementsas you first had.looperEit commentedon Apr 5, 2023
as you see. i did.But there is also a issue.
ToranSharma commentedon Apr 5, 2023
@looperEit
It looks like the UI is working but all requests to the xAPI Service via paths starting with
/data/xAPIgive a502 Bad Gateway. This suggests that maybe the xAPI Service is not running properly and nginx is failing to forward on the requests.Your message on #1627 has screenshots that appear to back this up if you are still having the same errors in
pm2 logsfrom the xAPI service.Previously it was giving 500 suggesting that the requests were being processed but with an error:
Did you change anything between then and now?
looperEit commentedon Apr 5, 2023
looperEit commentedon Apr 5, 2023
pm2 logs like:
`learninglocker@ubuntu18:/usr/local/learninglocker/current/xapi$ pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/learninglocker/.pm2/pm2.log last 15 lines:
PM2 | 2023-04-05T06:06:12: PM2 log: pid=30586 msg=process killed
PM2 | 2023-04-05T06:06:12: PM2 log: App [xAPI:5] starting in -cluster mode-
PM2 | Error: EACCES: permission denied, open '/var/run/xapi-5.pid'
PM2 | at Object.openSync (fs.js:443:3)
PM2 | at Object.writeFileSync (fs.js:1194:35)
PM2 | at ProcessContainer (/usr/lib/node_modules/pm2/lib/ProcessContainer.js:71:10)
PM2 | at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainer.js:104:3)
PM2 | at Module._compile (internal/modules/cjs/loader.js:778:30)
PM2 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
PM2 | at Module.load (internal/modules/cjs/loader.js:653:32)
PM2 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
PM2 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
PM2 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
PM2 | 2023-04-05T06:06:38: PM2 log: App [xAPI:4] online
PM2 | 2023-04-05T06:06:42: PM2 log: App [xAPI:5] online
/var/log/learninglocker/ui_stderr-1.log last 15 lines:
1|UIServer | (node:26408) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:29712) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:9205) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engi ne, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:16084) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:18438) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:29636) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:30427) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
1|UIServer | (node:32342) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/var/log/learninglocker/ui_stdout-1.log last 15 lines:
1|UIServer | ==> 💻 Open http://127.0.0.1 in a browser to view the app.
1|UIServer | ---
1|UIServer |
1|UIServer | 2023-04-05 06:01:31:276 - info:
1|UIServer | ---
1|UIServer | ==> ✅ Learning Locker is running, talking to API server on 8080.
1|UIServer | ==> 💻 Open http://127.0.0.1 in a browser to view the app.
1|UIServer | ---
1|UIServer |
1|UIServer | 2023-04-05 06:06:06:619 - info:
1|UIServer | ---
1|UIServer | ==> ✅ Learning Locker is running, talking to API server on 8080.
1|UIServer | ==> 💻 Open http://127.0.0.1 in a browser to view the app.
1|UIServer | ---
1|UIServer |
/var/log/learninglocker/api_stdout-0.log last 15 lines:
0|API | ==> 💻 Send requests to http://undefined:8080
0|API | ---
0|API |
0|API | 2023-04-05 06:01:32:268 - info:
0|API | ---
0|API | ==> 🌎 API is running on port 8080
0|API | ==> 💻 Send requests to http://undefined:8080
0|API | ---
0|API |
0|API | 2023-04-05 06:06:07:271 - info:
0|API | ---
0|API | ==> 🌎 API is running on port 8080
0|API | ==> 💻 Send requests to http://undefined:8080
0|API | ---
0|API |
/var/log/learninglocker/scheduler_stderr-3.log last 15 lines:
3|Schedule | (node:26485) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:29961) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:9455) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engi ne, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:16212) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:18516) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:29716) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:30513) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
3|Schedule | (node:32428) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/var/log/learninglocker/worker_stderr-2.log last 15 lines:
2|Worker | (node:26449) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:26449) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
2|Worker | (node:29865) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:9365) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engi ne, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:16163) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:18492) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:29679) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:30476) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2|Worker | (node:32394) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/var/log/learninglocker/worker_stdout-2.log last 15 lines:
2|Worker | 2023-04-05 06:06:12:320 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:321 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:321 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:321 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:344 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:345 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:346 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:347 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:347 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:348 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:349 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:349 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:350 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:351 - info: Creating Redis client
2|Worker | 2023-04-05 06:06:12:363 - info: Creating Redis client
/var/log/learninglocker/xapi_stderr-4.log last 15 lines:
4|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)',
4|xAPI | ' at require (internal/modules/cjs/helpers.js:25:18)',
4|xAPI | ' at Object. (/usr/local/learninglocker/releases/ll-20230404-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermi ssionCommand.js:8:21)',
4|xAPI | ' at Module._compile (internal/modules/cjs/loader.js:778:30)',
4|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)' ] }
/var/log/learninglocker/xapi_stdout-4.log last 15 lines:
4|xAPI | 2023-04-05 05:20:21:545 - info: Starting retry 1 in 1000ms
4|xAPI | 2023-04-05 05:20:52:566 - info: Starting retry 2 in 1000ms
4|xAPI | 2023-04-05 05:21:23:581 - info: Starting retry 3 in 1000ms
4|xAPI | 2023-04-05 05:24:55:272 - info: Created new Mongo connection
4|xAPI | 2023-04-05 05:59:50:494 - info: Created new Mongo connection
4|xAPI | 2023-04-05 06:01:35:629 - info: Created new Mongo connection
4|xAPI | 2023-04-05 06:06:12:552 - info: Created new Mongo connection
/var/log/learninglocker/xapi_stderr-5.log last 15 lines:
5|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
5|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
5|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
5|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
5|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
5|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)',
5|xAPI | ' at require (internal/modules/cjs/helpers.js:25:18)',
5|xAPI | ' at Object. (/usr/local/learninglocker/releases/ll-20230404-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermi ssionCommand.js:8:21)',
5|xAPI | ' at Module._compile (internal/modules/cjs/loader.js:778:30)',
5|xAPI | ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
5|xAPI | ' at Module.load (internal/modules/cjs/loader.js:653:32)',
5|xAPI | ' at tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
5|xAPI | ' at Function.Module._load (internal/modules/cjs/loader.js:585:3)',
5|xAPI | ' at Module.require (internal/modules/cjs/loader.js:692:17)',
5|xAPI | ' at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)' ] }
/var/log/learninglocker/xapi_stdout-5.log last 15 lines:
5|xAPI | 2023-04-05 05:20:24:234 - info: Starting retry 1 in 1000ms
5|xAPI | 2023-04-05 05:20:55:253 - info: Starting retry 2 in 1000ms
5|xAPI | 2023-04-05 05:21:26:270 - info: Starting retry 3 in 1000ms
5|xAPI | 2023-04-05 05:25:00:069 - info: Created new Mongo connection
5|xAPI | 2023-04-05 05:59:53:365 - info: Created new Mongo connection
5|xAPI | 2023-04-05 06:01:38:567 - info: Created new Mongo connection
5|xAPI | 2023-04-05 06:06:15:094 - info: Created new Mongo connection
/var/log/learninglocker/api_stderr-0.log last 15 lines:
0|API | ine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor .
0|API | (node:16078) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:16078) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:16078) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
0|API | (node:18434) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:18434) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:29630) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:29630) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:29630) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
0|API | (node:30421) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:30421) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:32336) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
0|API | (node:32336) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods ins tead.
0|API | (node:32336) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
/var/log/learninglocker/scheduler_stdout-3.log last 15 lines:
3|Schedule | 2023-04-05 05:59:50:279 - info: Creating Redis client
3|Schedule | 2023-04-05 05:59:50:286 - info: Creating Redis client
3|Schedule | 2023-04-05 05:59:50:290 - info: The first org usage tracking is at Thu Apr 06 2023 03:00:00 GMT+0000 (Coordinated Universal Time)
3|Schedule | 2023-04-05 05:59:50:322 - info: processing expiration
3|Schedule | 2023-04-05 06:01:35:338 - info: Creating Redis client
3|Schedule | 2023-04-05 06:01:35:345 - info: Creating Redis client
3|Schedule | 2023-04-05 06:01:35:348 - info: The first org usage tracking is at Thu Apr 06 2023 03:00:00 GMT+0000 (Coordinated Universal Time)
3|Schedule | 2023-04-05 06:01:35:377 - info: processing expiration
3|Schedule | 2023-04-05 06:06:10:917 - info: Creating Redis client
3|Schedule | 2023-04-05 06:06:10:935 - info: Creating Redis client
3|Schedule | 2023-04-05 06:06:10:946 - info: The first org usage tracking is at Thu Apr 06 2023 03:00:00 GMT+0000 (Coordinated Universal Time)
3|Schedule | 2023-04-05 06:06:11:028 - info: processing expiration
3|Schedule | 2023-04-05 06:21:10:953 - info: processing expiration
3|Schedule | 2023-04-05 06:36:10:953 - info: processing expiration
3|Schedule | 2023-04-05 06:51:10:954 - info: processing expiration
current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring eng ine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
`
ToranSharma commentedon Apr 5, 2023
It looks like there are errors some errors in the xAPI error log:
Are these different to the ones you fixed with the
const { TextEncoder, TextDecoder } = require("util");previously?looperEit commentedon Apr 5, 2023
The previous time, that is, the statements were able to be sent, but the error 502 was reported. There is no fix for this bug
const { TextEncoder, TextDecoder } = require("util");.This time the nginx error was reported, which fixed the proble
looperEit commentedon Apr 5, 2023
I have tried to deploy LL on Ubuntu16, 18, and 20. First, there will be a problem that the Xapi service cannot be launched.




After I fix the
const { TextEncoder, TextDecoder } = require("util");,. the xapi service can be started successfully, but there is no way to send statements, and a new bug appears. That is, the nginx error you see is reported when the statements are sent.looperEit commentedon Apr 6, 2023
hello? is there any question?
canni-42 commentedon Sep 10, 2023
I experienced the same "TextEncoder" issue and fixed it with the suggested fix in this issue.
Though I now get:
(Related issue @ aws/aws-sdk-js-v3 #4144)
The endpoint: 'https://lrs-host/data/xAPI/statements' gets me a status code 502.
How do I get the xAPI service back running?