Hi,

Attempting HTTP:POST web service call from a database function. It fails with

"The secure connection to the remote host failed: The connection was
closed from the other side
SQLCODE=-990, ODBC 3 State=HY000" 
The function id defined as follows:

ALTER FUNCTION "custom"."CurbSide"( in "JsonLoad" long varchar,
in "certificate1stav" long varchar ) 
returns long varchar
url 'https://xxx.yyy.com/OrderStatus'
type 'HTTP:POST:application/json'
certificate '!certificate1stav'
set 'REDIR (COUNT = 0)'
SET 'HTTP (VERSION=1.1 )'

asked 04 Jun, 08:57

BrandonBalsdon's gravatar image

BrandonBalsdon
11112
accept rate: 0%

edited 04 Jun, 09:13

Volker%20Barth's gravatar image

Volker Barth
36.9k343505765

Have you tried web client logging (via dbsrv16 -zoc or via sa_server_option('WebClientLogging', 'ON') to get more info?

And is this a new error returned by a previously working web client function or is this within new development?

(04 Jun, 09:17) Volker Barth

Hi This is a new dev so was not previously working the log shows:

[connid = 4, 06/05 10:58:17.745]
[connid = 4, 06/05 10:58:17.745, REQUEST]
POST /OrderStatus HTTP/1.1
Content-Type: application/json; charset=windows-1252
Connection: close
Date: Fri, 05 Jun 2020 08:58:17 GMT
ASA-Id: 32eaa7657380440aa9117be562d56070
User-Agent: SQLAnywhere/16.0.0.1761
Host: xxx.yyy.com
Accept-Charset: windows-1252, UTF-8, *
Content-Length: 170

[connid = 4, Error: socket closed]
[connid = 4, socket closed]
(05 Jun, 05:00) BrandonBalsdon
Replies hidden

I would try whether a different client (say, SoapUI or the OpenSSL client) can connect to that web server with the according request or returns more error information. You might also try with SQL Anywhere 17.

(05 Jun, 08:18) Volker Barth

Can you test the HTTP version of the API? Maybe the issue occurs, because your DB doesn’t trust the SSL certificate? Or the certificate is old...

(14 Jun, 16:59) Vlad

And as you are using the very old 16.0.0.1761 build for new development, I would recommend to use the latest v16 EBF at least (16.0.0.2798) (or v17).

(15 Jun, 05:53) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×253
×43
×25
×19

question asked: 04 Jun, 08:57

question was seen: 377 times

last updated: 15 Jun, 05:53