“Connection Timed Out” on Guest Machine

mavenvirtual-machines

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 (http://repository.jboss.org/nexus/content/groups/public): 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.

Best Answer

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
Related Topic