EasyCwmp - easycwmp
View Issue Details
0000322easycwmp[All Projects] Helppublic2018-05-09 12:472018-07-13 10:58
Rany.Li 
mohamed.kallel 
normalminoralways
resolvedno change required 
0000322: ubus initialization failed
I'm using easycwmp-1.6.1.
when i run “easycwmpd -f -b”,it will be stuck in initialize ubus server,then i check the code find :
if (read(ctx->sock.fd, &hdr, sizeof(hdr)) != sizeof(hdr))
because the function read was blocked by default,and there is no data form client,so it will be stuck.Then i change this with:
fcntl(ctx->sock.fd,F_SETFL,FNDELAY);
and it work,but it still prompt “ubus initialization failed”.
The acs server was openacs i used.
when i run 'easycwmpd -f -b' again,it will show :

So i want to know where am i wrong about the config or enviroment.

Please help me ,thanks.
1970-01-01 00:53:46 [easycwmp] NOTICE - external script init
config_init_local(58):: easycwmp.@local[0].interface=eth0
config_init_local(68):: easycwmp.@local[0].port=7547
config_init_local(86):: easycwmp.@local[0].ubus_socket=/var/run/ubus.sock
config_init_local(74):: easycwmp.@local[0].username=easycwmp
config_init_local(80):: easycwmp.@local[0].password=easycwmp
config_init_local(97):: easycwmp.@local[0].logging_level=3
config_init_acs(162):: easycwmp.@acs[0].url=http://192.168.1.11:8080/openacs/acs [^]
config_init_acs(168):: easycwmp.@acs[0].username=easycwmp
config_init_acs(174):: easycwmp.@acs[0].password=easycwmp
config_init_acs(180):: easycwmp.@acs[0].periodic_enable=1
config_init_acs(193):: easycwmp.@acs[0].periodic_time=0001-01-01T00:00:00Z
config_init_acs(186):: easycwmp.@acs[0].periodic_interval=1800
1970-01-01 00:53:47 [easycwmp] NOTICE - init periodic inform: reference time = n/a, interval = 1800
1970-01-01 00:53:47 [easycwmp] NOTICE - external: execute update_value_change
1970-01-01 00:53:53 [easycwmp] NOTICE - daemon started
main(307): 33333333333333333333333333333333333
1970-01-01 00:53:53 [easycwmp] NOTICE - external: execute inform device_id
1970-01-01 00:53:54 [easycwmp] NOTICE - external script exit
1970-01-01 00:53:54 [easycwmp] NOTICE - add event '1 BOOT'

main(330): ubus initialization failed

+++ HTTP SERVER CONFIGURATION +++
NOT BOUND TO IP
port: '7547'
--- HTTP SERVER CONFIGURATION ---
1970-01-01 00:53:54 [easycwmp] NOTICE - http server initialized
1970-01-01 00:53:54 [easycwmp] NOTICE - entering main loop
1970-01-01 00:53:54 [easycwmp] NOTICE - start session
+++ HTTP CLIENT CONFIGURATION +++
http_client_init(50):: url: http://192.168.1.11:8080/openacs/acs [^]
http_client_init(56):: ssl_verify: SSL certificate validation disabled.
--- HTTP CLIENT CONFIGURATION ---
1970-01-01 00:53:54 [easycwmp] NOTICE - configured acs url http://192.168.1.11:8080/openacs/acs [^]
1970-01-01 00:53:54 [easycwmp] NOTICE - external script init
1970-01-01 00:53:55 [easycwmp] NOTICE - external: execute inform parameter
[ 3238.370000] eth1_1 emac_lib_rxstatistics_counter: warn: system is overloaded : spend more ~10ms!
1970-01-01 00:53:59 [easycwmp] NOTICE - send Inform
+++ SEND HTTP REQUEST +++
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <soap_env:Envelope
xmlns:soap_env="http://schemas.xmlsoap.org/soap/envelope/" [^]
xmlns:soap_enc="http://schemas.xmlsoap.org/soap/encoding/" [^]
xmlns:xsd="http://www.w3.org/2001/XMLSchema" [^]
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^]
xmlns:cwmp="urn:dslforum-org:cwmp-1-2">
  <soap_env:Header>
   <cwmp:ID soap_env:mustUnderstand="1">1</cwmp:ID>
  </soap_env:Header>
  <soap_env:Body>
   <cwmp:Inform>
    <DeviceId>
     <Manufacturer>easycwmp</Manufacturer>
     <OUI>FFFFFF</OUI>
     <ProductClass>easycwmp</ProductClass>
     <SerialNumber>FFFFFF123456</SerialNumber>
    </DeviceId>
    <Event soap_enc:arrayType="cwmp:EventStruct[1]">
     <EventStruct>
      <EventCode>1 BOOT</EventCode>
      <CommandKey />
     </EventStruct>
    </Event>
    <MaxEnvelopes>1</MaxEnvelopes>
    <CurrentTime>1970-01-01T00:53:55+00:00</CurrentTime>
    <RetryCount>0</RetryCount>
    <ParameterList soap_enc:arrayType="cwmp:ParameterValueStruct[10]">
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>
      <Value xsi:type="xsd:string">1.0</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.Manufacturer</Name>
      <Value xsi:type="xsd:string">easycwmp</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.ManufacturerOUI</Name>
      <Value xsi:type="xsd:string">FFFFFF</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.ProductClass</Name>
      <Value xsi:type="xsd:string">easycwmp</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.SerialNumber</Name>
      <Value xsi:type="xsd:string">FFFFFF123456</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>
      <Value xsi:type="xsd:string">example_hw_version</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>
      <Value xsi:type="xsd:string">example_sw_version</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>
      <Value xsi:type="xsd:string">unsetCommandKey</Value>
     </ParameterValueStruct>
    </ParameterList>
   </cwmp:Inform>
  </soap_env:Body>
 </soap_env:Envelope>
