How to retrieve the fully qualified domain name from the IP Address?

Hi,
How can i retrieve the commplete host name along with the domain name (something like x.y.com) of a server?
I tried using the InetAddress.getHostName(), getCanonicalHostName(), etc but it retrieves me only the host name (only x in x.y.com)
Is there a way to solve ?
Thanx and Regards
Biju Nair

getInetAddress() of Socket Class will return the remote IP address in a InetAddress object.
Use the object with the getCanonicalHostName() of InetAddress class.
I may be wrong though. Cheers!

Similar Messages

  • How to set-up Fully Qualified Domain Name in WIN2k3?

    Dear Experts,
    Admin, please rederict if this is the wrong forum.
    I need to set up a FQDN for our one host demo system running on Windows Server 2k3. How do I set it up (without compromizing our system)? On this host we have ECC 6.0 and GRC running.
    We don't have a registred domain.
    Kind Regards,
    Vit Vesely

    Hi,
    Set your domain name as FQDN (fully qualified domain name.)
    1) start the transaction RZ10.
    2) select INSTANCE Profile name where your server name is given.
    3) Select Extended Maintenance.
    4) Click on change button.
    5) Change parameter icm/host_name_full to FQDN
    6) Copy your settings with new version number.
    7) Activate that version.
    8) Restart your WAS (Transaction code SMICM -> Administration Menu).
    Check that the following services are active in your ICF setting (transaction code SICF)
    /default_host/sap/bc/bsp/sap
    /default_host/sap/bc/bsp/sap/system
    /default_host/sap/bc/bsp/sap/public/bc
    /def ault_host/sap/public/bc
    /default_host/sap/public/bc/ur
    /default_host/sap/public/bsp/sap/public
    /default_host/sap/public/bsp/sap/public/bc
    /defaul t_host/sap/public/bsp/sap/system
    /default_host/sap/public/bsp/sap/htmlb
    Set Request Hanlder Class, add Standard Class provided by SAP to default\sap\bc\bsp\sap service. Right click on default\sap\bc\bsp\sap service service.
    Now select display service, go to Handler Tag, and add the class CL_HTTP_EXT_BSP, which is a default HTTP request handler class.
    Specifically for fully qualified domain names problems,
    see:
    434918 Configuration for fully qualified host names for BSP
    654326 Domain restrictions in a portal environment         
    654982 URL requirements due to Internet standards          
    677118 SP31  >: Fully Qualified Domain Names Check         
    763427 Error message for domain name with underscore  
    Regards
    Krishna

  • Finding IP and fully qualified domain name.

    Okay i have a java program taht runs on ubuntu the latest version. I got java 6.0 using apt-get install. oKay now i wrote a server socket program. But what it also should do is get the fully qualified domain name of the system and its ip address. So now my system is called "tools.myproject.com" okay. I dont have system registered under a domain or somethign but i specify it in my /etc/hosts file. since linux also uses the /etc/hosts file to resolve domain names. Now is there anyway in java that i can get this name. If not that then is there a way i can get the ip of this machine, which is not the loop back address. When i do the InetAddress.getLocalHost().getHostaddress() method or whatever thats there in the documentation i get the loop back address thats specified thats 127.0.0.1 and the canonicalname for taht is some rubbish that i dont need. So can anyone help me out.
    Also i found some NetworkInterface class from which i can get the IP Address of the machine. Also the Canonical Name i get from the IpAddress does it look at the /etc/hosts file or the DNS server?
    Thanks!
    Edited by: mynameissriharsha on Jul 14, 2008 2:42 PM

    Try this
    InetAddress[] inet = InetAddress.getAllByName(InetAddress.getLocalHost().getHostAddress());
    for (int x = 0; x < inet.length; x++)
        System.out.println
            ("IP " + (x + 1) + ": " + inet[x].toString().substring(1));
    }

  • Fully qualify domain name in CMS_IdNumbers5

    Under CMS D/B, there is a table called u2018CMS_IdNumbers5u2019.
    One of the fields generated during the creation of CMS D/B is always equal to the server name where BOE is installed.
         E.g      If Server Name = Server01
              There will be a field called u2018Server01u2019 under table CMS_IdNumbers5
    In Unix (AIX) environment, it will retrieve the fully qualify domain name and port numbers
         E.g.      If Server Name = Server01.AU.SVR.COM
              Port = 6400
              There will be a field called Server01.AU.SVR.COM:6400 under table CMS_IdNumbers5.
    Questions:
    Where does the fully qualify domain name get pick up from in unix and how does it knows it should point to AU.SVR.COM in the above example?
    Never once have we stated the fully qualify domain name (.AU.SVR.COM) during the creation of CMS D/B (via cmsdbsetup.sh), we only specified u2018Server01u2019.
    When using u2018uname u2013nu2019 or u2018hostnameu2019 commands, it will only return back u2018Server01u2019.
    Client needs to point to a different domain name.
    E.g. Instead of Server01.AU.SVR.COM, they want Server01.AU2.SVR.COM
    Where can this be done?
    Thanks in advance.
    Regards,
    Ken

    Thanks for the quick respond. Yes I am aware changing domain is out of scope from Business Objects perspective.
    My question is more on how and where do the fully qualify domain name get picked up from in unix (AIX). As mentioned in previous note, never once have we stated the fully qualify domain name (.AU.SVR.COM) during the creation of CMS D/B (via cmsdbsetup.sh), we only specified u2018Server01u2019. Yet it was able to determine the fully qualify domain name.

  • BI 7.0 Java Add-in without fully qualified domain name

    Hi
    I have just installed the Java Add-in for BI 7.0, and now I am trying to set up BEx to work. I have run the template installer, but there seems to be an issue with server names vs. fully qualified domain names. The server name is currently in the format "server.domain", but I suspect that it should/must be "server.domain.com".
    Is it possible to get full functionality without using fully qualified domain names (FQDN)? Is so, how can I acheive this?
    Regards,
    Thomas
    Edited by: Thomas Kjelsrud on Apr 23, 2008 8:39 PM

    This issue is no longer relevant for me. I still wish to find the solution tough, for future reference.
    Tegards,
    Thomas

  • Ip address to fully qualified domain name

    Dear friends, I am unable to get the correct fully qualified domain name from IP address. Please help. I have already spent more than a day searching for the solution on these forums and on google. So now only option remaining is help from you friends.
    I think I need to explain my set up first.
    The machine runs on Solaris8 & is part of corporate intranet. Java version 1.4.2. I am just a developer (cannot touch networking) and here is what I know about its network set up.
    The machine has a network alias ("bluesky"). So when I access it thru telnet using VPN, the command line shows "bluesky" at the prompt. There are at least two domain names that lead to this machine. One is bluesky.XXX.com and another is somesubdomain.yyy.com.
    I have a piece of existing Java code that produces the IP number of this
    machine. I want to convert it to its domain name (either bluesky.xxx.com or the other one).
    When I connect by VPN to the network and use nslookup against the IP on my XP laptop, it displays the full domain (somesubdomain.yyy.com). When I do the same thing after I join the intranet directly (not thru VPN), it again shows the full domain, but the different one bluesky.xxx.com.
    Some of the code I tried:
    Try 1:
    String ip = "";//valid IP here
    InetAddress ia = InetAddress.getByName(ip);
    String hostname1 = ia.getCanonicalHostName();
    String hostname2 = ia.getHostName();When I connect to intranet (without VPN) and run the above code on my laptop, hostname1 and hostname2 both generate "bluesky.xxx.com". This is what I want.
    But when I run the code on the remote machine, both strings are only
    "bluesky". When I run the code on my laptop after logging into the network using VPN, both produce the second fully qualified domain name. That would also be OK for me if I can get it on remote machine.
    Try 2:
    I added the following line before the above code (based on forum search).
    System.setProperty("sun.net.spi.nameservice.provider.1", "dns,sun");The result was same as Try1.
    Try 3:
    InetAddress[] iaa = InetAddress.getAllByName(ip);
    for(int i=0;i<iaa.length;i++){
         System.out.println(iaa.getCanonicalHostName());
         System.out.println(iaa[i].getHostName());
    When ran on laptop, it iterates only once (I expected it to iterate twice) and produces bluesky.xxx.com for both println statements.
    On remote machine, it again produces only "bluesky".
    It's getting frustating. Please help. Thanks.

    Following could be the reason
    When you are running the InetAddress api's to get the domain name on your laptop (windows machine), It is not hitting the DNS server. It is just returning the domian name what is mention in the Laptop configuration. If you are making a security check based on that, then anyone can spoof up his domain name locally and get the desired domain.
    When you run the application at some remote machine, it actually resolves the ip address with DNS server.
    You may want to use the following code to hit DNS server all the time. But with this I have a issue. I am not able to get the domain when I am on VPN. I have to find the exact reason for this issue.
    private static String domainFmReverseDNS(String hostIp) throws IOException
    //Record opt = null;
    Resolver res = new ExtendedResolver();
    Name name = new Name(getReversedIP(hostIp)+ ".in-addr.arpa");
    short type = Type.PTR;
    short dclass = DClass.IN;
    Record rec = Record.newRecord(name, type, dclass);
    Message query = Message.newQuery(rec);
    Message response = res.send(query);
    Record[] answers = response.getSectionArray(Section.ANSWER);
    if (answers.length == 0)
    System.out.println("reverseDns did not find anything");
    return ("NotFound");
    else
    System.out.println("reverseDns found the value :-)");
    return answers[0].rdataToString();
    private static String getReversedIP(String ip)
    StringTokenizer st = new java.util.StringTokenizer(ip, ".");
    String reversedIp=st.nextToken();
    while ( st.hasMoreTokens())
    reversedIp = st.nextToken()+"."+reversedIp;
    return reversedIp;
    }

  • Modifying Portal URL to use Fully Qualified Domain Name

    Hi,
    We have a portal that I can access now by using the URL 'invsrvr001:50000/irj/portal'. We would need the URL to use the fully qualified domain name such as 'invsrvr001.company.com:50000/irj/portal'. Towards that end we added the profile paramter 'icm/host_name_full' with parameter value 'invsrvr001.company.com' and restarted the server. After the we tried to login to the portal using 'invsrvr001.company.com:50000/irj/portal' but the system displayed 'The page cannot be displayed' error.
    What else needs to be done so as to use the fully quailified domain name?
    Do I name to change the computer name from 'INVSRVR001' to 'INVSRVR001.COMPANY.COM'?
    Regards
    ND

    Ok, if you want to use FQDN including your domain extention (host.domain.com) you need to include your host into the domain.
    Also your PDC should be doing the time of DNS server so check that.    
    This should solve your issue, please close the thread.
    Regards
    Juan

  • Problem connecting through RFC with fully qualified domain name

    I am using the .NET Connector and RFC to call a BAPI
    I use a fully qualified domain name in the form <DOMAIN>\<HOST>
    The RFC seems to have problems with this form of address. It produces the following execption in my .NET code.
    SAP.Connector.RfcCommunicationException: Connect to SAP gateway failed
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname 'DOCUNET_AG\DWSAP' unknown
    TIME        Mon Feb 05 11:57:20 2007
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      ninti.c
    LINE        329
    DETAIL      NiPGetHostByName2: hostname 'DOCUNET_AG\DWSAP' not found
    SYSTEM CALL gethostbyname_r
    ERRNO       11004
    ERRNO TEXT  WSANO_DATA: Valid name,
       at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo
    , Encoding encoding, String languangeCode)
       at SAP.Connector.SAPConnection.Open()
    What can I do that I am able to use a fully qualifies domain name in this way?
    Thank you very much for your answers.
    Mirco

    Hi Mirco,
    additional to my first reply, open a shell window and type
    <b>
    ping <computername>
    </b>
    or
    <b>
    ping -a <ipaddress>
    </b>
    so you should get the full qualified name for the host.
    Regards
    Holger

  • Fully Qualified Domain Name - required ??

    Hi,
    We are implementing SAP in a 3 system landscape with AIX. 
    All these systems are not in a domain at the moment, but they are networked.
    Is it completely necessary to have these systems in a Windows / Unix domain to run the systems?  What basic settings would be necessary to go-live?
    I have made changes in the /etc/hosts file to include domain (for example: xxx.xxx.xxx.xxx gilsaped gilsaped.xxxxxxxxxxxx.com).  What else is required to make our portal system URL to be called with the fully qualified domain name?
    Thanks in advance for your help,
    Abdul

    What else is required to make our portal system URL to be called with the fully qualified domain name?
    Besides the hosts file entry you will also require a DNS entry.
    Nelis

  • Exchange 2013 wildcard certificate - problem IMAP POP Because the matter is not a fully qualified domain name

    Hi all, I have an Exchange 2013 SP1, I have installed a third-party SSL certificate and correctly on the server, but when I assign the POP and IMAP services, I see this error
    The certificate with thumbprint XXXXXXXXX and subject '*. Xxxx.yyy' can not be used for POP SSL / TLS connections because the matter is not a fully qualified domain name (FQDN). Use the Set-POPSettings X509CertificateName command to set the FQDN of the service.
    I tried to run this command and restart the POP and IMAP services
    ImapSettings set-ca-server-1-X509CertificateName mail.xxxxx.yyy
    POPSettings set-ca-server-1-X509CertificateName mail.xxxxx.yyy
    But the POP and IMAP services, the certificate is not assigned.
    You know as you can solve
    regards
    Microsoft Certified IT Professional Server Administrator

    Hi,
    Before we go further, I’d like to confirm if you can use POP and IMAP properly.
    If everything goes well, we can safely ignore it:
    http://www.hsuconsulting.com/wildcard-ssl-certificate-exchange-2013-imap-and-pop-error/
    If not, we can try the following commands :
    Set-POPSettings -ExternalConnectionSetting {mail.domain.com:995:SSL}
    Set-ImapSettings -ExternalConnectionSetting {mail.domain.com:993:SSL}
    http://careexchange.in/how-to-enable-and-configure-pop-imap-in-exchange-2013/
    Note: Microsoft is providing the above information as convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information
    found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
    If you have any question, please feel free to let me know.
    Thanks,
    Angela Shi
    TechNet Community Support

  • Httpd: Could not determine the server's fully qualified domain name, using

    Hello, I am checking why the response time of the display of the pages of the sites are slow, then I checked the error_log file in /var/log/httpd and I got this texts: (I am hosting 3 sites in the server)
    [Mon May 14 21:21:37 2007] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    Processing config directory: /etc/httpd/sites/*.conf
    Processing config file: /etc/httpd/sites/000010.129.0.37_80avepublishing.com.conf
    Processing config file: /etc/httpd/sites/000110.129.0.37_80escuelamovil.com.conf
    Processing config file: /etc/httpd/sites/000210.129.0.37_80sabiduria.com.mx.conf
    Processing config file: /etc/httpd/sites/0003any_80default.conf
    Processing config file: /etc/httpd/sites/virtualhostglobal.conf
    [Mon May 14 21:21:37 2007] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Mon May 14 21:21:38 2007] [notice] Apache/1.3.33 (Darwin) mod_jk/1.2.6 DAV/1.0.3 mod_ssl/2.8.24 OpenSSL/0.9.7l PHP/4.4.4 configured -- resuming normal operations
    [Mon May 14 21:21:38 2007] [notice] Accept mutex: flock (Default: flock)
    [Mon May 14 22:12:18 2007] [error] [client 10.129.0.37] File does not exist: /Library/WebServer/Documentsescuelamovil/robots.txt
    [Mon May 14 22:12:18 2007] [error] [client 10.129.0.37] File does not exist: /Library/WebServer/Documentsescuelamovil/error.html
    with the alert:
    [Mon May 14 21:21:37 2007] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    the virtual host file (virtualhostglobal.conf) is:
    # This file is auto-generated by the Server Admin Web
    # backend plugin whenever settings are saved.
    # The Listen and NameVirtualHost directives are generated
    # based on the VirtualHost directive inside
    # each site configuration file found in this directory.
    # Please add appropriate Listen and NameVirtualHost directives
    # if a site is manually edited
    # i.e. the site is moved from sites to sites_disabled (or vice versa)
    # or the site's Virtual Host ip address and/or port is modified
    # Last updated at 2007-05-07 14:22:34 -0500
    Listen 10.129.0.37:16080
    NameVirtualHost 10.129.0.37:16080
    Listen *:16080
    NameVirtualHost *:16080
    how can I correct this alert?
    thanks
    Dual 2 GHz PowerPC G5   Mac OS X (10.4.9)   4GB DDR SDRAM, MAC OS X Server
    Dual 2 GHz PowerPC G5   Mac OS X (10.4.9)   4GB DDR SDRAM, MAC OS X Server

    >how can I correct this alert?
    Fix your DNS.
    This non-fatal error is Apache's way of telling you that it can't work out the hostname of the machine it's running on.
    It uses reverse DNS to determine this information. If you don't have a reverse DNS entry for your server's IP address, this is what you get.
    Fix your DNS and the alert will go away, or just ignore it.

  • Fully Qualified Domain Names (FQDN) error - How to get domain and extension

    I have created a Web Dynpro ABAP application. On executing it, I get Fully Qualified Domain Names (FQDN) error. I have host name of my server.
    I do not know domain name and extension name of my server. How can I detect it?
    I want to know in  Windows XP and Windows 7.
    Please help me asap.

    Hello,
    Right click on the my computer and click properties and then go to the tab computer name .
    there you will have full computer name and this should have your host name as well as the domain name.
    to check the domain name click on change a new popup will open ther domain will be metntioned.
    IF nothing is ther in the domain then add just .(dot) at the end of the computer name .
    and save it and then put the same name in the  ICM/host_name_full parameter in rz11 and try .
    thanks
    sarbjeet
    Edited by: sarbjeet  singh on Jan 23, 2011 10:26 AM

  • How to change the fully qualified host name

    Hi,
    how can I change the fully qualiied host name?
    Regards
    Marc

    Hi Michal,
    I'm doing the FlightSeatAvailabilityCheck-Scenarion of the demo example and get an error. To get more details about the error I had a look in the XI Runtime Workbench. There I can see, that the wrong url is called (without the hostname) and  that the access is forbidden (403). Therefore I want to change the fully qualified host name. I knew that I have to change icm/host_name_full but I don't know where I can do it (which transaction)?
    Regards
    Marc

  • Web Dynpro ABAP application  - Fully Qualified Domain Names (FQDN) error

    I have created a Web Dynpro ABAP application. On executing it, I get Fully Qualified Domain Names (FQDN) error. I have host name of my server.
    I do not know domain name of my server. How can I detect it?
    I want to know in  Windows XP and Windows 7.
    Please help me asap.

    Hi,
    On your server run command ipconfig /all
    FQDN = Hostname + Primary DNS Suffix
    The make sure the profile parameters SAPLOCALHOSTFULL and icm/host_name_full reflect the same.
    Regards,
    Srikishan

  • TFS Build Error - Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

    I am trying to set-up CI of Orchard CMS and deploy it on Azure using TF service. I am stuck at following error for path being
    longer than 260 characters. However, when counted the total characters in path are 235. Please see the below error :
    Other Errors and Warnings
    1 error(s), 1 warning(s)
    Exception Message: TF400889: The following path contains more than the allowed 259 characters: drop/_PublishedWebsites/Orchard.Web_Package/Archive/Content/C_C/a/src/projects/Orchard/dev/DevAltaf/Orchard/src/Orchard.Web/obj/Debug/Package/PackageTmp/Modules/BrentApart.BannerManager/Scripts/controllers/bannerAssignmentController.js. Specify a shorter path. (type VssServiceException)
    Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.EndCopyDirectory(IAsyncResult result)
    at Microsoft.TeamFoundation.Build.Workflow.Activities.CopyDirectory.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
    at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
    Inner Exception Details:
    Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (type PathTooLongException)
    Did anyone came across such issue while deploying Orchard on Azure with TF service? If yes, how did you sort this freaking error?
    Thanks,
    Altaf B.

    Hi AltafB,
    For your situation, you can short the path for the source code. Or use a short path for build agent folder in your build definition. You can refer to the links below to solve your problem:
    http://blogs.msdn.com/b/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/1638a5f0-9321-4ff9-9ee7-6d347badb972/please-some-solution-to-the-specified-path-file-name-or-both-are-too-long?forum=tfsbuild
    Besides, since you deploy Orchard to Azure, you can also publish it directly using publish profile in Visual Stduio or WebMatrix directly.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Approval issue in WorkFlow

    Hi experts,      My workflow senario is   Author -> Approver1 -> Approver2 When author submit the form it should go to approver1 , when the approver1 submits the form it should go to approver2. In this i am getting a issue, when Approver1 submits the

  • SAP Cloud for Travel and Expense r1405

    SAP Cloud Customer Engagement sent notification emails today, May 13th, notifying existing SAP Cloud for Travel and Expense customers of the planned upgrade dates for release 1405.  Test tenant upgrades are planned for May 23-26 and production tenant

  • Error Message: Reboot and Select proper Boot device.

    My HP desktop computer (model p6654y) will not boot directly into Windows. I can ALWAYS make it boot into Windows by first pressing the F10 key to enter the BIOS. If I then exit the BIOS (without even making any changes), the computer will boot into

  • How to recover passwords, and favorites from Windows.old

    I had to install Windows 7 over Windows 7 due to an error I had. I need to recover my passwords/favorites in some way or another. The reason I had this put under Sync is because I had my computer synced to my phone. First off is it possible to recove

  • MDM Assertion Log shows Assertion Failed

    Hi Experts, When I open in MDM Console the Assertion log it shows many lines stating that Assertion Failed. The path to the file being stated does not exist on the mdm server. Also, no problems are being reported. I believe it is not an error because