Passing bulk data from ansible uri module to service and gettings status code -1 error

224 views
Skip to first unread message

Diyawary

unread,
Mar 31, 2020, 6:25:45 AM3/31/20
to Ansible Project
I am sending  some 4500 lines data from Ansible to snow table via uri module. however 4100 records updated to snow table rest of the data did not updated this job runs around 122 or 123 sec and throw below  error. less amount of data is updated properly .

Status code was -1 and not [200]: Connection failure: connection was closed before a valid response was received: ''

In my code  I have already increased the timeout value- to 500 sec
       url: 
        method: POST
        user: "{{ snow_username }}"
        password: "{{ snow_password }}"
        body: '{"List":{{list_item}}, "Region": X - DEV " }'
        body_format: json
        force_basic_auth: yes
        status_code: 200
        timeout: 500
Please suggest how can resolved this issue asap. 
Appriciate your help in adavance

Stefan Hornburg (Racke)

unread,
Mar 31, 2020, 6:36:27 AM3/31/20
to ansible...@googlegroups.com
On 3/31/20 12:25 PM, Diyawary wrote:
> I am sending  some 4500 lines data from Ansible to snow table via uri module. however 4100 records updated to snow table
> rest of the data did not updated this job runs around 122 or 123 sec and throw below  error. less amount of data is
> updated properly .
> *
> *
> *Status code was -1 and not [200]: Connection failure: connection was closed before a valid response was received: ''*
>
> In my code  I have already increased the timeout value- to 500 sec
>        url: 
>         method: POST
>         user: "{{ snow_username }}"
>         password: "{{ snow_password }}"
>         body: '{"List":{{list_item}}, "Region": X - DEV " }'
>         body_format: json
>         force_basic_auth: yes
>         status_code: 200
>         timeout: 500
> Please suggest how can resolved this issue asap. 
> Appriciate your help in adavance

My interpretation of the error message would be that the URL endpoint closed the connection, so increasing the
timeout on Ansible's side doesn't help.

It is likely that the URL endpoint ran into a timeout. Maybe you could breakdown the data in several batches.

Regards
Racke

>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc

Diyawary

unread,
Mar 31, 2020, 7:19:22 AM3/31/20
to Ansible Project
Thanks For Reply Racke, I have checked with the snow guy and there side has no time limtiation for connection close and they are saying as below-

There are no properties restricting how long SNOW will take to respond. Response time restrictions are usually placed on the calling application, not the receiving application.

Stefan Hornburg (Racke)

unread,
Mar 31, 2020, 7:55:21 AM3/31/20
to ansible...@googlegroups.com
On 3/31/20 1:19 PM, Diyawary wrote:
> Thanks For Reply Racke, I have checked with the snow guy and there side has no time limtiation for connection close and
> they are saying as below-
>
> There are no properties restricting how long SNOW will take to respond. Response time restrictions are usually placed on
> the calling application, not the receiving application.
>

If the operation is running into Ansible's timeout, it would be a different message. "Something like The read operation
timed out".

In my opinion this is a local problem and pretty much offtopic now.

Regards
Racke
> > ansible...@googlegroups.com <javascript:> <mailto:ansible-proje...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
>
> --
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration. Provisioning with Ansible.
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9f06b73a-15b5-4a7e-903e-a3ccb108e914%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9f06b73a-15b5-4a7e-903e-a3ccb108e914%40googlegroups.com?utm_medium=email&utm_source=footer>.
signature.asc

Diyawary

unread,
May 12, 2020, 12:30:37 PM5/12/20
to Ansible Project
i Racke,

I am getting  ('The read operation timed out',) error when sending data from ansible to snow even for some 300 lines also . could you please suggest how this can be isolate?
>     > ansible...@googlegroups.com <javascript:> <mailto:ansible-project+unsub...@googlegroups.com <javascript:>>.
>     > To view this discussion on the web visit
>     > https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com
>     <https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com>
>     >
>     <https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/ansible-project/388ee9c3-f95d-42ad-9efc-a5feff13f7cc%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
>
>     --
>     Ecommerce and Linux consulting + Perl and web application programming.
>     Debian and Sympa administration. Provisioning with Ansible.
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to

Diyawary

unread,
May 14, 2020, 11:42:19 AM5/14/20
to Ansible Project
Hi Team,

I am getting ('The read operation timed out',) error when sending data from ansible to snow even for some 300 lines also . could you please suggest how this can be resolved.

Reply all
Reply to author
Forward
0 new messages