View Issue Details

IDProjectCategoryView StatusLast Update
0000230easycwmpQuestionpublic2017-05-26 11:18
Reportermagesh Assigned Touser13 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntu 
Summary0000230: rpc_inform(218): sending Inform http message failed
DescriptionHi,

I am trying to make easycwmp to communicate with genieACS. I am running both GenieACS and Easycwmp on aws.

GenieACS is up and running fine. able to access gui using http://<IP>:3000

In both the EC2 instances we made it to allow all traffic.

How to identify the ACS URL from genieACS. So that i can provide in the easycwmp uci configuration.
config acs
option url http://54.210.130.183:7547/openacs/acs ==> Not sure about the path (/openacs/acs) in the URL. Until port is fine.

Additional Information        
ubuntu@ip-172-31-30-69:/opt/genieacs$ wget http://easycwmp:easycwmp@172.31.13.243:7547/
--2017-05-24 09:18:46-- http://easycwmp:*password*@172.31.13.243:7547/
Connecting to 172.31.13.243:7547... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Digest realm="realm@easycwmp",qop="auth",nonce="8b7f84c035c82c9f6b48d07ea541596600068aa3",opaque="328458fab28345ae87ab3210a8513b14eff452a2"
Connecting to 172.31.13.243:7547... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0
index.html: Permission denied

Cannot write to ‘index.html’ (Success).

        
        
# easycwmp uci configuration

config local
        option interface eth0
        option port 7547
        option ubus_socket /var/run/ubus.sock
        option date_format %FT%T%z
        option username easycwmp
        option password easycwmp
        option provisioning_code ''
#Logging levels: Critic=0, Warning=1, Notice=2, Info=3, Debug=4
        option logging_level '0'

config acs
        option url http://54.210.130.183:7547/openacs/acs ==> Not sure about this URL.
        option username easycwmp
        option password easycwmp
        option parameter_key ''
        option periodic_enable '1'
        option periodic_interval '100'
        option periodic_time '0001-01-01T00:00:00Z'

config device
        option manufacturer easycwmp
        option oui FFFFFF
        option product_class easycwmp
        option serial_number FFFFFF123456
        option hardware_version example_hw_version
        option software_version example_sw_version






================================== ACS client tr069 ===================================
ubuntu@ip-172-31-13-243:~$ sudo easycwmpd -f
2017-05-24 09:49:43 [easycwmp] NOTICE - add event '0 BOOTSTRAP'
2017-05-24 09:49:43 [easycwmp] NOTICE - add event '2 PERIODIC'
2017-05-24 09:49:43 [easycwmp] NOTICE - external script init
config_init_local(55):: easycwmp.@local[0].interface=eth0
config_init_local(65):: easycwmp.@local[0].port=7547
config_init_local(83):: easycwmp.@local[0].ubus_socket=/var/run/ubus.sock
config_init_local(71):: easycwmp.@local[0].username=easycwmp
config_init_local(77):: easycwmp.@local[0].password=easycwmp
config_init_local(94):: easycwmp.@local[0].logging_level=0
config_init_acs(159):: easycwmp.@acs[0].url=http://54.210.130.183:7547/openacs/acs
config_init_acs(165):: easycwmp.@acs[0].username=easycwmp
config_init_acs(171):: easycwmp.@acs[0].password=easycwmp
config_init_acs(177):: easycwmp.@acs[0].periodic_enable=1
config_init_acs(183):: easycwmp.@acs[0].periodic_interval=100
config_init_acs(190):: easycwmp.@acs[0].periodic_time=0001-01-01T00:00:00Z
main(320): ubus initialization failed
+++ HTTP SERVER CONFIGURATION +++
ip: '172.31.13.243'
port: '7547'
--- HTTP SERVER CONFIGURATION ---
+++ HTTP CLIENT CONFIGURATION +++
http_client_init(50):: url: http://54.210.130.183:7547/openacs/acs
http_client_init(56):: ssl_verify: SSL certificate validation disabled.
--- HTTP CLIENT CONFIGURATION ---
+++ 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[2]">
     <EventStruct>
      <EventCode>0 BOOTSTRAP</EventCode>
      <CommandKey />
     </EventStruct>
     <EventStruct>
      <EventCode>2 PERIODIC</EventCode>
      <CommandKey />
     </EventStruct>
    </Event>
    <MaxEnvelopes>1</MaxEnvelopes>
    <CurrentTime>2017-05-24T09:49:43+00:00</CurrentTime>
    <RetryCount>0</RetryCount>
    <ParameterList soap_enc:arrayType="cwmp:ParameterValueStruct[10]">
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.HardwareVersion</Name>
      <Value xsi:type="xsd:string">example_hw_version</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.Manufacturer</Name>
      <Value xsi:type="xsd:string">easycwmp</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.ManufacturerOUI</Name>
      <Value xsi:type="xsd:string">FFFFFF</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.ProductClass</Name>
      <Value xsi:type="xsd:string">easycwmp</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.ProvisioningCode</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.SerialNumber</Name>
      <Value xsi:type="xsd:string">FFFFFF123456</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.SoftwareVersion</Name>
      <Value xsi:type="xsd:string">example_sw_version</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.DeviceInfo.SpecVersion</Name>
      <Value xsi:type="xsd:string">1.0</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.ManagementServer.ConnectionRequestURL</Name>
      <Value xsi:type="xsd:string">http://172.31.13.243:7547/</Value>
     </ParameterValueStruct>
     <ParameterValueStruct>
      <Name>Device.ManagementServer.ParameterKey</Name>
      <Value xsi:type="xsd:string"></Value>
     </ParameterValueStruct>
    </ParameterList>
   </cwmp:Inform>
  </soap_env:Body>
 </soap_env:Envelope>
