View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000293 | easycwmp | Bug | public | 2017-09-13 16:21 | 2017-10-20 11:55 |
Reporter | okraits | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | assigned | Resolution | open | ||
Platform | Any | OS | OpenWRT/LEDE | OS Version | 17.01 |
Summary | 0000293: easycwmp exists after file download | ||||
Description | I added additional filetypes in the easycwmp.sh script (certificates, etc) and noticed that easycwmp exits after a successfull download (https://github.com/pivasoftware/easycwmp/blob/master/src/cwmp.c#L484). In my experience this leads to issues if there are several downloads queued for execution. Why does easycwmp exit after download? The TR069 specification doesn't require to do this. | ||||
Tags | No tags attached. | ||||
e-mail notification | |||||
|
For your additional filetypes script, you should return as status = 0 in the apply download |
|
What's the reasoning behind not returning 1 like the other filetypes? This doesn't work either, the session after the download fails: Thu Sep 14 08:10:03 2017 daemon.notice easycwmpd: acs initiated connection Thu Sep 14 08:10:03 2017 daemon.notice easycwmpd: add event '6 CONNECTION REQUEST' Thu Sep 14 08:10:03 2017 daemon.notice easycwmpd: start session Thu Sep 14 08:10:03 2017 daemon.notice easycwmpd: configured acs url https://acs:7547/genieacs Thu Sep 14 08:10:03 2017 daemon.notice easycwmpd: external script init Thu Sep 14 08:10:04 2017 daemon.notice easycwmpd: external: execute inform parameter Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: send Inform Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: receive InformResponse from the ACS Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: send empty message to the ACS Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: received Download method from the ACS Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: add download: delay = 0 sec, url = https://acs:7567/test.p12, FileType = '9 PKCS#12 File', CommandKey = '15e7f023858000' Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: send DownloadResponse to the ACS Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: receive empty message from the ACS Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: external: execute apply service Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: external script exit Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: end session success Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: start download url = https://acs:7567/test.p12, FileType = '9 PKCS#12 File', CommandKey = '15e7f023858000' Thu Sep 14 08:10:05 2017 daemon.notice easycwmpd: external script init Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: external: execute download Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: add event '7 TRANSFER COMPLETE' Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: add event 'M Download' Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: external: execute apply download 9 PKCS#12 File Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: external script exit Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: start session Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: configured acs url https://acs:7547/genieacs Thu Sep 14 08:10:06 2017 daemon.notice easycwmpd: external script init Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: external: execute inform parameter Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: send Inform Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: LibCurl Error: The requested URL returned error: 401 Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: sending http message failed Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: sending Inform failed Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: external: execute apply service Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: external script exit Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: end session failed Thu Sep 14 08:10:07 2017 daemon.notice easycwmpd: retry session in 7 sec, RetryCount = 1 |
|
traffic capture ? |
|
By the way, easycwmp does not exit any more after the apply. that solve your first question. seems that you change your download apply return to 0. For the new issue. I m not sure what could be the problem. if you can capture traffic. or launch easycwmpd with command /usr/sbin/easycwmpd -b that could show more log details. may be the file you downloaded are related to some cet file |
|
I know that using common_json_output_status "0" keeps easycwmpd from exiting. This basically means that in the function cwmp_download_launch the mark out is jumped to: https://github.com/pivasoftware/easycwmp/blob/master/src/cwmp.c#L491 What I noticed is that the next session fails because authentication against the ACS is broken (which was working before the download). easycwmpd tries to auth itself at nginx which is used as a reverse proxy in front of the ACS. From the nginx log: 2017/09/19 16:12:35 [error] 353#353: *389 user "transfer_complete" was not found in "/etc/nginx/ms-htpasswd", client: 10.1.3.107, server: acs, request: "POST /genieacs HTTP/1.1", host: "acs:7547" Looks like config->acs is corrupted or something. I can provide a traffic capture tomorrow if it helps. |
|
I finally had the time to debug this issue. The next session after the download fails because username and password of the config->acs struct is free'd in the function xml_handle_download: https://github.com/pivasoftware/easycwmp/blob/master/src/xml.c#L1398 This is redundant because the config->acs struct gets free'd in https://github.com/pivasoftware/easycwmp/blob/master/src/config.c#L124 anyway. So I would like to propose the following: Remove the lines https://github.com/pivasoftware/easycwmp/blob/master/src/cwmp.c#L484 https://github.com/pivasoftware/easycwmp/blob/master/src/xml.c#L1398 https://github.com/pivasoftware/easycwmp/blob/master/src/xml.c#L1399 https://github.com/pivasoftware/easycwmp/blob/master/src/xml.c#L1431 https://github.com/pivasoftware/easycwmp/blob/master/src/xml.c#L1432 to avoid that easycwmpd shuts down after file downloads. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-09-13 16:21 | okraits | New Issue | |
2017-09-13 18:11 | mohamed.kallel | Note Added: 0000799 | |
2017-09-14 08:14 | okraits | Note Added: 0000800 | |
2017-09-14 15:22 | mohamed.kallel | Note Added: 0000801 | |
2017-09-14 15:26 | mohamed.kallel | Note Added: 0000802 | |
2017-09-14 15:27 | mohamed.kallel | Note Edited: 0000802 | |
2017-09-15 17:40 |
|
Assigned To | => user13 |
2017-09-15 17:40 |
|
Status | new => feedback |
2017-09-19 16:25 | okraits | Note Added: 0000804 | |
2017-09-19 16:25 | okraits | Status | feedback => assigned |
2017-09-19 16:29 | okraits | Note Edited: 0000804 | |
2017-09-19 16:30 | okraits | Note Edited: 0000804 | |
2017-09-26 10:48 | okraits | Note Added: 0000805 | |
2017-09-26 10:50 | okraits | Note Edited: 0000805 |