-
Notifications
You must be signed in to change notification settings - Fork 138
Description
I get an error when run command graalpy -m standalone native --module test.py --output test --venv venv
Error message:
INFO: downloading org.graalvm.python:python-embedding:24.2.1 from https://repo1.maven.org/maven2/ to graalpy-24.2.1-linux-amd64/downloaded_standalone_resources May 29, 2025 4:25:49 PM org.graalvm.maven.downloader.MVNDownloader getProxy INFO: using proxy 'http://username:passwd@proxy.com:port' May 29, 2025 4:25:49 PM org.graalvm.maven.downloader.MVNDownloader downloadMavenFile SEVERE: exception while downloading maven file from https://repo1.maven.org/maven2/org/graalvm/python/python-embedding/24.2.1/python-embedding-24.2.1.pom java.net.UnknownHostException: username:passwd@proxy.com:port at java.base@24.0.1/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:558) at java.base@24.0.1/java.net.Socket.connect(Socket.java:665) at java.base@24.0.1/java.net.Socket.connect(Socket.java:603) at java.base@24.0.1/sun.net.NetworkClient.doConnect(NetworkClient.java:166) at java.base@24.0.1/sun.net.www.http.HttpClient.openServer(HttpClient.java:516) at java.base@24.0.1/sun.net.www.http.HttpClient.openServer(HttpClient.java:570) at java.base@24.0.1/sun.net.www.http.HttpClient.openServer(HttpClient.java:599) at java.base@24.0.1/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:205) at java.base@24.0.1/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:287) at java.base@24.0.1/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193) at java.base@24.0.1/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1007) at java.base@24.0.1/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:898) at java.base@24.0.1/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179) at java.base@24.0.1/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1376) at java.base@24.0.1/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301) at java.base@24.0.1/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:493) at java.base@24.0.1/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:307) at org.graalvm.maven.downloader.MVNDownloader.downloadFromServer(MVNDownloader.java:220) at org.graalvm.maven.downloader.MVNDownloader.downloadMavenFile(MVNDownloader.java:200) at org.graalvm.maven.downloader.MVNDownloader.downloadDependencies(MVNDownloader.java:109) at org.graalvm.maven.downloader.Main.main(Main.java:163) at com.oracle.graal.python.shell.GraalPythonMain.polyglotGet(GraalPythonMain.java:156) at com.oracle.graal.python.shell.GraalPythonMain.preprocessArguments(GraalPythonMain.java:167) at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:282) at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:126) at org.graalvm.launcher.AbstractLanguageLauncher.runLauncher(AbstractLanguageLauncher.java:180)
I have to connect to the Internet through a proxy,but I'm not sure if this is caused by the proxy.
According to the prompt information, I want to solve it by changing the internal mvn source. When I checked the org.graalvm.maven.downloader source code, I found a way to set the source, but I cant not set "org.graalvm.maven.downloader.repository" environment.
...
static final String DEFAULT_MAVEN_REPO = "https://repo1.maven.org/maven2/";
static final String MAVEN_PROP = "org.graalvm.maven.downloader.repository";
...
public static String getDefaultRepo() {
var repo = System.getenv(MAVEN_PROP);
if (repo == null) {
return DEFAULT_MAVEN_REPO;
} else {
return repo;
}
}
What should I do to resolve "java.net.UnknownHostException".