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

When I run "mvn install" on my guest VM box, I get multiple "Connection Timed Out" errors when searching for a file to download.

[WARNING] Unable to get resource 'org.apache.maven.wagon:wagon-file:pom:1.0-alpha-5' from repository maven-nexus ( Error transferring file: Connection timed out

Note - I've opened the file path that maven can't find to Firefox and curl. Both of them can read/download the file based on the path that maven uses and cannot find.

I need to use a proxy, but I believe it's configured correctly. For a guest VM using a proxy, is it acceptable to use the same proxy settings as the host machine?

As I understand, port forwarding is only required from host to guest, but not vice-versa.

Please advise.

EDIT - Turns out it was a proxy issue. I had to configure my guest machine's proxy correctly.

share|improve this question
up vote 1 down vote accepted

Is VM a Linux? If yes, try:

export http_proxy=http://your_proxy:port
export ftp_proxy=$http_proxy
mvn install

If this does not help, you can

  • look at logs on proxy server(is there any connection attempt?)
  • use packet sniffer/analyzer program like Wireshark to see what actually is happening
share|improve this answer
It looks like my http_proxy environment variable was wrong. Does maven use these env vars that you listed? – Kevin Meredith Aug 14 '12 at 16:11
I don't know anything about maven, but I know that http_proxy and ftp_proxy are standard environment variables in unix to save proxy information. If this tip helped, maven uses them. – Selivanov Pavel Aug 14 '12 at 16:37
I believe that maven, a Java build tool, uses its settings.xml file, options passed in via the command line, and/or the $MAVEN_OPTS environment variable to find out, among others, what proxy to use. – Kevin Meredith Aug 22 '12 at 17:20

As you can download the files with Firefox and curl (inside the vm?) i'd double check proxy settings for mvn.

share|improve this answer
I'm using vagrant, if that matters. – Kevin Meredith Aug 14 '12 at 15:58

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.