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

xAPI Issues Making it Not Running #1625

Open
SolutionsDEV opened this issue Jan 30, 2023 · 23 comments
Open

xAPI Issues Making it Not Running #1625

SolutionsDEV opened this issue Jan 30, 2023 · 23 comments

Comments

@SolutionsDEV
Copy link

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.

image

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.

image

Any help will be appreciated.

Thanks,

@looperEit
Copy link

i also got this issue,there is no way to make it.
image

@looperEit
Copy link

logs like:
image

@looperEit
Copy link

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.
image
image

@SolutionsDEV
Copy link
Author

@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
Copy link
Author

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
Copy link

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!
image
image
image

@SolutionsDEV
Copy link
Author

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
Copy link
Author

When I visit http://local.ip/data/xAPI it replies with:
Cannot GET /data/xAPI

Is this normal?

@looperEit
Copy link

当我访问http://local.ip/data/xAPI时,它回复: Cannot GET /data/xAPI

这是正常的吗?

i got too. I am referring to some contributors with hope someone would help.

@ToranSharma
Copy link

@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
Copy link

image
The problem still exists, and after I complete the configuration, an nginx error occurs when I visit this page.
image

@ToranSharma

@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
Copy link

When I visit http://local.ip/data/xAPI it replies with: Cannot GET /data/xAPI

Is this normal?
The problem still exists, and after I complete the configuration, an nginx error occurs when I visit this page.

@SolutionsDEV
Copy link
Author

Problems still exist, I am wondering if anyone has got it working fine at all. Still no feedback from the developers.

@ToranSharma
Copy link

@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
Copy link

@SolutionsDEV 我相信Cannot GET /data/xAPI这是预期的行为。如果正确设置了标题,则GET应该/data/xAPI/statements给出结果。Authorization

@looperEit您在 POST 请求中没有尾随逗号的第二组屏幕截图指向不同的 URL。要发送声明,它需要/data/xAPI/statements像您最初那样。

image
as you see. i did.But there is also a issue.

@ToranSharma
Copy link

@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.
image
image

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!
image

Did you change anything between then and now?

@looperEit
Copy link

@looperEit 看起来 UI 正在工作,但所有通过/data/xAPI502 Bad Gateway. 这表明 xAPI 服务可能未正常运行并且 nginx 无法转发请求。

如果您在 xAPI 服务中仍然遇到相同的错误,您在#1627上的消息有屏幕截图似乎可以支持这一点。pm2 logs

你好,请问你安装成功了吗?Xapi服务没有报错吗?你的系统配置是什么样的?我在我的Ubuntu18上安装后,Xapi服务无法启动,一直没找到解决办法。
图像
图像

以前它给出 500 表明正在处理请求但有错误:

对不起,我不知道。现在有一个新问题让我很困惑。我尝试使用 Postman 将 xAPI 语句发送到 Learning locker store。client 和 postman 配置完成。但它没有用!
图像

从那时到现在,你有什么改变吗?
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.

@looperEit
Copy link

@looperEit 看起来 UI 正在工作,但所有通过/data/xAPI502 Bad Gateway. 这表明 xAPI 服务可能未正常运行并且 nginx 无法转发请求。

如果您在 xAPI 服务中仍然遇到相同的错误,您在#1627上的消息有屏幕截图似乎可以支持这一点。pm2 logs

你好,请问你安装成功了吗?Xapi服务没有报错吗?你的系统配置是什么样的?我在我的Ubuntu18上安装后,Xapi服务无法启动,一直没找到解决办法。
图像
图像

以前它给出 500 表明正在处理请求但有错误:

对不起,我不知道。现在有一个新问题让我很困惑。我尝试使用 Postman 将 xAPI 语句发送到 Learning locker store。client 和 postman 配置完成。但它没有用!
图像

从那时到现在,你有什么改变吗?

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
Copy link

It looks like there are errors some errors in the xAPI error log:

/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)' ] }

Are these different to the ones you fixed with the const { TextEncoder, TextDecoder } = require("util"); previously?

@looperEit
Copy link

看起来xAPI错误日志中有一些错误:

/var/log/learninglocker/xapi_stderr-4.log 最后 15 行:
4|xAPI | '在 Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | '在 Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | '在 tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | '在 Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | '在 Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI | ' 在 Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)',
4|xAPI | '需要(内部/模块/cjs/helpers.js:25:18)',
4|xAPI| '(/usr/local/learninglocker/releases/ll-20230404-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermi ssionCommand.js:8:21)', 4|
xAPI '在 Module._compile (internal/modules/cjs/loader.js:778:30)',
4|xAPI | '在 Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | '在 Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | '在 tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | '在 Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | '在 Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI|' 在 Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)' ] }

这些与您const { TextEncoder, TextDecoder } = require("util");之前修改的不一样吗?

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
Copy link

看起来xAPI错误日志中有一些错误:

/var/log/learninglocker/xapi_stderr-4.log 最后 15 行:
4|xAPI | '在 Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | '在 Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | '在 tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | '在 Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | '在 Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI | ' 在 Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)',
4|xAPI | '需要(内部/模块/cjs/helpers.js:25:18)',
4|xAPI| '(/usr/local/learninglocker/releases/ll-20230404-5fec948a823e372e740df521aa3684c8df1dcba7/xapi/node_modules/@aws-sdk/client-sqs/dist-cjs/commands/AddPermi ssionCommand.js:8:21)', 4|
xAPI '在 Module._compile (internal/modules/cjs/loader.js:778:30)',
4|xAPI | '在 Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)',
4|xAPI | '在 Module.load (internal/modules/cjs/loader.js:653:32)',
4|xAPI | '在 tryModuleLoad (internal/modules/cjs/loader.js:593:12)',
4|xAPI | '在 Function.Module._load (internal/modules/cjs/loader.js:585:3)',
4|xAPI | '在 Module.require (internal/modules/cjs/loader.js:692:17)',
4|xAPI|' 在 Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)' ] }

这些与您const { TextEncoder, TextDecoder } = require("util");之前修改的不一样吗?

I have tried to deploy LL on Ubuntu16, 18, and 20. First, there will be a problem that the Xapi service cannot be launched.
image
image
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.
image
image

@looperEit
Copy link

It looks like there are errors some errors in the xAPI error log:

/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)' ] }

Are these different to the ones you fixed with the const { TextEncoder, TextDecoder } = require("util"); previously?

hello? is there any question?

@canni-42
Copy link

canni-42 commented Sep 10, 2023

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)

(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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants