Proxy problem accesing to a URL
I'm trying to access a URL behind a proxy with password autenthication.
I tryed in this way:
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "myproxy");
System.getProperties().put("proxyPort", "80");
Authenticator.setDefault(new MyAuthenticator("us","pw"));
URL url = new URL("http://giadasvil/analisi");
InputStream inputStream = url.openStream();
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream,"UTF-8"));
StringBuffer res = new StringBuffer();
String str = "";
while((str=in.readLine())!=null)
res.append(str);
return res.toString();
where MyAuthenticator:
static class MyAuthenticator extends Authenticator {
String user;
String password;
MyAuthenticator(String user, String password){
this.user = user;
this.password = password;
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication (this.user, this.password.toCharArray());
but I receive this exception:
java.io.IOException: Server returned HTTP response code: 407 for URL: http://giadasvil/analisi
can anyone help me?
thank in advance
Thanks a lot gunther.
But I haven't resolved the problem yet.
Proxy address and proxy port are correct because I receive a code 407 forbidden.
I'm agree the problem is the authentication with proxy.
I'm sure that my login credentials are correct, if not I can't be here writing in this forum.
I'm using windows OS.
I configured LAN settings of my browser with my proxy address and port.
And it works fine, without manually authentication with proxy.
so I supposed that my browser use for authentication with proxy my windows account and password.
I have just tried to run The example in various way:
- account password url
- domain\account password url
- domain\\account password url
- domain/account password url
- domain//account password url
but it still don't work.
The problem could be that the only protocol supported by my proxy is http.
My url is: http://www.virgilio.it
so i supposed that the protocol used is http, but i don't know how the class URL works.
The problem can be these limitation in the suported protocol of my
Proxy?
Similar Messages
-
OEL 6.1 YUM proxy problem
Hi all,
I have some issue with OEL 6.1 YUM proxy.
*[root@rac1 tmp]# uname -a*
Linux rac1.oracle.cloud 2.6.32-100.34.1.el6uek.x86_64 #1 SMP Wed May 25 17:46:45 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
*[root@rac1 tmp]# rpm -qa | grep yum*
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-3.2.29-17.0.1.el6.noarch
yum-rhn-plugin-0.9.1-26.0.2.el6.noarch
yum-utils-1.1.30-6.el6.noarch
PackageKit-yum-plugin-0.5.8-19.0.1.el6.x86_64
PackageKit-yum-0.5.8-19.0.1.el6.x86_64
*[root@rac1 tmp]# cat /etc/yum.repos.d/public-yum-ol6.repo*
[ol6_ga_base]
name=Oracle Linux 6 GA - $basearch - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=0
enabled=1
[ol6_u1_base]
name=Oracle Linux 6 U1 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=0
enabled=1
*[root@rac1 tmp]# cat /etc/yum.conf*
[main]
cachedir=/var/cache/yum/$basearch/$releasever
debuglevel=2
sslverify=false
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
# The proxy server - proxy server:port number
proxy=http://xxx.xxx.xxx.xxx:3128
# The account details for yum connections
proxy_username=xxx
proxy_password=@$xxx
*[root@rac1 tmp]# yum update*
http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 5 - "Couldn't resolve proxy '[email protected]'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ol6_ga_base. Please verify its path and try again
[root@rac1 tmp]#
In OEL5.7 this works fine without any problem. I think this related to OEL6.1, maybe YUM does not understand proxy, my password for proxy starting with @$ but I changed my password and
output is changed to
*[root@rac1 tmp]# yum update*
http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 407"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ol6_ga_base. Please verify its path and try again
[root@rac1 tmp]#
If anyone can help me please reply.
./thanksAvi Miller wrote:
__OUTSIDER___ wrote:
No this will not help. Problem is not related to password I changed it and response is It might help, it's worth trying. Try this:
# export http_proxy='http://proxy.domain.com:3128'
# wget --proxy-user="xxx" --proxy-password="xxx" http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/x86_64/repodata/repomd.xmlIf that works, it is a yum problem. If it doesn't work, it's a proxy problem.Yes it works , interesting that user and password parameters not working with double quotes only with single.
I also checked this with YUM but YUM is having problem with passwords that starting
with "@" symbol. I try to set
export http_proxy="http://username:\@$passwd@IP:PORT"
for ignoring "@" symbol but no sucess. With OEL5 this is not a problem. In /etc.yum.conf same username and same password.
Perhaps I should change my password :)
and last one thing in my home network I have OEL6.1 ( where fortunately with no proxy :) ) I try update linux with "yum update" command
and it returns that no packages to update , can you tell me why because there are new kernel avalable and I can download and install this new kernel with command "yum install kernel". -
Problem in connecting external URLs from Java ME Platform SDK 3.0
Hello all,
I am building a mobile application using Java ME Platform SDK 3.0. My application needs to connect to external web services. I have finished development of first module and it is running perfectly from actual mobile device. But the problem is:
While developing the application I am used to test it with given mobile Emulators in Java ME Platform SDK 3.0. During this test I am not able to connect to external web service if I am testing if within local intranet using proxy server. To solve this I have configured Proxy Setting in the IDE at:
Tools Menu -> Options -> General -> Manual Proxy Settings and given HTTP Proxy Server and it's Port. The same proxy settings are there in all web browsers in my machine.
But It is giving error like:
Unknown error 10054 during socket::read
Strange thing is that the same application is running perfectly If my PC is not in Intranet and connected to internet directly.
Please help me that how can I set proxy settings in Java ME Platform SDK 3.0 to get in working?
Any suggestions regarding this will be helpful for me.
Thanks to spare some time and read my post,
Tejas.Hi Tejas,
it should work. I tested it right now and my proxy was used without any problems. The way how you set proxy settings is correct.
Could you try following to verify that it is a proxy problem or not, please?
1. run demo application "Demos" (from Start Page or File->Open Sample Project)
2. choose "HttpView" midlet and start it
3. choose "cnn"
4. if proxy is set correctly, you will see page source; otherwise you will get an error message
If the demo runs fine, the problem is probably somewhere else in the communication.
There is one limitation in proxy settings. Only proxy without username and password is supported. Isn't it your case?
Regards,
Radko -
Hi all,
I am trying to develope an itegration scenario as follows:
ABAP System ---> XI -
Java System
For communication between ABAP System and XI there is a Proxy, however it is not working out.
The message from ABAP system does not go to XI.
I got the following message in SXMB_MONI of ABAP Sytem:
SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
<SAP:P1>Envelope</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>XML element Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Someone has solved a problem like that?
Regards
FabioHi Fabio,
I would request to to check for two things,
1. Whats ur was version? Is it 640? else can you try to change the Commumnication channel in xi adapter to message protocal as xi2.0 ,, i think you used it as xi3.0
2. retest it.
3. If it still gets the same error refer the thread,
XI Proxy Problems
All the best,
Anirban. -
Problem with UI5 ESS URL with Role Upload in HR Renewal 2.0
Hi Experts,
We are in the process of implementing the HR Renewal 2.0 FP1.
I have made the custom copy of the Standard PFCG ESS role SAP_EMPLOYEE_ESS_XX_UI5_1 into ZSAP_EMPLOYEE_ESS_XX_UI5_1.
I was able to upload this role in to SAP Portal by selecting the default system object created to point to our ECC system and assigned the ESS role to the end user.
Now the problem is with the URL which needs to points to the UI5 ESS Landing page in the ECC system. Instead the URL path now is,
http://portalhost:50000/sap/bc/ui5_ui5/sap/arsrvc_suite_pb/main.html?page=HR_SELFSERVICES.
I have maintained the system object name in the Generic Content property category of iView and still it picks up the portal URL.
The relative path should be appended with the ECC host details instead of portal host details.
Please help me to resolve the issue.
Thanks,
UrmiHi Sharadha,
Run the role from backend and make sure its has correct expected url, then from portal we can address it easily.
Once you copy and make Zrole, you have to modify and it should point it to the correct catalog.
In case if you still face issue, pls open a new thread and past ur screen shots and details, so that we can suggest appropriate.
Regards
Yugandhar reddy -
Problem with https internet url for Portal
Hello ,
We are running EP 7 SP 13.
We had a problem with the j2ee engine going down due to a db problem .It is ok now and and j2ee is up and running fine and the portal is accessible from the intranet.
But there is a problem with the https url that we use for internet access. It gives "page cannot be displayed error".
There is a IISproxy in place for internet access.Https certificate has not expired. Couldnt find much in the portal logs and trace or am I looking in the wrong place?
Any help would be most appreciated.
RgdsHi Vineeth
Check the IIS settings, , they might not have started properly.
EP5: Enabling SSL and renewing the J2EE certificate
SAP Note Number: 685306
Can you check the contents of Keystore in Visual admin,
Regards
Kaleem
Edited by: Kaleem on Aug 19, 2008 2:11 PM -
Proxy Problem The proxy server is refusing connections
I run Windows XP. I did have a Cybot backdoor Activity attack intercepted by Norton Internet Security and I used the Norton NPE to remove it from the computer. I do not know if this caused the proxy problem or not.
There is no proxy problem connecting to the internet through Internet Explorer just through Mozilla Firefox.
When Mozilla Firefox tries to connect to the internet I get the following message:
Firefox is configured to use a proxy server that is refusing connections.
Check the proxy settings to make sure that they are correct.
Contact your network administrator to make sure the proxy server is
working.
In Mozilla I click Tools, options, advanced, network, settings. Under settings Proxy is set on manual, it says that there is no proxy for the figures typed in.
So I click auto detect proxy and I then can connect to internet through Mozilla, however when I log out of the internet, the same proxy server issue is recreated.
What should the Proxy setting be?You can find the connection settings in Tools > Options > Advanced : Network : Connection
If you do not need to use a proxy to connect to internet then select "No Proxy"
See "Firefox connection settings":
* https://support.mozilla.com/kb/Firefox+cannot+load+websites+but+other+programs+can
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
See also:
*http://kb.mozillazine.org/Preferences_not_saved -
Problem in writing the URL in Paging tag
This is the part of my code which actually does paging
<table width="544">
<pg:paging url="AdminPolicies.jsp?catid=${catid}">
<c:forEach var="Material" items="${mat}" varStatus="row" >
<pg:item>
<tr class="${row.index % 2 == 0 ? 'even' : 'odd'}"><td id="line"><strong><a id = "link" href="Admin/${Material.location}">
<c:out value="${Material.name}" /></a></strong>
Author: <c:out value="${Material.author_fname}" /> <c:out value="${Material.author_lname}" />
<c:out value="${Material.description}" />
Submitted By: <c:out value="${Material.submitter}" />
Date Submitted: <c:out value="${Material.date}" />
<%
if(loggedUser.isInRole("admin"))
%>
<div id="right"><a href="Admin/EditMaterial.jsp?catid=${Material.catid&scatid=${Material.scatid&name=${Material.name}&submitt=EditMaterial&no=no ">Edit</a> | <a href="Admin/EditMaterial.jsp?catid=${Material.catid}&scatid=${Material.scatid}&name=${Material.name}&delete=delete&noscatid=noscatid " onClick="return confirm('Are you sure you want to delete this Material');">Delete</a></div>
<%
%>
</td></tr>
</pg:item>
</c:forEach>
<pg:index>
<pg:page><%=thisPage%></pg:page>
<pg:nextPages><a href="abc.com">ABh</a></pg:nextPages>
</pg:index>
</pg:paging>
</table>
My problem is that in url="AdminPolicies.jsp?catid=${catid}
I am not getting the value of catid. i.e ${catid} comes out to be blank when I click on the link of page 2.
catid is the value on my page which I get from request object.
Can u tell me how can I get the catid value in URL tag.
Also placing the caid in this <%=catid%> way does not work.
Waiting for your reply,
AnikethHello Can anyone put some light on this post...
-
How could I set the proxy settings for just some URLs and not for all?
Hello,
I am using HttpURLConnection to establish a HTTP connection . The connection pass through a proxy, and it requires security.
I know that I can set the proxy settings in the system properties, and this works perfect.
But I don't want to set the proxy settings in the system properties, because this proxy settings will be for ALL the URLs, and I just want for a few URLs.
How could I set the proxy settings for just some URLs and not for all?
Thanksjava.net.URL.openConnection(java.net.Proxy proxy)
@since 1.5 -
Hello all,
I have an applet which connects to a MySQL database for user authentication. Currently I am doing on a local machine and all goes well and fine. But my problem is the same applet when accessed through a proxy the database connection wont happen. Can someone suggest a way to solve it. Or this problem is not solvable.
Thank you
josephUse http to do the authentication. Have the applet make a request to the authentication server by name (not by codebase, as this is probably the source of the proxy problem). On the authentication server, you can run a servlet or cgi or whatever to contact the db.
-
In the newest verion of Firefox did you fix the proxy problem?
I am using firefox 3.6 because of a proxy problem with Firefox 5 I want to upgrade but need to know if you fixed this problem before i do so.
You can find the connection settings in Tools > Options > Advanced : Network : Connection
If you do not need to use a proxy to connect to internet then select "No Proxy" if the default "Use the system proxy settings" setting doesn't work.
See "Firefox connection settings":
* https://support.mozilla.com/kb/Firefox+cannot+load+websites+but+other+programs+can
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
*http://kb.mozillazine.org/Preferences_not_saved -
Problem creating a web service PROXY from a wsdl file/URL
Hi,
I am experiencing problems when I want to import a WSDL file for creating a proxy object.
When I import the WSDL file from URL I get an error like this: <b>404 Not Found
The requested resource does not exist.</b>
Then, I try to create it from a file, but I get other error:
<b>Document not found (path o:\BCS.WSDL, error code 7</b>
The error code 7 indicates <b>unknown error</b>
Any help?.
thanks in advance.
Eduardo.Hi,
I've done the same from other ECC6.0 System and everything was working perfetly, why all this can happen?
I've ckecked the activation of the proxy objects, traces, etc... and it's the same in both systems, what more should i check?
Thanks in adavance. -
How do I get proxy authentication working with PDK-URL Services?
I am posting this question for a PDK user
HEllo!!!
I installed the jpdk and the urlservices.
In the company, we have to log into the proxy server before
we can go to the internet.
How can setup my urlservices so they can pass this
authentication
proxy ? Can I put the username and password in the provider.xml?
I already tried to put the username and password in the url,
like
this : http://username:[email protected] But this doesn't
work.
When I try registry , I receive the following error :
An error occurred when attempting to call the providers register
function. (WWC-43134)
An unexpected error occurred: ORA-29532: Java call terminated by
uncaught Java exception: java.io.InterruptedIOException:
Connection establishment timed out (WWC-43000)
An unexpected error occurred: java.io.InterruptedIOException:
Connection establishment timed out
at HTTPClient.HTTPConnection.getSocket(HTTPConnection.java)
at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java)
at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java)
at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java)
at HTTPClient.HTTPConnection.Post(HTTPConnection.java)
at
oracle.webdb.provider.web.ProviderConnection.connectToProvider
(ProviderConnection.java:171)
at oracle.webdb.provider.web.HttpProviderDispatcher.dispatch
(HttpProviderDispatcher.java:804)
at
oracle.webdb.provider.web.HttpProviderDispatcher.registerProvider
(HttpProviderDispatcher.java:259)
(WWC-43000)
Can anybody help me?
Any information is welcome.
Thanks !
Robson GodoyWe have an undocumented 'Authenticating Proxy' feature, which can be used when user needs to be authenticated before accessing external sites.
Sample usage in provider.xml:
<proxyInfo class="oracle.portal.provider.v1.http.ProxyInformation">
<httpProxyHost>proxy.server.com</httpProxyHost>
<httpProxyPort>8080</httpProxyPort>
<proxyUser>abcd</proxyUser>
<proxyPassword>123456</proxyPassword>
<proxyRealm>your_proxy_realm</proxyRealm>
</proxyInfo>
Three new tags introduced here are :
(i) proxyUser - name of proxy user
(ii) proxyPassword - password for the above user.
(iii) proxyRealm - Realm under which this user information is valid.
Please edit all the tags and provide your domain specific proxy details.
Please post your results (successes and problems) on the forum to enable us to better scope how stable this undocumented feature is before moving forward. -
Hi!
I am configuring Oracle iPlanet is 7.0.15 to have one instance reverse proxy to another instance. They are different only in port numbers. The destination port is 2321.
I have set up the reverse proxy in Content Handling -> Reverse Proxy setting.
Problem is: When I display the URL of the proxy in the web browser, I see the index.html of the original instance, not the destination instance. I am expecting the web page to be redirected to the destination instance. Please help. Thanks.
Here is the config:
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# You can edit this file, but comments and formatting changes
# might be lost when you use the administration GUI or CLI.
<Object name="default">
AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
NameTrans fn="ntrans-j2ee" name="j2ee"
NameTrans fn="pfx2dir" from="/mc-icons" dir="/package/oracle/webserver7/lib/icons" name="es-internal"
NameTrans fn="map" from="/hk" name="reverse-proxy-/hk" to="http:/hk"
PathCheck fn="uri-clean"
PathCheck fn="check-acl" acl="default"
PathCheck fn="find-pathinfo"
PathCheck fn="find-index-j2ee"
PathCheck fn="find-index" index-names="index.html,home.html,index.jsp"
ObjectType fn="type-j2ee"
ObjectType fn="type-by-extension"
ObjectType fn="force-type" type="text/plain"
Service method="(GET|HEAD)" type="magnus-internal/directory" fn="index-common"
Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
Service method="TRACE" fn="service-trace"
Error fn="error-j2ee"
AddLog fn="flex-log"
</Object>
<Object name="j2ee">
Service fn="service-j2ee" method="*"
</Object>
<Object name="es-internal">
PathCheck fn="check-acl" acl="es-internal"
</Object>
<Object name="cgi">
ObjectType fn="force-type" type="magnus-internal/cgi"
Service fn="send-cgi"
</Object>
<Object name="send-precompressed">
PathCheck fn="find-compressed"
</Object>
<Object name="compress-on-demand">
Output fn="insert-filter" filter="http-compression"
</Object>
<Object ppath="http:*">
Service fn="proxy-retrieve" method="*"
</Object>
<Object name="reverse-proxy-/hk">
Route fn="set-origin-server" server="http://localhost:2321"
</Object>
Please help. Thanks.Hi,
You have set up your reverse proxy on the URL '/hk'
NameTrans fn="map" from="/hk" name="reverse-proxy-/hk" to="http:/hk"
If you want this to work for the URL '/index.html', you need to set up the revere proxy on the URL '/'.
regards
Tracey -
O-Portal behind reverse proxy, aliasing of o-portal url to generic url.
I'd like to setup o-Portal behind a reverse proxy. This is a proxy service which accepts connections on http://a.b.com/ and gets the content from internal webservers based on the url. For example http://a.b.com/pls/DAD1 comes from an o-Portal server but http://a.b.com/depts/ comes from a webserver. The problem with o-Portal is now, that it creates pages with its servername and port in the URL of the pages it serves out. For example, if it runs on server x.b.com on the port 7777 the links on all pages are http://x.b.com:7777/pls/DAD1. To get it to work correctly with my proxy, all these links should be http://a.b.com/pls/DAD1 and then the proxy gets the pages from http://x.b.com:77777/pls/DAD1.
How do I tell o-Portal to create this different URL in its pages? You could also say, I'd like to alias http://a.b.com/pls/DAD1 to http://x.b.com:77777/pls/DAD1
I'm sure there is a configuration setting to change this. We had the same problem with Oracle HR11i and there we got it solved.
Web Single Sign On applications like IBM WebSeal or Netegrity Siteminder use these kind of proxies to protect the intranet and to create a Single Sign On domain for all web servers.
Thanks,
RainerI also would like overcome this issue. I could not find an answer anywhere on Metalink or OTN.
Can a reverse-proxy (i.e. using ProxyPass & Reverse) be used with and internal Portal?
John Z
Butler Mfg. Co.
[email protected]
Maybe you are looking for
-
Firefox 4b2 and Windows 7, multiple tabs shows up as windows in OS-taskbar
I have been using Firefox on my Windows 7 based computer (Ultimate x64) and I didn't experience this when using v3.6 and earlier versions. But ever since I updated to v4 (beta 1 and now beta 2), I have noticed that when I have multiple tabs open in F
-
Certain songs wont transfer from my itunes to my iphone, it's telling me that the computer is not authorized but once I go up to Store and authorize computer and enter in my info, it tells me that the computer is already authorized. So why am I not a
-
Can't use java on any programs
so im trying to use a program that needs java, and it does start but you can't do anything or shuts down the mac hangs and it stops responding. aagggghhh
-
NB: JAVA_HOME should point to a JDK not a JRE
i have set the JAVA_HOME properly but it's still not working....can anyone of u help me out?
-
Is there a way to play avi files in front row? Also, quicktime and avi files. I cant get them to work. Vlc media player opens them but Its not the default player. How can I make it then if I cant make quicktime play them. Thanks, Mac noob.