This is an archived forum post. The information may be outdated. Contact us if you have any questions.

After install Kasperky antivirus convertURI it doesn't finish

ccoolacaixa wrote on 2021-04-08:
Hi,
I think that after installing an Kaspersky server antivirus the call to convertURI method doesn't finish... create a 0 KB PDF in a local file and the web browers answer stops with this message "Connection terminated: The connection terminated unexpectedly." There is no catch error of pdfcrowd.Error. And there is no log in Kaspersky antivirus of any accion taken about the creation of pdf. I am a little bit confuse and i don't know how can debug this situation.

If somebody has the same problem and want to share the solution, i really appreciate.

When you call to the method convertURI, are you sending somethig out of the server or with the credentials and the dll installed everthing is going on locally...

API is V.1

Thank a lot, sorry about my english.
support wrote on 2021-04-08:
Hi,

Please try some simple test on your server. e.g. by curl to get more details:

curl -v -o google.pdf -F "username=your-username" -F "key=your-api-key" -F 'src=http://www.google.com' https://pdfcrowd.com/api/pdf/convert/uri/

And try API v2:
curl -v -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" -o example.pdf -F "url=http://www.example.com" https://api.pdfcrowd.com/convert/20.10/
ccoolacaixa wrote on 2021-04-08:
Thanks, here it is, executed from the server.

C:\Fran\curl\bin>curl -v -o google.pdf -F "username=xxxxxxxxxx" -F "key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -F 'src=http://www.google.com' https://pdfcrowd.com/api/pdf/convert/uri/ > c:\Fran\resultado.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 69.164.218.62:443...
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to pdfcrowd.com (69.164.218.62) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: C:\Fran\curl\bin\curl-ca-bundle.crt
* CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [85 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [806 bytes data]
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
} [2 bytes data]
* SSL certificate problem: unable to get local issuer certificate
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

C:\Fran\curl\bin>curl -v -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" -o example.pdf -F "url=http://www.example.com" https://api.pdfcrowd.com/convert/20.10/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 35.201.118.121:443...
* Connected to api.pdfcrowd.com (35.201.118.121) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: C:\Fran\curl\bin\curl-ca-bundle.crt
* CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [85 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [814 bytes data]
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
} [2 bytes data]
* SSL certificate problem: unable to get local issuer certificate
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
support wrote on 2021-04-08:
It seems that Kaspersky Secure Connection is blocking the connection.


Try to add api.pdfcrowd.com to the Exclusions for websites. See details:
-- https://support.kaspersky.com/KSCloud/Win4.0_mr1/en-US/128180.htm
ccoolacaixa wrote on 2021-04-09:
Hello,
Thanks for your quickcly answers !!

I've tried to put an excepcion in antivirus with several URLs, but it doesn't works. I'm sure the problem is in the setup of antivirus, because i stopped the "Traffic Securety task" and everything works ok again with the calls to pdfCrowd API... so its some kind of traffic that has been blocked by the antivirus. I've opened an incident toKaspersky.

Waiting for an answer i just have a last question, the comunication beetwen our webpage with the API of pdfCrowd, client.convertURI(myUrl, FileStream), It's just "http" or theres is other ports, others protocols that are implicated in this comunications... its just to try to see what more i can modify in the setup of the antivirus...

Thans you !!
support wrote on 2021-04-09:
You are welcome. I hope that Kaspersky will solve it.

To your question:
API v1 uses HTTP by default. To enable secured connection use client.useSSL(true);
API v2 uses HTTPS by default.

HTTP uses port 80, HTTPS uses port 443