Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a script that curls a site using a specific cookie value in a cookie file. When I run this on my local system, the server returns the same value to my cookie jar, as per my expectations. When I run this same script from another physical host, I get the exact same expected result. However, when I run the script from an ec2 instance, I do not get the same value returned to my cookie jar.

The two physical machines run Ubuntu 11.04 while the ec2 VM runs 11.10, and the curl version on at least one of the working systems is 7.21.3. On the system where this script fails, the curl version is 7.21.6, though I would be surprised if it were an OS or curl version problem. That said, I don't have any other idea what would be causing this script to fail. Can anyone shed some light on this for me? Here is the curl command from the script:

curl --connect-timeout 3 --silent --cookie /home/ubuntu/cookiefile --cookie-jar /home/ubuntu/cookiejarfile > /dev/null

share|improve this question

So it looks like the culprit was white space. I'm not sure when it was introduced to the mix--I must have copied and pasted my cookie file contents from my local system to the remote one, despite having a memory of scp'ing it up. All's well now, though along the way I found I have another question about cookie handling with curl from the command line, which I will post as its own question as soon as I verify it's not a problem I'm causing myself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.