Getting host name in clustered environment

Hi,
in my J2EE Web application, I'd like to get the hostname of the Portal server where my J2EE app is deployed. But this is a clustered pipeline system where many servers exist in our QA system.
So if I were to try:
     java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
        String hostname = addr.getCanonicalHostName();
I am not sure what the call to getCanonicalHostName would return to me?
Does it always give me the domain name of the central instance? e.g. s1.abc.mycompany.com
Or can it give me the domain name of any of the instances?
Has anyone tried this before?
Alternatively within my program is there anyway to determine which pipeline system I am on - dev, QA or production?
Appreciate your response.
Sharath

Hello Sharath.. I guess below statement can be useful to create clusterInformation object
IClusterInformation clusterInformation = (IClusterInformation) PortalRuntime.getRuntimeResources().getService("com.sap.portal.runtime.system.clusterinformation.clusterinformation");
The above object can be useful to get hostname/ip and cluster elements info....
Regards,
Madhu

Similar Messages

  • Network Error []: Cannot Get Host Name when running business rules

    Guru's
    We are getting the following error intermittently when we are running business rules (Planning Application >>Tools>>Business Rules) or running SmartView refreshes:
    Network error []: Cannot Get Host Name
    The following is then logged in the Essbase Application logs:
    Local/Application/Database/admin@Native Directory/Error(1042022)
    Network error []: Cannot Get Host Name.
    A quick look at the Essbase Error Messages Doc says it is a network error and we have to consult the network documentation. Unfortunately this is not very descriptive so we logged an SR with Oracle but we don't seem to be getting a resolution.
    The environment is 11.1.2.0 and the architecture is as follows:
    Server 1 - MS Server 2008 x64:
    Planning, Calc Manager, Foundation Services, Framework Web Services, EAS, APS, Web Analysis, FR Web Services
    Server 2 - MS Server 2008 x64:
    Essbase Server
    Server 3 - MS Server 2008 x64:
    Framework Services, FR Print Services
    We have tried doing the following:
    1. Put in the server host names into the hosts file on the Hyperion Servers
    2.  Applied the following TCP/IP settings on all the Hyperion Servers and one of the user machines as a test:
          - Added a new DWORD Value named TcpTimedWaitDelay and set it to 30.
         - Added a new DWORD Value named MaxUserPort and set it to 65534.
         - Added a new DWORD Value named MaxFreeTcbs and set it to 6250
    3. Confirmed that there are no packet drops by monitoring the server NICs so no packet loss could be the cause of this issue
    4. The Essbase Config file has the following settings:
    NETDELAY 2000
    NETRETRYCOUNT 2500
    Has anyone come across this issue and if you managed to resolve it, how did you go about it.
    Thanx

    Hi Rahul
    The issue is happening to a number of calcs so it it not one calc specifically. I will ask the functional consultants to enhance the logging in the business rules so that we can see if the issue happens on a specific member\block etc and yes we do use Xrefs
    We can run this as a calc in EAS without any issues and it's intermittent because this business rule runs 95% of the time in Planning Application >> Tools >>Business Rules without any issues.
    Thanks

  • Stored procedure for getting host name, host instance and status of that host is it running or stopped.

    Hello all,
    yesterday I got one task in that I have to stored procedure for getting host name, host instance and status of that host is it running or stopped.
    any body knows where exactly, In which table this details are there in BizTalk databases.
    thanks

    Status of the host instance is not stored in the SQL database for you to query the status using stored procedure. You have to either use Powershell or WMI to get the status.
    In SQL, following table contains the details about the host like Name, LoginName, IsDisables etc but status of the host instance is not stored in the database.
    SELECT * FROM BizTalkMgmtDb..adm_HostInstance
    Powershell to get the status:
    http://axonolympus.nl/?page_id=186&post_id=969&cat_id=6&lang=en
    WMI to get the status:
    https://msdn.microsoft.com/en-us/library/aa561820.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/en-us/library/aa578621.aspx
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Getting host name or ipaddress for viirtual server

    I want to get the ipaddress or host name for virtual server in a cluster environment. If i do
    java.net.InetAddress.getLocalHost().getHostName()
    it returns the ipaddress of the physical node currently running virtual server.
    Is there any way to get the ipaddress or host name for virtual server ?

    Might help to define what you actually mean by "virtual server" and what you actually want as well (and from what process.)
    For example a clustered system with a single entry point. And you want the client to have the entry point. In this case the virtual address (ip and/or host) should always be returned. You can't get the individual address of a specific server. If that is not the case then something is wrong with the clustered system, not java/client.
    Another example, a server in the cluster. Then it only knows about its own real address. If you want the cluster then you have to explicitly deliver that information to it, the box itself does not know it.
    Something else?

  • Getting host name and IP address

    I have develop different types of forms which resides on server and clients are acessing it.Now from my end i want to track that which user is accessing my forms on the server i.e i want to know the client IP address and host name.When the user execute some query on the database then i will get it easily using sys_context function but if it perform some functions within the form and i catch the host name then it returns the server host name where the actual forms resides not the client host name and i want to know the client host name and IP address who is running the forms.Plz let me know the way so i can do that easily .
    thanks

    Hi Grant,
    I want to get ip/address host name of reports server, sitting on forms server.
    can you tell me how to do this.
    in a web base environment.
    i have several report server instances running on different machines.
    when i run a report using RUN_REPORT_OBJECT using report_server=mac_rep1
    i want to know mac_rep1 resides on which host/ip machine.
    regds

  • How to get host name in the workflow?

    Hi,
       I've a requirement where I need to get CQ Inbox url (http://<hostname>:<port>/inbox) in my custom workflow process. I thought of configuring url to some node and retriving from there.. but It's not the good approach as host name will be different for differnt CQ environments. So what is the best way of getting inbox url?
    Env: CQ 5.6
    Thanks
    Siva

    Yep Justin, If the configuration is wrong, any link generated would also be wrong.. I mean, default configuration will be some thing like..
    I mean, I can change those configurations as per my instance host name, right?
    Example: my instance's host url is:  mytest:1501
    So I would like to update the same in configurations ..

  • Getting host name of the remote client using getRemoteHost() --Problem

    Hi everybody
    Does anyone know how I can get the Host name out of the request ? I just get IP address which I do not need at all , any suggestion ?
    Many thanks
    Arash

    If it has a name then
            InetAddress addr = InetAddress.getByName("212.58.224.123");
            System.out.println(addr.getHostName());

  • Getting host name and port number from application

    Does anyone know how I would be able to get the host name
    and port number from an application launched by java webstart ?
    This is the host and port of the URL that this application is launched from.

    A couple of suggestions:
    -The note is about 6.40. Doesn't fit for your server
    -Don't!
    -Reinstall!
    Regards,
    Benny

  • Getting host name and port number from an application

    Does anyone know how I would be able to get the host name
    and port number from an application launched by java webstart ?
    This is the host and port of the URL that this application is launched from.

    A couple of suggestions:
    -The note is about 6.40. Doesn't fit for your server
    -Don't!
    -Reinstall!
    Regards,
    Benny

  • Getting host name

    I am using serverSocket and the .accept() method to wait for a connection and I want to store the address of the computer that connects to the server. Is there a way to do this?

    Yes. accept returns a Socket and you can get the remote InetAddress from that and from that in turn get the host name.

  • Getting Host Name From Forms 6i (deployed in 10g AS)

    Hi,
    I need to get the host name of client while launching my application. I am using forms6i. So I cannot use webutils.pll for the same. But in the below thread I have read that Webutil.pll has been modified to use with FORMS 6i also. Can anybody send me webutils.pll which can be used with Forms 6i
    Re: Converting to Webutil? 6i and 9i equivalents.
    Its an urgent requirement
    Any help is appreciated.
    Thanks

    Hi,
    I have tried sys_context and java class option already ..but in vain :(..
    Let me explain my problem in detail.
    My database server(Oracle 10g) is in HOSTA
    My appserver (Oracle 10g AS)resides in HOSTB
    And user launches the application from HOSTC
    My requirement is to get the host name of the user while he launches the application. ie HOSTC in this case.
    If I am trying with java.net.InetAddress.getLocalHost().getHostName(); I am getting the value HOSTA(Host name of Data base server)
    If I am trying with SYS_CONTEXT I am getting HOSTB(Host name of appserver)
    And my requirement is to get HOSTC !!!
    I have read that if Webutil_clientinfo.get_host_name is used I can get the host name of client machine. But since I am working with forms 6i , I can't use Webutil.
    please help me if you know any way to achieve the same in forms 6i

  • How to get Host name and SQL Instance Name by T-SQL

    I am using SQL 2000, 2005 and 2008. I have few multi instances SQL servers. I would like to gather following information:
    Host Name
    SQL Instance Name
    SQL Version
    Server1
    Server1
    SQL 2000
    Server1
    Server1\ABC
    SQL 2005
    Server1
    Server1\XYZ
    SQL 2008
    Server2
    Server2
    SQL 2008
    Is there any way I can get it by T-SQL? Any help would be appreciated.
    Thanks
    Saumen 

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • How to get Host name and port inside UDF

    Hi,
    I want to access the Host and port in UDF to pass it to a link http://host:port/AdapterFramework/ChannelAdminServlet?party=&service=&channel=*&action=status dynamically.
    How can I acieve it?
    Manisha

    Hi
    With this code. I am getting error:
    try
    java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
    String host = addr.getCanonicalHostName();
    catch (UnknownHostException e){}
    if (ProcessMode.equals("P"))
    try{
    String xyz="/AdapterFramework/ChannelAdminServlet?party=&service=&channel="Name"&action=stop";
    URL server = new URL("http", host, 8XXX, xyz);
    tring userPassword =Userid + ":" + Password;
       String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
        URLConnection uc=server.openConnection();
        uc.setRequestProperty ("Authorization", "Basic " + encoding);
        BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
         while ((inputLine = br.readLine()) != null)
         output+=inputLine;
        br.close();
    catch (Exception e){}
    ERROR:
    cannot resolve symbol
    symbol : variable host location: class com.sap.xi.tf._MM_CommunicationChannel_Stop
    _ URL server = new URL("http", host, 8xxx, xyz);
    ^ 1 error
    Any other way to get host and port?
    Manisha

  • Getting host name from applet

    Hi All,
    How can i get the local host name from applet ( Host name where the applet running) . While i tried with InetAddress i got only the loop back address 127.0.0.1. Can anyone help me out in this regard.
    Thanks in advance
    V.S.Saravanan

    When you say you tried the InetAddress, did you try the following?
    You could try creating a Socket connection back to the host/server URL from where the Applet was downloaded (you should have permission to do this). You can then get the local address of the Socket.
    Something like:
    String hostName = getCodeBase();
    Socket s = new Socket( hostName, portNum );
    InetAddress address = s.getLocalAddress();
    String hostName = address.getHostName();
    Eric

  • Get host name and ip addrees of the client machine for window VISTA

    Hello Friends !!
    I have write the following code to get the ip adress and host name of the client machine ..
    it works fine for windows xp and 2000 but in vista it gives this type of out put.
    host name = 0:0:0:0:0:0:0:1
    ip addresss = 0:0:0:0:0:0:0:1
    what i have to make changes in my code to get the proper ip address and hostname for vista...
    My code is listed below....
    code ::
    InetAddress remoteAddress = null;
    // Setting Host Name...
    request.setAttribute("reportHostIP", request.getRemoteAddr());
    // Setting Host IP Address...
    try
         remoteAddress = InetAddress.getByName(request.getRemoteAddr());
         //This will give you the full qualified domain name of the client
    request.setAttribute("reportHostName", remoteAddress.getCanonicalHostName());
    catch(Exception e)
         logger.error(e.getMessage(), e);
    }

    BIJ001 wrote:
    Is it not IPv6 by any chance?It is. And if I remember correctly, then "0:0:0:0:0:0:0:1" (or "::1" for short) is the IPv6-equivalent to "127.0.0.1", i.e. it's the loopback device.

Maybe you are looking for

  • IPhone 6 plus alert sounds not working/only vibration works

    Sound is not working when I get text messages or other alerts and notifications. Phone only vibrates. I have already checked settings. Even keyboard clicks are not making a noise and under settings it is set to make a noise when clicked

  • 2 Address Book questions.....

    1. Is there any way to print a range of names? I have 3200 contacts in Address Book. I print out 200 address labels each week. Is there any way to choose to print from, say "Jones to Jessup" or do I have to print out labels for the complete database

  • Restore FRA from tape backup

    I have got a 2 node RAC cluster. I am running RMAN backup connecting to one of the nodes and then running RMAN backups to FRA. Since I cannot backup ASM to tapes just like a normal file system, I have configured the MML to backup the FRA to tapes usi

  • Latency leads to full system Failure in Exchange 2010 - Resolved in 2013?

    My work encountered a bug - and for no lack of trying - I could not find any bug submission for Ex2010 anymore.  Since Most programming relies on the foundation of the past - if replication service was implemented the same in 2013 than it could leave

  • Issue with Alias and Union of CTEs

    I have a query that works in SQL Server but I'm having issues with it in PL/SQL.  I keep running into the error saying "invalid identifier" when I try to reference PlantNumber or Plant_No or any other piece of the CTE or subquery.  Is this not possib