jmon Well-Known Member Licensed User Longtime User Aug 18, 2014 #1 Hi, when using HttpUtils2 I get an error when calling PostString: Error: job1 : java.net.UnknownHostException: www.xxxxxxx.netau.net Click to expand... My website is not down, the files are there. I have managed to ping correctly from another computer. I have read on the forum that the reason of this error is that I have no internet connection. I guess in my case is because I am behind a proxy. Is there a way to specify my proxy address with HttpUtils2? Thanks for your help. Jmon.
Hi, when using HttpUtils2 I get an error when calling PostString: Error: job1 : java.net.UnknownHostException: www.xxxxxxx.netau.net Click to expand... My website is not down, the files are there. I have managed to ping correctly from another computer. I have read on the forum that the reason of this error is that I have no internet connection. I guess in my case is because I am behind a proxy. Is there a way to specify my proxy address with HttpUtils2? Thanks for your help. Jmon.
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2014 #2 Try this: Code: SetSystemProperty("http.proxyHost", "proxy ip address") SetSystemProperty("http.proxyPort", "proxy port") Upvote 0
Try this: Code: SetSystemProperty("http.proxyHost", "proxy ip address") SetSystemProperty("http.proxyPort", "proxy port")
FabioRome Active Member Licensed User Longtime User Apr 13, 2015 #3 hi Erel, my code is: Code: SetSystemProperty("http.proxyHost", ProxyHost) SetSystemProperty("http.proxyPort", ProxyPort) SetSystemProperty("http.proxyUser", ProxyUsername) SetSystemProperty("http.proxyPassword", ProxyPassword) but I receive them: Code: Program started. java.net.UnknownHostException: my_site_destination at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:126) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) at anywheresoftware.b4a.http.HttpClientWrapper.executeWithTimeout(HttpClientWrapper.java:310) at anywheresoftware.b4a.http.HttpClientWrapper.access$0(HttpClientWrapper.java:308) at anywheresoftware.b4a.http.HttpClientWrapper$ExecuteHelper.run(HttpClientWrapper.java:207) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) can you help me? thanks Upvote 0
hi Erel, my code is: Code: SetSystemProperty("http.proxyHost", ProxyHost) SetSystemProperty("http.proxyPort", ProxyPort) SetSystemProperty("http.proxyUser", ProxyUsername) SetSystemProperty("http.proxyPassword", ProxyPassword) but I receive them: Code: Program started. java.net.UnknownHostException: my_site_destination at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:126) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) at anywheresoftware.b4a.http.HttpClientWrapper.executeWithTimeout(HttpClientWrapper.java:310) at anywheresoftware.b4a.http.HttpClientWrapper.access$0(HttpClientWrapper.java:308) at anywheresoftware.b4a.http.HttpClientWrapper$ExecuteHelper.run(HttpClientWrapper.java:207) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) can you help me? thanks
giga Well-Known Member Licensed User Longtime User Apr 13, 2015 #4 Are you referencing each of these as a string? ProxyHost ProxyPort ProxyUsername ProxyPassword example Code: SetSystemProperty("http.proxyhost", "proxy ip address") SetSystemProperty("http.proxyport", "proxy port") SetSystemProperty("http.proxyusername", "proxy username") SetSystemProperty("http.proxypasswordt", "porxypassword") Upvote 0
Are you referencing each of these as a string? ProxyHost ProxyPort ProxyUsername ProxyPassword example Code: SetSystemProperty("http.proxyhost", "proxy ip address") SetSystemProperty("http.proxyport", "proxy port") SetSystemProperty("http.proxyusername", "proxy username") SetSystemProperty("http.proxypasswordt", "porxypassword")
FabioRome Active Member Licensed User Longtime User Apr 13, 2015 #5 Code: Dim ProxyHost As String Dim ProxyPort As Int Dim ProxyUsername As String Dim ProxyPassword As String thanks giga Upvote 0
Code: Dim ProxyHost As String Dim ProxyPort As Int Dim ProxyUsername As String Dim ProxyPassword As String thanks giga
FabioRome Active Member Licensed User Longtime User Apr 13, 2015 #7 @giga I'm sorry but it does not work equally Upvote 0
giga Well-Known Member Licensed User Longtime User Apr 13, 2015 #8 What's not working or what error are you getting? Upvote 0
FabioRome Active Member Licensed User Longtime User Apr 13, 2015 #9 Code: Program started. java.net.UnknownHostException: my_site_destination at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:126) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) at anywheresoftware.b4a.http.HttpClientWrapper.executeWithTimeout(HttpClientWrapper.java:310) at anywheresoftware.b4a.http.HttpClientWrapper.access$0(HttpClientWrapper.java:308) at anywheresoftware.b4a.http.HttpClientWrapper$ExecuteHelper.run(HttpClientWrapper.java:207) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Upvote 0
Code: Program started. java.net.UnknownHostException: my_site_destination at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:126) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) at anywheresoftware.b4a.http.HttpClientWrapper.executeWithTimeout(HttpClientWrapper.java:310) at anywheresoftware.b4a.http.HttpClientWrapper.access$0(HttpClientWrapper.java:308) at anywheresoftware.b4a.http.HttpClientWrapper$ExecuteHelper.run(HttpClientWrapper.java:207) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
giga Well-Known Member Licensed User Longtime User Apr 13, 2015 #10 Code: "java.net.UnknownHostException: my_site_destination" What are you putting for the server(proxyhost) example IP 000.000.000.000 or www.example.com Upvote 0
Code: "java.net.UnknownHostException: my_site_destination" What are you putting for the server(proxyhost) example IP 000.000.000.000 or www.example.com
FabioRome Active Member Licensed User Longtime User Apr 27, 2015 #11 Resolved: https://www.b4x.com/android/forum/threads/resolved-setting-http-proxy.53116/ Upvote 0