The issue of FiberHome ONUs and other CPEs failing to establish a connection has been resolved optimally

event: incoming HTTP request
timestamp: 2024-08-08T01:33:21.153Z
remoteAddress: “::ffff:192.168.10.20”
deviceId: 6C3845-MR820%2DKK-CAAD96C3845D197B0
connection: 2024-08-08T01:33:21.153Z
localPort: 9090
method: POST
url: /
headers:
host: 192.168.10.178:9090
user-agent: TR069_AGENT/1.0
content-length: “3307”
connection: keep-alive
content-type: text/xml; charset=utf-8
soapaction: “”
body: >

event: outgoing HTTP response
timestamp: 2024-08-08T01:33:21.154Z
remoteAddress: “::ffff:192.168.10.20”
deviceId: 6C3845-MR820%2DKK-CAAD96C3845D197B0
connection: 2024-08-08T01:33:21.153Z
statusCode: 200
headers:
content-length: 530
server: GenieACS/1.2.13+240808efdd
soapserver: GenieACS/1.2.13+240808efdd
content-type: text/xml; charset=“utf-8”
set-cookie: session=cfd19ec34cc8fdf1
body: >-

<?xml version="1.0" encoding="UTF-8"?>

// inform 函数优化版本
async function inform(
sessionContext: SessionContext,
rpc: SoapMessage,
): Promise<{ code: number; headers: Record<string, string>; data: string }> {
// 获取会话锁
if (!sessionContext.lock) {
sessionContext.lock = true;
} else {
// 如果会话已经在处理中,返回 400 错误,提示 CPE 已在会话中
return {
code: 400,
headers: {
‘Content-Length’: ‘19’,
‘Connection’: ‘close’,
},
data: ‘CPE 已在会话中’,
};
}

try {
// 处理 Inform 请求
const acsResponse = await session.inform(
sessionContext,
rpc.cpeRequest as InformRequest,
);

const res = soap.response({
  id: rpc.id,
  acsResponse: acsResponse,
  cwmpVersion: sessionContext.cwmpVersion,
});

// 设置 Cookie
const cookiesPath = localCache.getConfig(
  sessionContext.cacheSnapshot,
  "cwmp.cookiesPath",
  {},
  sessionContext.timestamp,
  (e) => session.configContextCallback(sessionContext, e),
);

res.headers["Set-Cookie"] = `session=${sessionContext.sessionId}; Path=${cookiesPath || '/'}`;

return res;

} catch (error) {
// 错误处理
console.error(‘Inform request processing error:’, error);
return {
code: 500,
headers: {},
data: ‘Internal Server Error’,
};
} finally {
// 释放会话锁
sessionContext.lock = false;
}
}

Perfect, solved the issue of some CPEs failing to come online. There was a bug in inform, which I have optimized. After optimization, all CPEs can now come online normally. File directory:/lib/cwmp.ts

按照你的配置修改源文件,还是出现以下bug

2026-03-18T16:39:57.110Z [ERROR] ::ffff:192.168.147.78 28BF89-HG260GS%2Df-9D5ED28BF8983E93A: 任务超时; 时间戳=1773851966090
2026-03-18T16:44:26.142Z [INFO] ::ffff:192.168.147.78 28BF89-HG260GS%2Df-9D5ED28BF8983E93A: Inform; cpeRequestId=“856800168” informEvent=“0 BOOTSTRAP,6 CONNECTION REQUEST,2 PERIODIC,4 VALUE CHANGE” informRetryCount=0
2026-03-18T16:44:57.155Z [ERROR] ::ffff:192.168.147.78 28BF89-HG260GS%2Df-9D5ED28BF8983E93A: 任务超时; 时间戳=1773852266132

接入到秒开tr069acs 就没有问题。。

请用英语创建一个新话题。请不要重新打开两年前的话题。