EasyCwmp

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000293easycwmp[All Projects] Bugpublic2017-09-13 16:212017-09-19 16:30
Reporterokraits 
Assigned ToAnis 
PrioritynormalSeveritymajorReproducibilityalways
StatusassignedResolutionopen 
PlatformAnyOSOpenWRT/LEDEOS Version17.01
Summary0000293: easycwmp exists after file download
DescriptionI 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000799)
mohamed.kallel (manager)
2017-09-13 18:11

For your additional filetypes script, you should return as status = 0 in the apply download
(0000800)
okraits (reporter)
2017-09-14 08:14

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
(0000801)
mohamed.kallel (manager)
2017-09-14 15:22

traffic capture ?
(0000802)
mohamed.kallel (manager)
2017-09-14 15:26
edited on: 2017-09-14 15:27

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

(0000804)
okraits (reporter)
2017-09-19 16:25
edited on: 2017-09-19 16:30

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.


- Issue History
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 View Revisions
2017-09-15 17:40 Anis Assigned To => Anis
2017-09-15 17:40 Anis 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 View Revisions
2017-09-19 16:30 okraits Note Edited: 0000804 View Revisions


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker