Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [curl]

cURL is an HTTP client library and command line tool.

0
votes
0answers
73 views

CentOS 7: curl and wget not working

My problem is that curl and wget usually fail to retrieve more than just the first part of any given file, and often nothing at all. Both have worked previously on the same server, and nothing else on ...
0
votes
0answers
26 views

Execute custom code when crontab fails

I am trying to post crontab error messages via cURL to Discord/Slack rather than email. Is there any way to do that? I have been searching about this, but I haven't found anything like it on google. ...
1
vote
0answers
49 views

PHP curl broken in 5.6 vs 5.4 (Centos7)

I run a simple php script using curl on Centos7 like: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://1.2.3.4:80/hello"); $result = curl_exec($ch); print_r(curl_errno($ch)); This works ...
0
votes
2answers
72 views

Https connection, TLS hangs and eventually fails SSL_ERROR_SYSCALL

I'm trying to correctly diagnose an issue where the server i have access to doesn't seem to be able to contact another server on the internet over port 443: ~$ curl https://mydomain.co.uk -vvv * ...
0
votes
1answer
49 views

automatically detect an apache server running on a specific vm and zone in Google Cloud Platform

Note: This is a self-answered question, which is allowed here. If you have better solutions go ahead and post them. Hypothetical automation for a web-based cloud school needs to test if students ...
1
vote
1answer
32 views

curl resolving invalid hostnames to own IP

When I curl an invalid domain, I get a response from my own webserver. Ubuntu 16.04.5, curl 7.47.0 For example: root@l ~ # curl -v foobar.x * Rebuilt URL to: foobar.x/ * Trying 148.X.X.X... * ...
1
vote
1answer
106 views

Converting curl request to powershell using invoke-webrequest

I'm struggling to try and convert the following curl request into powershell using invoke-webrequest: curl -X PATCH "http://172.28.36.62:8080/api/3/http/upstreams/my-api/servers/5" -H "accept: ...
1
vote
1answer
34 views

curl resolves all non-SSL URLs to 127.0.0.1 and port 8080

I'm executing curl and no matter what URL I point it to, it always tries to connect to 127.0.0.1 and port 8080: $ curl -v http://asdfsafzsdfsdf/ * Trying 127.0.0.1... * connect to 127.0.0.1 port ...
0
votes
0answers
47 views

How Does curl over HTTP Know Where to Respond

This might sound like a silly question that is probably just part of the HTTP protocol, but might be important to debugging an issue I'm having. We have some PHP code that uses the php-curl functions ...
1
vote
1answer
95 views

Curl verify certificate improperly

I used curl to launch a https request to download the file. I used below command: curl -v -o Output.pdf https://otherdomain.com/upload/manual-8mm-f35-csii-vdslr-5.pdf The result I get is: ...
0
votes
0answers
101 views

tls 1.2 handshake timeout docker container

I'm working on a fresh ubuntu 18.04.01 in which I installed Docker version 18.09.1, build 4c52b90 by following the official install guide. I'm experiencing a weird issue regarding TLS 1.2 On the host ...
1
vote
0answers
39 views

curl to https significantly slower than wget on centos7

Versions in question: Centos 7 Curl 7.63.0 (x86_64-redhat-linux-gnu) libcurl/7.63.0 NSS/3.36 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.8.0 nghttp2/1.31.1 I've got some strange behaviour ...
0
votes
2answers
53 views

File writing issue with mounted ftp drive with curlftpfs

I have mounted an ftp account to my linux folder using below command curlftpfs -o user=userid:password ip-address /home/temp -o kernel_cache,allow_other,direct_io,umask=0000,uid=1000,gid=1000 The ...
0
votes
1answer
22 views

Use Curl For Finding DataBase Errors?

I have a list of domains in a file say list.txt I've got a report that many of these domains showing "Database Connection Error" I want to know all domains that can't connect with db properly. I ...
0
votes
1answer
55 views

Intermittent http connection failure

We have two servers, ie host1.example.com host2.example.com One of these acts as the primary web server for our two main websites, example.com and example2.com. The other acts as a backup, which we ...
1
vote
0answers
35 views

Curl only uses specified OpenVPN interface if ran as root