--- SEND HTTP REQUEST ---
> POST /openacs/acs HTTP/1.1
Host: 192.168.1.11:8080
User-Agent: easycwmp
Content-Type: text/xml; charset="utf-8"
SOAPAction:
Content-Length: 2863
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)/JBossWeb-2.0
< Set-Cookie: JSESSIONID=4428A112C402E2EB67C1144CB0B4C45C; Path=/
< Content-Type: text/xml;charset=utf-8
< Content-Length: 565
< Date: Wed, 09 May 2018 10:28:20 GMT
<
+++ RECEIVED HTTP RESPONSE +++
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" [^] xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" [^] xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID [^] SOAP-ENV:mustUnderstand="1">1</cwmp:ID><cwmp:NoMoreRequests>0</cwmp:NoMoreRequests></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:InformResponse xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>--- RECEIVED HTTP RESPONSE ---
1970-01-01 00:53:59 [easycwmp] NOTICE - receive InformResponse from the ACS
1970-01-01 00:53:59 [easycwmp] NOTICE - send empty message to the ACS
+++ SEND EMPTY HTTP REQUEST +++
> POST /openacs/acs HTTP/1.1
Host: 192.168.1.11:8080
Cookie: JSESSIONID=4428A112C402E2EB67C1144CB0B4C45C
User-Agent: easycwmp
Content-Type: text/xml; charset="utf-8"
Content-Length: 0

< HTTP/1.1 204 No Content
< Server: Apache-Coyote/1.1
< X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)/JBossWeb-2.0
< Date: Wed, 09 May 2018 10:28:20 GMT
<
+++ RECEIVED EMPTY HTTP RESPONSE +++
1970-01-01 00:53:59 [easycwmp] NOTICE - receive empty message from the ACS
1970-01-01 00:53:59 [easycwmp] NOTICE - external: execute apply service
1970-01-01 00:54:00 [easycwmp] NOTICE - external script exit
1970-01-01 00:54:00 [easycwmp] NOTICE - end session success
No tags attached.
jpg config.jpg (19,681) 2018-05-09 12:47
http://support.easycwmp.org/file_download.php?file_id=115&type=bug
jpg

jpg openacs.jpg (38,755) 2018-05-09 12:47
http://support.easycwmp.org/file_download.php?file_id=116&type=bug
jpg

jpg valuetree.jpg (37,051) 2018-05-09 12:47
http://support.easycwmp.org/file_download.php?file_id=117&type=bug
jpg
Issue History
2018-05-09 12:47Rany.LiNew Issue
2018-05-09 12:47Rany.LiFile Added: config.jpg
2018-05-09 12:47Rany.LiFile Added: openacs.jpg
2018-05-09 12:47Rany.LiFile Added: valuetree.jpg
2018-05-11 05:05Rany.LiNote Added: 0000865
2018-06-28 15:26mohamed.kallelNote Added: 0000883
2018-07-12 05:05Rany.LiNote Added: 0000885
2018-07-13 10:58mohamed.kallelStatusnew => resolved
2018-07-13 10:58mohamed.kallelResolutionopen => no change required
2018-07-13 10:58mohamed.kallelAssigned To => mohamed.kallel

Notes
(0000865)
Rany.Li   
2018-05-11 05:05   
And i found another problem:After i input “easycwmp --json-input”,then
"easycwmp>get InternetGatewayDevice.ManagementServer.Username 111111"

input Enter it shows "Failed to parse message data".

please tell me what's wrong with this,thanks
(0000883)
mohamed.kallel   
2018-06-28 15:26   
If you use "easycwmp --json-input" then you have to enter your RPC command in json format

Otherwise you can execute:
OpenWRT# easycwmp get value InternetGatewayDevice.ManagementServer.Username
(0000885)
Rany.Li   
2018-07-12 05:05   
Thanks,i have reslove this problem,you can shutdown this issue.thanks again.