473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Determine Active Node of Cluster in C#

My Title is a suggested solution rather than the actual question. Let me explain. I have a C# ASP.NET 2.0 website that I wrote to run deployments to my many environments. It uses PSExec to kick off deployment executables on different machines. It works great until you try to throw it at a cluster because PSExec isn't cluster aware. PSExec tries to kick off on the cluster, but the cluster isn't an actual machine, and thus, psexec fails miserably. It thinks it's running, but really it isn't. I came up with an alternative. Run PSExec against the active node of the cluster passing the cluster name to the exe that's running there. In order to do that, I'd have to be able to determine the name of the machine that was the active node. Does someone have an idea of how to do this programmatically, or have an alternative suggestion?

Thanks,
Eric <><
Nov 1 '07 #1
2 5117
No advise for me on this subject?
Nov 2 '07 #2
balabaster
797 Expert 512MB
No advise for me on this subject?
Hey, I've had to do similar things for one of my clients who are using some oddball clustering software called EMC Autostart. The solution we came up with was to do a host lookup using the WMI (because obviously the DNS server will always hold the same info) and the IP address. The cluster we have always has the same virtual IP but you can get to the physical machines by using their real IP addresses.

Virtual IP: 192.168.26.7
Real IP 1: 192.168.26.6
Real IP 2: 192.168.26.5
Real IP 3: 192.168.26.4

During the normal course of action you would always go to 192.168.26.7 and you would be connected with whichever the live box is. So when a box is live it has the IP 192.168.26.7, but when it's not live it doesn't. Long story short in most cluster environments you can only run against the live box and the cluster updates the others by a synchro mechanism. The biggest trick is "how do you know if this box is part of a cluster or not and if so, how do you know if this is the live box?". That depends on the cluster software you're running I guess - every piece of software installed on a machine has a signature. Find out what that signature is and find out how to tell if this is the live box and you should be able to program a solution. If this machine is part of a cluster and it's live or this box is not part of a cluster, invoke the process, if it's part of a cluster and not live, skip this machine and go onto the next.

I would hazard a guess that the easiest way to do this is using WMI (Windows Management Instrumentation) or by querying the registry on that machine.
Nov 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Kane | last post by:
Good afternoon, I'm trying to set up a clustered DB2 v7.1 database on Redhat Linux 7.3. I've followed the instructions (as far as I know) in the accompanying documentation to set up the database...
1
by: techfuzz | last post by:
I'm posting my problem experience and solution I found here for other ASP.NET developers. I have a web application that uses Forms Authentication with Active Directory to control access. In...
0
by: Christophe Niel | last post by:
Hi As stated in Q315159, I have a problem to access a SQL server, but, I don't have the same cause : I use Application Center so I had to I use a domain account as the Asp.net worker process in...
3
by: Jan Wrage | last post by:
Hi! I would like to implement a treeview in my existing application. It should show my entire Active-Directory structure, i.e. all Groups, Containers and OUs. Could somebody help me with...
0
by: Brave | last post by:
Hello, I have sometimes the problem to get information from Active Directory (100 times it works without any problems but the next time I had the problem.) If I copy the Web-application on the...
10
by: John Brown | last post by:
Hi there, Does anyone know how to (generically) determine the currently active form for an application using a "static" function (so I can call it from anywhere). There is no offiical way I've...
0
by: M Bourgon | last post by:
Recently, I was in a training course about the new features of 2005. The trainer said that 2005 dealt with active/active memory differently during a failover - as the secondary came online, it...
1
by: snomad | last post by:
Hi all, I had a node failure and rebuild on a sql server 2005 2 node cluster. the server has been rebuilt with new os. i evicted then re-added the rebuilt node via cluster administrator. i...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.