Archive for September, 2006
Hibernate fails, “Insufficient System Resources Exist to Complete the API”
I recently upgraded my Dell Latitude D800 laptop from 1GB to 2GB RAM. Since then, I have seen the mysterious “Insufficient System Resources Exist to Complete the API” message every now and then when I close the lid and put the machine in hibernation. This is rather irratating since the machine will just be in stand-by mode, and drains the battery if leave it there long enough; or make my bag extremely hot.
After googling around, I found the patch from Microsoft Knowledge Base. According to the article, “the Windows kernel power manager cannot obtain the memory resources that are required to prepare the computer to hibernate”. This is rather illogical, considering it only happens when you have more than 1GB RAM. You’d think if this problem doesn’t occur when you have 1GB RAM, it shouldn’t occur when you upgrade to 2GB. But it explains that the size of the block of continguous memory that the Windows kernel power manager requires for hibernation, is “proportional to the number of physical memory regions that the computer is using.”
Well, whatever you say. After I downloaded the patch, installed it, and rebooted the machine, the problem went away.
I guess some time having more RAM is not always a good thing.
1 comment
Access SQL Server through VPN
I have encountered an interesting problem recently about accessing SQL Server on a second domain through VPN.
I am sitting on a Windows XP Pro box, logged in to domain DA as user UserA. My client has a SQL Server running on domain DB. DA and DB are on completely separate corporate networks; they don’t know anything about each other. I have a user account UserB which is an authorized domain user on DB. The SQL Server has only Windows Authentication Mode enabled for security purpose. And I connect to DomainB from my XP box through Cisco VPN Client software with a SecureID key fob. (Yeah my client is pretty serious about security.)
So, here is what I have to do in order to connect.
- Log on to my XP box using local administrator account.
- Go to Control Panel -> User Account -> Advanced Tab -> Manage Passwords.
- Add “*.DB” as the server, and “DB\UserB” with the password as credential.
- Log out.
- Log back in using my DA\UserA account to domain A.
- Start VPN Client and log in with my DomainB\UserB account.
- Right click on the “SQL Analyzer” shortcut, click on “Run As…”.
- Select “The following user”, and put in your local administrator credential, and click on OK.
- SQL Analyzer should launch, in Connect to SQL Server dialog box, type in the SQL Server name, and select Windows authentication. Hit OK.
- Bingo, I am in.
The morale of the story is, when logging on to the second domain trying to access the SQL Server, the domain controller on the second domain not only needs to verify your impersonated identity, it also needs to verify your original identity. Since the home domain PDC can’t be contacted when you are on client domain, you have to present your local administrator credential to the client domain so it can trust your local machine.
2 comments
Biztalk 2006 Tutorial Gotchas
I have been going through the Biztalk 2006 Tutorials lately to learn the latest and greatest Biztalk Server. And I found it massively confusing in many regards. I had to search high and low, in addition to mess it around a lot (which I expect to do anyways) to get it to work. So I am going to record some gotchas here.
1. Most importantly, make sure you download the latest tutorial Word documents from MSDN. Do NOT rely on the text in the Biztalk Server Documentation that comes with the installation.
2. By default, Business Rules Composer is not installed. You need to re-run the installation program and select it to install.
3. In Tutorial 3, when you create RR_Payment_Port, make sure it’s binding is set to “Specify now” instead of “Specify later.”
4. more to come…
No comments
InkBoard is here!
After receiving a seond email request this month, I finally took some time to move the InkBoard over from my hacked MIT server. If you are interested in Tablet PC-enabled real time collaborative sketching, check it out. I have not updated the software for a while, and there is no immediate plan for 1.2 version. But if there is enough interest, I will try to make revisions.
The major improvements I made for version 1.1 over version 1.0:
- Remoting is used in place of the direct socket calls.
- InkBoard Server now runs as a Windows Services as oppose to console application.
- Audio/Video conference module is removed since it creates more setup trouble than its worth.
- Toolbar icons improved (still miles away from commercial quality though).
Let me know what you think.
No comments
This is why I HATE open source software!
Just spent 2 hours trying to install Apache and PHP on my WinXP laptop. Sounds like an easy task, right? Well think again. I downloaded the latest Apache 2.2.3, and the latest Php 5.1.6, installed both, so far so good… Then I hit the bomb. After modifying the httpd.conf file trying to load the php4 module, Apache refuses to start. It complains that it can’t find the specified php module, which is crazy because I tripple-checked the php installation location.
After searching all over Google, I found a few posts that claim Apache 2.2.x would NOT work with “regular” php! HELLO! “Apache not working with PHP?” Have we come to the end of the world? Even if that’s the case, don’t you think in the download page either Apache or PHP should tell you with the most flashing “WARNING!!!” text you’d ever seen? This is truely madness.
The posts I found then proceed to describe a few “work-around” approaches, and of course they are all different. And this is the aspect that I truly hate about Open Source. There is no “definitive” documentation. Everyone can tell you a different story. You look for some thing simple and you get 10 answers out of which probably only 3 really works. I really don’t want learn the subtleties of configuration files, and don’t have the tools to recompile PHP agaisn Apache (whatever that means), I just want to run the damn installation and things should work!
Well there doesn’t seem to be any alternatives but to waste a few more hours trying the “work-arounds”.
[A few hours later……]
Finally I gave up on Apache and went back for PHP on IIS. Well, the ISAPI mode didn’t work either, but the CGI mode did.
Next up is MySQL, which is relatively easy comparing to the previous steps. Of course PHP complains again that my MySQL is not present. What the h*ll? Didn’t I just install it?
[Some more searching……]
OK, it turns out I have to uncomment some lines in the php.ini file to load the mysql extensions. Come on people, we are in year 2006, and we are still manually editing ini file to get something to work?! Say what you can about the flexibility and elegance of plain text configuration files, when someone like me, who doesn’t have time to read documentation or lines of comments in the config file, and just want to turn a switch on, I will take a crappy GUI over config file any day.
1 comment
Some useful tools
http://cl1p.net: This is an Internet clipboard. If you are like me, you probably are constantly frustrated by not being able to paste more than 10 lines of code into the MSN message window and IM it to your co-workers. Cl1p.net is such a simple yet useful solution to this problem. It is highly recommended. I just wonder how they make money; and the same can be said to the next tool.
http://shrinkster.com: A very simple tool to condense those horribly long URLs into only 3 letters. Mathmatically it seems impossible. Using 26 characters plus 10 digits, you can have at most 36 x 36 x 36 = 46,656 combinations. Yet I would expect people are throwing (or will throw) a far greater number of URLs at shrinkster. Apparently there is a index/lookup table behind shrinkster that generates a unique 3-letter code to your input. Perhaps it is just at its starting stage and the number of records in that database is still low. As more and more people use it, you might expect soon we will venture into 4-letter territory. But still, it is a great tool, especially when you are trying to tell someone a URL over the phone.
What impresses me the most is the simplicity of these tools. These are incredibly simple and yet powerful ideas, kind of like the Internet itself.
RegShot, pointed me to me by Iainer Munoz, a DirectSound guru. This free tool let you take 2 snapshots of your Windows registry and compare them. It prints out a nice laid-out HTML page for the difference. It comes very handy if you are trying to figure out what changes have been made to the registry by a program. I am trying to get my Bluetooth earphone to work with my laptop, and this tool was very helpful. More to come on this little project.
No comments
Configuration Application Block
Recently I have been digging through the MS Enterprise Library, and not suprisingly found some gold in there. Configuration Application Block in MS Enterprise Library Jan 2006 release is a very powerful tool. The brightest spot is the ability to allow loosely decoupled configuration-driven object creation. Basically you can specify the type, the initialization variables, and name of the new instance in the app.config file. The ObjectBuilder, leveraging the factory design pattern, can build the objects based on the parameters you set. Using Generics-enabled Assembler pattern, the whole thing can be a little cryptical to get around initially. I will write more on that. But once you get through it, you will realize how big a leap this is in creating loosely coupled designs.
No comments
MSNLB
No, I am not talking about Major Subpar National League Baseball. (Although I really wish we could have Bronson Arroyo back.) This is about Network Load Balancing, a software load balancing tool Microsoft offers to Windows Server family starting from 2000.
A client of mine setup a NLB-enabled web site with two Windows 2003 Virtual Servers. However, when he turns off the IIS Server on one of the Virtual Server, we observe that network traffic is still being directed to that server. Thus, we are seeing “Server Not Available” error from time to time on the client browser.
This is rather baffling. If NLB can direct network traffic based on the load of the server, (hence the name NLB), it surely should have found out that one IIS Server is down, and stops sending HTTP requests to that particular server.
A little Googling revealed the true story. It turns out that MS NLB only does load balancing on OSI Network Layer 3, the Network Layer; it does NOT work on Layer 7, the Application Layer. This means as long as the machine is online (responding to heartbeat), NLB will keep sending network traffic to it. Here is the official MS documentation:
Network Load Balancing automatically detects and recovers when the entire server fails or is manually disconnected from the network. However, Network Load Balancing is unaware of the applications and services running on the cluster, and it does not detect failed applications or services. To provide awareness of application or service failures, you need to add management software, such as Microsoft® Operations Manager (MOM), Microsoft® Application Center 2000, a third-part party application, or software developed by your organization.…”
So, there you have it. Personally, I think this makes MS Network Load Balancing a misnomer. But hey, while CISCO hardware Load Balancer (presumably can work at the application layer) costing thousands of dollars, what do you really expect out of a freebie from Microsoft?
2 comments
WordPress impresses me.
Just spent 20 minutes installing WordPress. I am not a PHP guy, but I had my fair share of Perl and MySQL experience back in the days. But I have to say this is rather unexpectedly easy. I was bracing myself for at least three hours of obscure configuation file tweaking. But hey, here we are!
I was going to give .Text a try. But I guess connecting to MySQL would’ve been a stretch, given how much the code relies on stored procedures, and how limited the stored procedure is supported in MySQL. It ran fairly well on my local XP laptop with SQL Server 2005 though.
Anyways, here it is. My first post!
No comments