When installing Floodlight openflow controller on a corporate machine behind corporate proxy, you might face some connection timed out errors and dependency errors. Some of the errors are:
For ANT:
To compile floodlight using "ant eclipse" or "ant", setup proxy using:
For Maven:
add ~/.m2/settings.xml with following content:
[exec] [artifact:dependencies] Downloading: org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom from repository central at http://repo1.maven.org/maven2
[exec] [artifact:dependencies] Error transferring file: Connection timed out
.....
[exec] [artifact:dependencies] [WARNING] Unable to get resource 'org.slf4j:slf4j-api:pom:1.5.8' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out
[exec] [artifact:dependencies] Downloading: commons-lang/commons-lang/2.5/commons-lang-2.5.pom from repository central at http://repo1.maven.org/maven2
[exec] [artifact:dependencies] Error transferring file: Connection timed out
.....
[exec] BUILD FAILED
.....
This happens after you download Floodlight through the proxy and are trying to install. Floodlight uses ant and maven packages, so appropriate changes need to be made for each to use the system proxy. The setting of environment variables http_proxy and https_proxy is not sufficient.For ANT:
To compile floodlight using "ant eclipse" or "ant", setup proxy using:
export ANT_OPTS="-Dhttp.proxyHost=proxyname/ip -Dhttp.proxyPort=3128"
For Maven:
add ~/.m2/settings.xml with following content:
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy</host>
<port>3128</port>
<username>proxyuser</username>
</proxy>
</proxies>
</settings>
No comments:
Post a Comment