I am using Ubuntu Server 18.04.1 LTS (Bionic Beaver). I run OpenVPN with redirect-gateway disabled because I don't want traffic to use it by default, only one specific application. This is the command ...
-1
votes
1answer
384 views

File .pem Permission denied

I have received from my partner a pfx file that I converted to pem for API The idea is that I do not know where to put the ubuntu server and how to access the plug-in on the woocomerce my log it's ...
1
vote
1answer
505 views

cURL and Azure BLOB with SAS - HTTP header that's mandatory for this request is not specified

I've reviewed the information at: https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob https://docs.microsoft.com/en-us/rest/api/storageservices/service-sas-examples As far as I can ...
0
votes
0answers
234 views

nginx and mTLS and curl, oh my

I am trying to configure client certificate verification (mTLS) in nginx and test it with curl. Important part of my nginx config: server { listen 443 ssl default_server; listen ...
1
vote
1answer
637 views

How to install company proxy certificate

My CentOS 7 server which is in AWS private cloud(company network), is unable to connect to some sites. After some work I managed to narrow the problem down to following problem. The following ...
0
votes
2answers
253 views

Curl through intermediate server

I need to send PUT/GET/POST request with curl through a custom port from client1 to server2. However, server2 only accepts these requests from server1, and denies client1 if connected directly. What ...
0
votes
2answers
203 views

How to connect from curl (git-ftp) and FileZilla to vsftpd?

Following this tutorial I managed to add FTPS connectivity to the server. Following step 6 in the tutorial: 6.1 generate certificate $ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -...
-2
votes
1answer
702 views

Centos 7 curl HTTPS error (1)

I start listing my specs: CentOS Linux release 7.5.1804 (Core) # curl -V curl 7.61.1 (x86_64-pc-linux-gnu) libcurl/7.61.1 Release-Date: 2018-09-05 Protocols: dict file ftp gopher http imap pop3 rtsp ...
0
votes
1answer
151 views

How to solve this generic intermittent SSL error?

I'm getting a cURL error when my website attempts to retrieve data from the CRM. PHP Fatal error: Uncaught exception 'Exception' with message 'cURL Error: Unknown SSL protocol error in connection to ...
1
vote
0answers
40 views

Why same request has different response times?

I have an API (built with nodejs) and deployed on a kubernetes cluster using a docker image. For default route I simply return a Hello World QA! message. I am testing response times of this GET ...
0
votes
0answers
175 views

squid proxy dont load only one site , dont SSL VERIFY HOST

squid proxy don't load only one site, don't have a problem with other websites I think this problem from SSL VERIFY HOST on squid. I use this code on squid config but don't fix my problem: Source: ...
0
votes
1answer
128 views

Curl fetch only headers without head

On our company servers due to security purposes our main SysAdmin only allows a few HTTP methods to pass through like (GET, POST, OPTIONS, PUT, etc.) and HEAD is not one of them. I implemented Zabbix ...
0
votes
0answers
128 views

Django (uwsgi) + nginx hangs on curl requests

I am trying to debug a problem where a request done with curl hangs. The website renders fine if I open it through any web browser. I can't find anything suspicious into the log files as well. I've ...
0
votes
2answers
65 views

How to start a blocking process (server) and then curl it from the same script?

I am trying to operate DeepDetect (a machine learning server) in Docker [note this is not a DeepDetect question - it is simply a Bash question]. However, I am running into a more general Linux/bash ...
0
votes
1answer
271 views

Issue to get Cookie: JSESSIONID and auth_cookie

I wanted to execute one API using the command line but need to pass Cookie: JSESSIONID=<>; auth_cookie=<> value while executing it. We have CAS authentication for the target API. Please let me ...
1
vote
1answer
739 views

SSL “unable to get local issuer certificate” : “full chain” vs “root”?

Summary In summary I have some certificate related files and some certificate related instructions but I'm not sure which files are which ! Background I've just installed a certificate from Lets ...
0
votes
0answers
460 views

what does curl stuck at “Trying <ip address>” indicate?

We have a fleet of beaglebone boards running Debian 7.9 that communicate with our server (an Azure App Service) over https. From at least one of these boards, most requests to the server timeout. When ...
0
votes
1answer
34 views

OpenNebula: instantiate a service template with Curl providing a service name

In OpenNebula 5.4, I am able to instantiate a Service from a Service Template using Curl, but I don't know how to provide a service name. The website example works as expected: curl http://127.0.0.1:...
0
votes
0answers
122 views

CURL over VPN to make API request

I'm trying to use CURL over a VPN rather than the public internet. To do this I am using this setting in the CURL request: curl_setopt($ch, CURLOPT_INTERFACE, "eth0:01"); The value eth0:01 comes ...
0
votes
1answer
668 views

curl - SSL peer does not support certificates of the type it received

Trying to send a request with a client certificate to an Apache server, I have the following request and error: $ curl -X POST https://my-server.com/dummy/user -H 'Cache-Control: no-cache' -H '...
3
votes
2answers
1k views

Why does curl work with a specific https site, but wget has problems with certificates?

Centos 6. After updating recently ca-certificates I run into some troubles. I have the most recent versions of curl for centos 6: -bash-4.1$ curl -V -v curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7....
3
votes
1answer
4k views

“server certificate verification OK” but “ALPN, server did not agree to a protocol”

I am making a curl call curl -v ... https://... and the verbose output contains .... * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate ...
3
votes
1answer
2k views

Return only a HTTP status code from curl command

I want to just get a statusCode from CURL command response. When I use this command: curl -I http://uploadserver.ln/1.mp4 I want to just get 200 rather than this long result: HTTP/1.1 200 OK ...
0
votes
1answer
54 views

Servers can't find each other

I had originally posted this on Superuser, but for some reason it got marked off-topic, so this seems like the only reasonable place left to post this. I have a web server, which hosts my website (...
1
vote
1answer
38 views

Determining if an SSL cert is from cloudflare

I have got a lot of domains. I use basic monitoring script, which checks expiration date of ssl certificate. But a few of my domains use default cloudflare cert. How to determine and reject domains ...
1
vote
0answers
24 views

Getting different local-port value in tcpdump when using --local-port option in curl

I'm using curl command to send the traffic to the Server. In curl command, I'm using --local-port option. Below is the command: curl -v --interface 10.1.1.3 -b --local-port 10000 http://30.1.1.101/...
0
votes
0answers
29 views

Nginx SSL request process

I have a Nginx 1.10 with this 2 sites: site A: server { listen 443 ssl http2; listen [::]:443 ssl http2; ssl_certificate /etc/ssl/example.com/fullchain.pem; ...
0
votes
1answer
61 views

Apache closes connection too early

I am trying to debug an issue we are having with some embedded devices when they are downloading Firmware over-the-air and closing connections too early, failing to get all data. I tried downloading ...
-3
votes
1answer
44 views

reading Linux /proc directory with curl

I have a server with trasversal directory allowed where I'm able to use curl to read system operating files. I'd like to read the /proc directory as well but for some reason, I receive this: curl -v ...
0
votes
1answer
69 views

Switch between using / not using CDN

Previously, I have used CloudFlare, where we can switch quickly between "active mode" and "development mode". In "development mode", static files are loaded directly from the origin server rather than ...
1
vote
1answer
3k views

Determine which TLS version is used by default (cURL)

I have 2 servers that both run curl 7.29.0 and CentOS 7. However, when I run the following command I get 2 different results: curl https://tlstest.paypal.com PayPal_Connection_OK ERROR! Connection ...
0
votes
0answers
60 views

Add an IPv6 subnet to Ubuntu server

I'm trying to add an entire /64 ISP-provided IPv6 subnet to an Ubuntu server machine. I'd like to be able to use any IP I want with curl (perhaps using --interface <ip>) after the IPs are ...
0
votes
1answer
2k views

How to use rootcert.pem certificate with curl?

I have a file/certificate in next format rootcert.pem. How to use this certificate with curl ?
1
vote
1answer
416 views

How to move/migrate indices from self hosted Elasticsearch to AWS Elasticsearch service (cloud)

I have a self hosted Elasticsearch 6.2 cluster (2 master nodes, ~200Gb data each). I plan to move to AWS Elasticsearch service & it's not possible to ssh into it. What's the fastest way to move ...
-4
votes
2answers
4k views

Docker container port 80 - “Connection refused”

Docker file content - [root@ansiblecontrolnode dockerbuild]# cat Dockerfile FROM centos:latest MAINTAINER dhirendra120285.rai@gmail.com RUN yum update -y && yum install httpd net-tools -y ...