curl fails

Discussions about using Linux guests in VirtualBox.
Post Reply
APUser
Posts: 8
Joined: 1. Mar 2013, 17:46

curl fails

Post by APUser »

Host: Windows Server 2012 180 day trial
Guest: Any Linux 32 or 64 bit

Problem:
Using curl does not work. Wget works, but curl does not.

Result of a basic curl command for google's home page.

Code: Select all

curl: (56) Recv failure: Connection reset by peer
I'm using a bridged adapter.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: curl fails

Post by noteirak »

if wget works, it means that everything is working as it should. Most likely, your usage of the curl parameters is not good. But since you do not give the command you ran, there is no way to tell.
If you feel the issue is actually related to Virtualbox, please read the Minimum information needed for assistance post and attach as zip file the VM log file aswell as the vboxmanage output.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
APUser
Posts: 8
Joined: 1. Mar 2013, 17:46

Re: curl fails

Post by APUser »

noteirak wrote:if wget works, it means that everything is working as it should. Most likely, your usage of the curl parameters is not good. But since you do not give the command you ran, there is no way to tell.
If you feel the issue is actually related to Virtualbox, please read the Minimum information needed for assistance post and attach as zip file the VM log file aswell as the vboxmanage output.
I'm sorry, I couldn't post the curl command, it was complaining about not being able to post URLs due to the age of my account regardless of how much of the URL I stripped out.

The curl command I initially tried was:

Code: Select all

curl -L -O URL
I've used the same command with no issue on other non-virtual installs.
When that failed I tried with Google's homepage with

Code: Select all

curl -L http://www.google.com -o file.html
As I said, wget works. I don't have access to the machine or its VMs until Wednesday at the earliest.
APUser
Posts: 8
Joined: 1. Mar 2013, 17:46

Re: curl fails

Post by APUser »

noteirak wrote:if wget works, it means that everything is working as it should. Most likely, your usage of the curl parameters is not good. But since you do not give the command you ran, there is no way to tell.
If you feel the issue is actually related to Virtualbox, please read the Minimum information needed for assistance post and attach as zip file the VM log file aswell as the vboxmanage output.
[/quote]

Ok, my procedure

1. Start the VM
2. At the login screen ctrl+alt+f1 to drop to TTY
3. Login to TTY
4. following commands

Code: Select all

clear
ifconfig
clear
curl -L -O http://krahs-emag.com/testbed/xmlhttp.txt
I then exited the TTY and used ctrl+alt+f7 to go back to login screen and shut down the VM from there.
Result is the screenshot, and the log is attached.
(I deleted the log prior to starting the VM so this should be nothing but what I said above)
Screenshot
Screenshot
ubuntu_curl_fail.png (26.71 KiB) Viewed 23138 times
VBoxlog.zip
Log File
(18.21 KiB) Downloaded 83 times
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: curl fails

Post by noteirak »

Well there is no reason this should fail if wget works...
Maybe others have a clue about this.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: curl fails

Post by Perryg »

Firewall rules?
APUser
Posts: 8
Joined: 1. Mar 2013, 17:46

Re: curl fails

Post by APUser »

Perryg wrote:Firewall rules?
Firewall is disabled on the host and guest, and other linux machines (real) on the same network can use curl just fine.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: curl fails

Post by noteirak »

Did you already try to delete and recreate the VM?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
APUser
Posts: 8
Joined: 1. Mar 2013, 17:46

Re: curl fails

Post by APUser »

noteirak wrote:Did you already try to delete and recreate the VM?
This is on all Linux VMs including a new test one.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: curl fails

Post by noteirak »

Then I am afraid I am totally out of ideas on this one, except that I still believe the issue lies somewhere in your network, but not in Virtualbox.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
APUser
Posts: 8
Joined: 1. Mar 2013, 17:46

Re: curl fails

Post by APUser »

noteirak wrote:Then I am afraid I am totally out of ideas on this one, except that I still believe the issue lies somewhere in your network, but not in Virtualbox.
I will set up a Linux guest at home over the weekend. I will turn the firewall off on my host machine, and I will have my router forward everything to the host.
I'll report back then.
Post Reply