473,588 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Determine Active Node of Cluster in C#

2 New Member
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 programmaticall y, or have an alternative suggestion?

Thanks,
Eric <><
Nov 1 '07 #1
2 5140
stonkers
2 New Member
No advise for me on this subject?
Nov 2 '07 #2
balabaster
797 Recognized Expert Contributor
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
7321
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 on 2 nodes. Running db2start on node 0 I get the following message: 11-19-2000 10:12:44 1 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing.
1
3950
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 this web application, I have search page that utilizes the Windows Indexing Service (MSIDXS provider). For reasons I'm not aware of at this time, setting <identity impersonation="true" /> in the web.config causes an error whenever you try to search.
0
1193
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 order to have the right NTFS permission on the replicated files of the application (otherwise I have unknown account as ASPNET does not have the same SID on the 2 server) I already had the "Network Library =dbmssocn" option in the connect string...
3
10137
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 that. Im trying for about 3 hours but can't get it to work. Thank you!
0
966
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 single server It works without any problem. The problem is definitely a cluster problem. (On each IIS itself it works, but when I go over the cluster-IP I get sometimes the error.
10
43542
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 been able to find so I've written the following for starters: public static Form GetActiveForm() { // Returns null for an MDI app Form activeForm = Form.ActiveForm; if (activeForm == null) {
0
1472
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 would start taking more memory, and the primary would release memory. So, on my two boxes with 16gb RAM, I allocated 10 for one node and 12 for the other (before we were at 6 & 8). However, when we had a failover it appeared that the secondary was...
1
4502
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 cannot not reinstall sql server (or failover). Failover fails because the sql server resources are not owned by the rebuilt node. There is no option to add in the new node as a possible owner because the rebuilt node does not exist in the modify...
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
7987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6634
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5729
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2372
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.