--- SEND HTTP REQUEST ---
* Trying 54.210.130.183...
* Connection timed out after 30001 milliseconds
* Closing connection 0
rpc_inform(218): sending Inform http message failed
TagsNo tags attached.
e-mail notification

Activities

user13

2017-05-25 11:01

  ~0000708

use this ACS url :


option url 'http://54.210.130.183:7547/genieacs'

magesh

2017-05-25 11:34

reporter  

acspackDump.pcap (2,524 bytes)

magesh

2017-05-25 11:39

reporter   ~0000709

Last edited: 2017-05-25 11:40

Thanks Anis for the quick reply.

in the easycwmp config file have changed the acs url
http_client_init(50):: url: http://54.210.130.183:7547/genieacs

Still the same connection timed out. But i see the packets on 7547 port eth0 interface on genieacs ec2 instance. Attached the pcap file for your reference.

configured the logging level to 0 in the option logging_level '0'

where can we see the log file as to why connection is getting timed out?


can you help?

user13

2017-05-25 12:20

  ~0000712

to increase the timeout of the connexion.

you have to change the CURLOPT_TIMEOUT value in http.c

curl_easy_setopt(curl, CURLOPT_TIMEOUT, 30) ==> change it to 60

and then retest

user13

2017-05-25 14:43

  ~0000714

Last edited: 2017-05-25 18:26

I make a test with value of timeout 120 and is the same issue

tested with curl command
curl -vv --connect-timeout 120 http://54.210.130.183:7547/genieacs
* Hostname was NOT found in DNS cache
* Trying 54.210.130.183...
* Connection timed out after 120000 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 120000 milliseconds

try to see the log of genieacs-cwmp and check if it receive request on port 7547

BTW, The test with our genieacs is OK :
curl -vv --connect-timeout 5 http://192.168.1.44:7547/genieacs
* Hostname was NOT found in DNS cache
* Trying 192.168.1.44...
* Connected to 192.168.1.44 (192.168.1.44) port 7547 (#0)
> GET /genieacs HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 192.168.1.44:7547
> Accept: */*
>

magesh

2017-05-25 19:08

reporter   ~0000715

Thanks Anis.

i will look into genieacs logs for more information.

Following are observations:

1. Tried curl from client machine. CURL cmd failed with both public and private ip of ACS.
ubuntu@ip-172-31-13-243:/opt/dev/easycwmp $ curl -vv --connect-timeout 50 http://54.210.130.183:7547/
* Trying 54.210.130.183...
* Connection timed out after 50001 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 50001 milliseconds

2. Tried curl from ACS machine with PUBLIC IP
a. ubuntu@ip-172-31-30-69: /opt/genieacs $ curl -vv --connect-timeout 50 http://54.210.130.183:7547/
* Trying 54.210.130.183...
* Connection timed out after 50001 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 50001 milliseconds

3. Tried curl from ACS machine with PRIVATE IP
ubuntu@ip-172-31-30-69:/opt/genieacs$ curl -vv --connect-timeout 30 http://172.31.30.69:7547/
* Trying 172.31.30.69...
* Connected to 172.31.30.69 (172.31.30.69) port 7547 (#0)
> GET / HTTP/1.1
> Host: 172.31.30.69:7547
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Date: Thu, 25 May 2017 16:25:06 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
* Connection #0 to host 172.31.30.69 left intact
405 Method Not Allowed

user13

2017-05-25 19:33

  ~0000716

No, for the private ip @ is OK no timeout error is displayed you can try to connect easycwmp with this private ip, it should works with it.

magesh

2017-05-26 11:10

reporter   ~0000719

Thanks Anis for all the support.

The issue got resolved. The problem was not in easycwmp/genieACS.

Cause for the Issue:-
----------------------
iptables rules.

we were flushing the rules from AWS console(security group) which did not reflect in the ec2 instance.

Directly logged into ec2 and flushed all the rules in ACS side and now i am able to get the INFORM response.

user13

2017-05-26 11:17

  ~0000720

good to see that the issue is fixed.

Issue History

Date Modified Username Field Change
2017-05-24 13:16 magesh New Issue
2017-05-25 11:01 user13 Note Added: 0000708
2017-05-25 11:34 magesh File Added: acspackDump.pcap
2017-05-25 11:39 magesh Note Added: 0000709
2017-05-25 11:40 magesh Note Edited: 0000709
2017-05-25 12:20 user13 Note Added: 0000712
2017-05-25 14:43 user13 Note Added: 0000714
2017-05-25 17:55 user13 Note Edited: 0000714
2017-05-25 18:19 user13 Note View State: 0000714: private
2017-05-25 18:19 user13 Note View State: 0000714: public
2017-05-25 18:20 user13 Note Edited: 0000714
2017-05-25 18:26 user13 Note Edited: 0000714
2017-05-25 19:08 magesh Note Added: 0000715
2017-05-25 19:33 user13 Note Added: 0000716
2017-05-26 10:30 user13 Assigned To => user13
2017-05-26 10:30 user13 Status new => feedback
2017-05-26 11:10 magesh Note Added: 0000719
2017-05-26 11:10 magesh Status feedback => assigned
2017-05-26 11:17 user13 Note Added: 0000720
2017-05-26 11:18 user13 Status assigned => resolved
2017-05-26 11:18 user13 Resolution open => fixed