JRE proxy bypass for local addresses always bypasses proxy

Hi all,
I'm currently dealing with an issue with the proxy configuration in java.
Situation: I need a proxy server to connect to the internet, and I have some addresses configured in Internet Explorer that bypass the proxy.
example of the way I configured it : *.google.com;212.115.*;62.69.179.198
The address that I am trying to reach is not in the bypass list, or in any of the excluded ranges in the bypass list.
Initially I had java configured using browser settings. I thought it did not pick up the browser settings at all.
However after configuring the proxy manually in java it was still not working.
During the research I came to the conclusion that as soon as I enable the "bypass proxy server for local addresses" in Internet Explorer, or manually in java.
The JRE client automatically bypasses the proxy and is always using "proxy=direct" . As soon as I disable that feature it starts using the proxy server.
I have no idea why this is happening ?

Your message was an eye opener for me. Thanks!
You were right, that option shouldn't be enabled. During testing I got confused and was told that option needed to be enabled to enable the exception list.
But that was a stupid assumption.
I disabled the option bypass proxy for local addresses and just filled in the exception list and now it works again.

Similar Messages

  • How to know whether bypass proxy for local address is enabled in browser

    Can anyone help me in finding out whether the check box "bypass proxy server for local address" in Internet explorer (Tools->Internet options->Connections->LAN Settings) is enabled from java plug in.
    In my applet application if that checkbox is enabled then i have to throw a message saying that the checkbox is enabled.
    Thanks in Advance
    Regards
    Vijay

    We have been in discussions with Microsoft over the last few days on this issue - which is seen with Outlook 2007 versions onwards.  Extract from resolution communication from Microsoft:
    The issue you have raised is known as it has been reported and when you have a proxy set in Internet Explorer and “Bypass proxy settings for local addresses”, Outlook will attempt to connect to Office 365 directly – like the bypass rule would apply.
    Because the direct connection is blocked in the Firewall, Outlook needs to have the connections going in Timeout before attempting to connect using the Proxy.
    Your network trace proves the issue.
    Microsoft have scheduled a fix for Outlook 2010 in February 2014 cumulative update. A fix for Outlook 2013 will also follow, but Outlook 2007 will not be addressed because it is in Extended Support.
    There are two possible workarounds for this behaviour:
    First, and I wouldn’t recommend it, is to allow Direct traffic through the Firewall to Office 365.
    The advantage of this approach is that it will be done centralized and it will impact everyone immediately.
    Information about the O365 IP addresses
    There are two downsides to this behaviour:
    1.  First you need to maintain the Firewall exceptions as IP from O365 server can change without notice
    2.  Second, winhttp traffic may go through both proxy and direct and this can cause unforeseen behaviour.
    The second approach is to use a proxy pac instead of manually setting in the proxy and the exceptions.
    The advantage is that you will have centralized method to control how winhttp traffic goes and the issue will not be experienced anymore.
    If a single pac does not be fit, you can configure proxy pac files for each site requirements and use an IIS server to store it.

  • Bypass Proxy for Local Addresses

    All-
    With the new 2.0 software, I am now able to connect my 3G iPhone to the WiFi network at work. The network uses an authenticated proxy to get external access. I can access external sites just fine now, but I can't see internal sites. The proxy settings on my work desktop give me the option to "bypass proxy server for local addresses".
    Is there any way to do this on an iPhone?
    Right now I need to make a choice between access only internal sites or only external sites.
    Thanks!
    MF

    While not wanting to be a total weenie, ME TOO
    After a bit of searching, the best we're going to be able to do right now is use a Proxy Auto-Config (.pac) file. I'm drawn to this conclusion from combining a lot of web searches with a peek at the "iPhone and iPod touch Enterprise Deployment Guide, Second Edition" (available at http://manuals.info.apple.com/enUS/Enterprise_DeploymentGuide.pdf, or via the Apple iPhone Enterprise support page at http://www.apple.com/support/iphone/enterprise/.
    Setting the PAC file using the iPhone v2.x software is pretty direct - click the little arrow next to the network you want to configure, scroll down to the bottom where the proxy settings live. Choose "Auto" and enter the Auto-config URL.
    That's the good news. The bad news is that I'm not entirely sure what that entails w.r.t. using one with the iPhone software. I'm not entirely clever enough to create such a file nor am I clever enough to know how to stick such a file onto my iPhone. I'm going to run this around my local team to see what they can come up with. If they come up with a solution (and it's simple enough for me to do AND explain), then I'll post a follow-up. Until then, good luck to you AND if you figure something out feel free to share with everyone else.
    Ron

  • Bypass Proxy for Local Addresses - Office 365 connection/ Outlook 2010

    This is a strange one.  Connectivity to Office 365 within our netwotk works fine although very slow for outlook 2010 client to initially connect. Once connected, it works ok.  I have done a netwotk trace using netmon to see if i can identify
    the reason for the slow startup (2 mins minumum for profile to load and for outlook to connect to exchange). The trace tell me that my local pc tries to make a direct connection to the office365 external IPs first, then tries the TMG proxy. Once it hits the
    proxy, it kicks into life and works.
    So it looks to me like it thinks the external IP address of office 365 is an internal address and spends it time trying all the ip addresses until it trys the proxy.  At this point, the
    Bypass Proxy Server for Local Addresses is ticked.
    As soon as i untick this box, all traffic heads directly to the proxy and of course it connects like lighting.  The exchange settings proxy is set in outlook for "on fast networks, connect using HTTP first, then connect using TCP/IP" (tick
    is on) and the same for slow networks.
    I cant for the life of me work out why it tries to connect directly to the external IPs first and not connect via TMG until i untick the
    Bypass Proxy Server for Local Addresses
    Would love any ideas that may assist.

    We have been in discussions with Microsoft over the last few days on this issue - which is seen with Outlook 2007 versions onwards.  Extract from resolution communication from Microsoft:
    The issue you have raised is known as it has been reported and when you have a proxy set in Internet Explorer and “Bypass proxy settings for local addresses”, Outlook will attempt to connect to Office 365 directly – like the bypass rule would apply.
    Because the direct connection is blocked in the Firewall, Outlook needs to have the connections going in Timeout before attempting to connect using the Proxy.
    Your network trace proves the issue.
    Microsoft have scheduled a fix for Outlook 2010 in February 2014 cumulative update. A fix for Outlook 2013 will also follow, but Outlook 2007 will not be addressed because it is in Extended Support.
    There are two possible workarounds for this behaviour:
    First, and I wouldn’t recommend it, is to allow Direct traffic through the Firewall to Office 365.
    The advantage of this approach is that it will be done centralized and it will impact everyone immediately.
    Information about the O365 IP addresses
    There are two downsides to this behaviour:
    1.  First you need to maintain the Firewall exceptions as IP from O365 server can change without notice
    2.  Second, winhttp traffic may go through both proxy and direct and this can cause unforeseen behaviour.
    The second approach is to use a proxy pac instead of manually setting in the proxy and the exceptions.
    The advantage is that you will have centralized method to control how winhttp traffic goes and the issue will not be experienced anymore.
    If a single pac does not be fit, you can configure proxy pac files for each site requirements and use an IIS server to store it.

  • Remote Desktop "Bypass RD gateway server for local addresses" no longer working in Windows 8

    Hi,
    After installing windows 8, it seems like the "Bypass RD gateway server for local addresses" is no longer working.
    In Windows 7, when the option is checked, I could have the server name set always and the client will automatically detect whether to use the RD gateway or not. For example, from my house, if I am connecting to a computer at my work, which requires
    the RD gateway, it will automatically pops up the dialog for authentication method. However, if I connect to a computer in my home network, it will just automatically connects without asking authentication for the RD gateway.
    However, after installing windows 8, this does not seem to work as expected anymore. The option is checked but the Windows Security dialog pops up in both situations and so i have to either save the rdp file locally and pin it to the taskbar or switch between
    disabling and enabling the RD gateway whenever I need to connect to different machines.
    Is this a regression in Windows 8? Is anyone else experiencing the same issue?
    Thanks

    Another way to resolve this issue for me, beside of configuring RDP to connect directly to server also on unmanaged network, will be to turn the "wifi" subnet in a managed network, as the "wired" subnet is.
    The differences between thoses to subnets, dynamically assigned by the same DHCP server, are:
    The "wifi" is in a private IP range, the "wired" is in a public IP range
    There's an ACL on the "wifi" subnet, not on the "wired"
    The next step is to compare frames send/received when on the two networks. Something will likely tell for the network to be managed.
    Beside, I'm still searching informations about NLA, which is responsible for setting a nework as managed or not.
    Here are some clues:
    http://blogs.technet.com/b/networking/archive/2010/09/08/network-location-awareness-nla-and-how-it-relates-to-windows-firewall-profiles.aspx
    http://social.technet.microsoft.com/Forums/windows/en-US/49ea0a6b-9c03-407d-8e26-24a92849a282/network-location-awareness-signature?forum=w7itpronetworking
    If anybody has official MS informations about NLA (A for Awareness and not Authentication), please share!

  • AddressProvider for local-address

    I was wondering if it is possible to use the AddressProvider for local-address. For <unicast-listener> there are sub elements <adddress> and <port>. Is it possible to use address provider to set this value?
    I understand the address-provider can be used under the <well-known-address> to provide list of all wka nodes dynamically. Wanted a similar option to set the local port as well.
    Edited by: 798623 on Oct 5, 2010 9:12 AM

    I'm afraid there is no "pluggable" capability for selecting local hostname and port.
    Can you elaborate a bit more as to why you would need this capability?
    /Christer

  • Windows Phones 8.1 - Proxy bypass for local adresses

    Hi,
    when using wifi on wp8.1, you can use a proxy for internet Access in your corporate lan. Is there any possibilty to bypass this proxy for local adresses, that you can acess also intranet?
    Thank's a lot.
    Carsten

    Very soon ..in the current Quarter (Jul - Sep) .. No specific date is available which may differ depending on the Region

  • GWIA doing DNS lookup for local address

    Hello,
    I am running GW8.0.2 on Netware 6.5sp8. I have a server that our recreation department uses to send out confirmation emails when a customer signs up for a class. The recreation server and the GWIA are on the same subnet.
    Here's the problem: When the Rec server sends out the first email confirmation, it gets sent out successfully. Subsequent emails after that fail. After about twenty minutes the next email will go out OK again but subsequent emails will fail.
    The verbose logs on the GWIA don't tell me much but the diagnostic logs show what looks like a reverse DNS lookup happening at the GWIA for my local IP address of 10.0.0.3 (the Rec server). This reverse DNS lookup fails (probably a timeout) and subsequent emails from this local Rec server get dropped by the GWIA without the DNS lookup.
    DNS is being done by DNS proxy on Bordermanager 9.2. I've bypassed the Bordermanager DNS and the same thing happens. I've made entries for the local Rec server into a route.cfg file but the GWIA seems to want to ignore these entries and keeps doing the DNS lookup.
    The wierdest part of the puzzle is that if I restart the proxy on the Bordermanager the next email will go out with, of course, subsequent emails failing. I've looked at the proxy dns cache and can't even find an entry for my Rec server.
    Attached are the entries from the Diagnostic logs of the GWIA. Novell tech support has assured me that the GWIA and the BM are working fine. I am also having this problem with a scanner that scans then emails but all other email and Bordermanager are functioning fine. This server and scanner were not having this problem before upgrading to GW8.0.2.
    I don't understand why GWIA is doing DNS lookups for a local address and I don't know what I can do to stop it. Any help would be greatly appreciated.
    This is a successful transfer right after restarting the proxy: 10.0.0.3 is the Rec server, 10.0.0.130 is the GWIA and 10.0.0.1 is the Bordermanager.
    16:04:13 D15 NgwResQuery(3.0.0.10.in-addr.arpa, 1, 12)
    16:04:13 D15 Querying server (# 1) address = 10.0.0.1
    16:04:13 D15 HEADER:
    16:04:13 D15 opcode = QUERY, id = 17615, rcode = SERVFAIL, flags: qr aa rd
    16:04:13 D15 query = 1, answer = 0, authority = 0, additional = 0
    16:04:13 D15
    16:04:13 D15 QUESTIONS:
    16:04:13 D15 3.0.0.10.in-addr.arpa, type = PTR, class = IN
    16:04:13 D15
    16:04:13 D15 rcode = 2, ancount=0
    16:04:13 D15 NgwResQuery failed
    16:04:13 D15 DMN: MSG 2000909 Accepted connection: [10.0.0.3] ()
    16:04:13 D15 Successful login with client/server access: 10.0.0.130:1677
    16:04:13 D15 DMN: MSG 2000909 Receiving file: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\3RD\receive\df30 fad4.221
    16:04:13 D15 DMN: MSG 2000909 SMTP session ended: [10.0.0.3] ()
    This is an unsuccessful transfer:
    16:06:08 D04 timeout
    16:06:08 D04 NgwResQuery: send error
    16:06:08 D04 NgwResQuery failed
    16:06:08 D04 DMN: MSG 2000933 Accepted connection: [10.0.0.3] ()
    16:06:08 D04 DMN: MSG 2000933 SMTP session ended: [10.0.0.3] ()
    Then the successful email comes back into the system:
    16:06:26 AA8 MSG 2000909 Processing inbound message: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\receive\DF30FAD4 .221
    16:06:26 AA8 MSG 2000909 Sender: [email protected]
    16:06:26 AA8 MSG 2000909 Recipient: [email protected]
    16:06:26 AA8 MSG 2000909 Queuing to MTA
    16:06:26 AA8 MSG 2000909 File: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\wpcsin\4\4daf048 2.8m1 Message Id: (4DAF66F2.B67:244:35687) Size: 163.3 Kb

    Thanks Massimo. I could have swore I already did that but when I did it again just to make sure it solved the problem. Appreciate the help. Have a good one.
    Originally Posted by mrosen
    On 02.05.2011 21:06, avanrav wrote:
    >
    > Hello,
    >
    > I am running GW8.0.2 on Netware 6.5sp8. I have a server that our
    > recreation department uses to send out confirmation emails when a
    > customer signs up for a class. The recreation server and the GWIA are on
    > the same subnet.
    >
    > Here's the problem: When the Rec server sends out the first email
    > confirmation, it gets sent out successfully. Subsequent emails after
    > that fail. After about twenty minutes the next email will go out OK
    > again but subsequent emails will fail.
    >
    > The verbose logs on the GWIA don't tell me much but the diagnostic logs
    > show what looks like a reverse DNS lookup happening at the GWIA for my
    > local IP address of 10.0.0.3 (the Rec server). This reverse DNS lookup
    > fails (probably a timeout) and subsequent emails from this local Rec
    > server get dropped by the GWIA without the DNS lookup.
    >
    > DNS is being done by DNS proxy on Bordermanager 9.2. I've bypassed the
    > Bordermanager DNS and the same thing happens. I've made entries for the
    > local Rec server into a route.cfg file but the GWIA seems to want to
    > ignore these entries and keeps doing the DNS lookup.
    >
    > The wierdest part of the puzzle is that if I restart the proxy on the
    > Bordermanager the next email will go out with, of course, subsequent
    > emails failing. I've looked at the proxy dns cache and can't even find
    > an entry for my Rec server.
    The reverse DNS done by GWIA is normal, and can't be stopped or tricked.
    That it fails in such odd ways must be a bug with the reverse DNS proxy
    of Bordermanager though. Apparently on the second lookups, it doesn't
    answer in a timely manner (the type of answer is irrelevant, just it
    *has* to answer). Use a different, "real" DNS server for your GWIA.
    CU,
    Massimo Rosen
    Novell Product Support Forum Sysop
    No emails please!
    Untitled Document

  • How do you bypass the proxy for local addresses? It keeps prompting me for user id and password to access an intranet page

    When trying to launch an intranet web site, it won't connect. It prompts me for a user id and password. I can get to external sites, and I have already added the site into the "No proxy for" dialog box

    It depends where you publish your pages.
    At MobileMe you can password protect a Site in iWeb. A Site is a collection of pages. If you want to protect a single page for a single person, you have to create a Site with one page and protect it.
    When publishing at a 3rd party webhost, you can password protect a page or directory in a administration panel. Check with your host. iWeb is not involved there.

  • Trouble with creating subdomains for .local address

    I'm a web developer on Mac OS X 10.5.6 and I use my MacBook Pro as my primary development and testing machine. I have Apache 2 running and Entropy PHP 5.2.4. All of that works fine. In the past, I didn't use virtual hosts. Instead, I would divide my projects into subfolders of /Library/WebServer/Documents
    One day, I wised up and created virtual hosts by adding the appropriate entries to /etc/apache2/extra/httpd-vhosts.conf and by adding a few corresponding hostnames to /etc/hosts.
    In the hosts files, I "created" subdomains for each site. For example: If I was working on a site for Dairy Queen, I might add the following line to /etc/hosts:
    127.0.0.1 dq.local
    Then I would add the virtual host to /etc/apache2/extra/http-vhosts.conf and it would look something like the following:
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Library/WebServer/DairyQueen/Documents"
    ServerName dq.local
    <Directory "/Library/WebServer/DairyQueen/Documents">
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    I've been setup in the above way for many months and it all works great. On my computer, I can enter dq.local in my browser and it pops right up.
    I've even modified the hosts file in my Parallels Virtual machines running Windows. And from any browser in any of my Virtual machines, I can reach my various .local domains hosted by Mac OS X.
    *The Problem:* If I want to browse the site from another computer on my local network (or my iPhone), they will not find my MacBook Pro in the .local domain without editing the /etc/hosts files on those devices -- which is a nightmare scenario because A) I can easily edit the /etc/hosts file on the iPhone, B) It's inconvenient to have to edit /etc/hosts files on the myriad of devices, and C) I would have to have my laptop set to a static IP -- something I could easily accomplish, but it's just not as clean of a solution as I'm looking for.
    I realized that when using Bonjour, my MacBook Pro shows up to other computers as "Christophers-MacBook-Pro.local". I thought, hmmm ... maybe I could utilize that by dividing it into subdomains. For example, I would modify the vhosts file setting the new domain name to dq.christophers-macbook-pro.local, I would modify my own /etc/hosts file to say:
    127.0.0.1 dc.christophers-macbook-pro.local
    ... and Voila! I'd be done, right? Nope!
    Of course on the MacBook Pro that's hosting the sites, I can browse to dq.christophers-macbook-pro.local, and it works fine just like it did when it was dq.local.
    On a PowerBook G4 (running a freshly installed and clean 10.5.6), going to dq.christophers-macbook-pro.local results in the wrong site from coming up. What!?
    Note that when I go to just "christophers-macbook-pro.local" on the iPhone and the PowerBook, the correct site comes up -- from the MacBook Pro.
    Turns out, my xServe running Leopard Server is responding to the request and serving up my photo gallery site on both the PowerBook and the iPhone!
    I do have DNS running on the server. The other computers are connected wirelessly and via DHCP from an Airport Extreme Base Station that IS NOT getting DNS from the server, rather it's getting DNS from Comcast. The notbooks and the iPhone are getting DNS from the Base Station.
    When I stop the DNS service on my xServe, there's no effect -- the web response is still coming from the server. (Yes, I flushed the DNS cache on the PowerBook just to be sure). I checked the virtual hosts on the server and none of them is configured with a wildcard as an alias. The photo site IS the first entry in the sites list -- the first virtual host.
    So, how do I break my MacBook Pro's .local domain into subdomains? What am I missing?

    HI,
    That's about 6 miles over my head but I can suggest that you post in the Apple Mac OS Technologies forum:
    http://discussions.apple.com/category.jspa?categoryID=162
    Carolyn

  • "do not use proxy server for local (intranet) addresses" IEM setting

    Hi, i would like to find out where can i find the following setting in GPO which used be found in IEM.
    "do not use proxy server for local (intranet) addresses" Enabled/Disabled
    as currently im setting the IE proxy exception list via GPP, i don't see that option.

    Hi,   
    As you notice that when we use GPP Internet Setting item to configure bypass proxy servers, there is no "do not use proxy server for local (intranet) addresses" option in GPP Internet
    Setting item. However, as suggested by zanderol24’s reply, we can use bypass proxy server for local addresses option under
    Proxy server to achieve the same function.
    Best Regards,
    Erin

  • Proxy settings (local addresses)

    Hello,
    I was wondering if there is a way of adding addresses to be ignored by the proxy? What I'm asking is something similar to the option you find in browsers labeled "Ignore proxy for local addresses <input_box_to_add_addresses>".
    The reason why I'm asking this is because I'm using a proxy server to access internet but for Mail of Exchange I need the proxy to be bypassed otherwise it won't work.
    Thanks in advance

    Have now solved it myself:
    1) Create system restore point
    2) Uninstall mobile broadband driver and centrino ultimate-N in device manager, but keep files
    3) Reboot
    4) Lenovo access connections automatically connects to mobile broadband. It's then just a matter of going in there and connecting to wifi also.
    Everything is working beautifully now, and switching between wifi and mobile automatically. I think it was just corrupted TCP/IP settings in one or both adaptors.
    X230, Core i7, 16GB memory, 512GB Samsung 830 SSD

  • Ironport Bypass local address

    Hi,
    Is there a way to bypass local addresses / intranet on ironport without using a pac file or WCCP?
    For we have a local web server.
    Thanks

    Group Policy can be used to configured Windows PCs on a domain to not have to touch them all, but the PAC file (using the WPAD dns entry) or WCCP is a much more comprehensive solution since the ACL attached to WCCP would let the traffic that needs to flow directly (and cover all devices in the case of devices not applying group policies such as non-Windows OSs and non-domain PCs) or in the PAC file to have the logic that will run client side to determine what is local and what needs to be proxied (or use multiple proxies, etc.)

  • What does the local-address element stand for here?

    Please se the following Coherence Extend Proxy Configuration file:
    What does the <local-address> element stand for? Does it define that only the local clients (local with server proxy) can be accepted?
    <local-address>
        <address>localhost</address>
        <port>9099</port>
    </local-address>
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
      <caching-scheme-mapping>
        <cache-mapping>
          <cache-name>dist-*</cache-name>
          <scheme-name>dist-default</scheme-name>
        </cache-mapping>
      </caching-scheme-mapping>
      <caching-schemes>
        <distributed-scheme>
          <scheme-name>dist-default</scheme-name>
          <lease-granularity>member</lease-granularity>
          <backing-map-scheme>
            <local-scheme/>
          </backing-map-scheme>
          <autostart>true</autostart>
        </distributed-scheme>
        <proxy-scheme>
          <service-name>ExtendTcpProxyService</service-name>
          <thread-count>5</thread-count>
          <acceptor-config>
            <tcp-acceptor>
              <local-address>
                <address>localhost</address>
                <port>9099</port>
              </local-address>
            </tcp-acceptor>
          </acceptor-config>
          <autostart>true</autostart>
        </proxy-scheme>
      </caching-schemes>
    </cache-config>

    I think you not got the real meaning here.
    <local-address> element is used to specify a local address (IP or DNS name) and port that the TCP/IP ServerSocket (opened by the connection acceptor) will listen on. It's not a filter used to confine the client IP address.
    For example, the following will instruct the connection acceptor to bind the TCP/IP ServerSocket to 192.168.0.2:9099:
    <local-address>
      <address>192.168.0.2</address>
      <port>9099</port>
      <reusable>true</reusable>
    </local-address>

  • Acquiring local address for datagram socket created by DatagramChannel.open

    I've found that when I open an anonymous DatagramChannel (i.e. unbound, unconnected), the socket that it creates has no local address info I.e. no local port. Hopefully the example below will explain the problem...
    import java.nio.channels.DatagramChannel;
    import java.io.IOException;
    import java.net.DatagramSocket;
    import java.net.DatagramPacket;
    import java.net.InetAddress;
    public class QuickTest {
        public static void main( String[] args )    {
            try {
                DatagramChannel dc = DatagramChannel.open();
                DatagramSocket ds = dc.socket();
                byte[] ba = new byte[]{0,1,2,3};
                DatagramPacket dp = new DatagramPacket(ba,4,InetAddress.getLocalHost(),8000);
                ds.send(dp);
                System.out.println( "DatagramSocket from DatagramChannel");
                System.out.println();
                System.out.println( "          getInetAddress(): " + ds.getInetAddress());
                System.out.println( "         getLocalAddress(): " + ds.getLocalAddress ());
                System.out.println( "            getLocalPort(): " + ds.getLocalPort());
                System.out.println( "   getLocalSocketAddress(): " + ds.getLocalSocketAddress());
                System.out.println( "                 getPort(): " + ds.getPort());
                System.out.println( "  getRemoteSocketAddress(): " + ds.getRemoteSocketAddress());
                ds = new DatagramSocket();
                System.out.println();
                System.out.println();
                System.out.println();
                System.out.println( "DatagramSocket from new DatagramSocket()");
                System.out.println();
                System.out.println( "          getInetAddress(): " + ds.getInetAddress());
                System.out.println( "         getLocalAddress(): " + ds.getLocalAddress ());
                System.out.println( "            getLocalPort(): " + ds.getLocalPort());
                System.out.println( "   getLocalSocketAddress(): "    + ds.getLocalSocketAddress());
                System.out.println( "                 getPort(): " + ds.getPort());
                System.out.println( "  getRemoteSocketAddress(): " + ds.getRemoteSocketAddress());
            } catch (IOException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
    }Running this program yields the following information....
    DatagramSocket from DatagramChannel
    getInetAddress(): null
    getLocalAddress(): 0.0.0.0/0.0.0.0
    getLocalPort(): 0
    getLocalSocketAddress(): 0.0.0.0/0.0.0.0:0
    getPort(): -1
    getRemoteSocketAddress(): null
    DatagramSocket from new DatagramSocket()
    getInetAddress(): null
    getLocalAddress(): 0.0.0.0/0.0.0.0
    getLocalPort(): 1194
    getLocalSocketAddress(): 0.0.0.0/0.0.0.0:1194
    getPort(): -1
    getRemoteSocketAddress(): null
    I understand that the sockets address will be included in any packets sent, but why can I determine the port for one and not the other? I would like to continue using an anonymous channel, but I also would like to have the port for use in my test harness and for logging info...
    Any info and possible work around for this behavior would be much appreciated.
    tx in advance.

    This looks like a bug in the socket returned by DatagramSocketChannel and you should report it.
    In the meantime you could either just use DatagramSocket, or if you must have NIO you could try binding this socket to null or new InetSocketAddress(null,0) and see whether getLocalPort() now returns the right data.

Maybe you are looking for

  • I want to create a Roll Over on part of an image.

    Good day.  I would like to create a HTML page like this:   Cherry Hill Mall | Directory  for a Mall.  My plan is to create a image and then trace the specific store like a hotspot and then link a roll over to it.  But I'm not sure if its possible.  I

  • Another Lumia 520 user without an equalizer

    I have installed the latest updates and now get the equalizer that flashes for the blink of an eye then disappears. If memory serves, the owners manual said that the lumia 520 would give me equalizer settings when the headphone jack was in use. Just

  • DataGrid display problem

    Hi, I've given specific height to my grid, i've lots of records in the grid. Say, my given height to the grid display 5 records at a time. The problem is the partial of six record has also coming beneth the grid! Even I use grid.invalidateDisplayList

  • Exporting to HD with FCE

    Please help! I have a 55 min project that I am attempting to export to HD and have had no success at all. Exported file is extremely grainy. Then I followed a youtube tutorial to change some settings. File now is better, still a little grainy, but th

  • Cannot send color video. ColorEnable check box is ...

    Hi, I Cannot send color video. ColorEnable check box is disabled. I know the camera allows color but Skype does not allow me to set it up. Any ideas? Thanks in advance!