Author: Michael Blood
2 Useful Things to Know on the Linux Bash Command Line
2 Useful Things to Know on the Linux Bash Command Line
A couple useful Linux commands that I have shown a few people in the past are
Ctrl+A
This takes you to the beginning of the command line, so say you type out some ridiculously long command and you want to go back to the first character without holding down your arrow key for a minute, Ctrl+A will get you there.
!
When you put a “!” at the beginning of your command line it matches the following text with the most recently run command
Say you recently ran the following list of commandscd /var/log/httpd
tail -n100 error.log
vi /etc/httpd/httpd.conf
/etc/init.d/httpd restart
grep 127.0.0.1 *.log| tail -1if you type
!tail # this will run the tail command from the second line above as though you retyped “tail -n100 error.log”
!grep # (or even “!g”) will run the grep command from the fifth line above as though you retyped “grep 127.0.0.1 *.log| tail -1”
Those are my favorites for now ..
DPM Error 337: Manually Set Name of Allowed DPM Server on Client
DPM Error 337: Manually Set Name of Allowed DPM Server on Client
When installing a Protection Agent from DPM 2007 on a server on a Windows 2003 Domain I ran into a wacky problem where the DPM Administration Console errored out during Install.
A server errored out with a 337 error.
You cannot install the protection agent on MYSERVER because access to the computer has been denied.
The Microsoft Documentation says that the recommended action is “Do the following to troubleshoot this issue: ”
1) If another DPM server is currently protecting MYSERVER use that DPM server to uninstall the protection agent from MYSERVER. Then, use this DPM server to install the protection agent on MYSERVER.
2) Verify that the time on the DPM server and the selected computer is synchronized with the domain controller. At a command prompt, type “net time /set” to synchronize the time with the domain controller.
3) If the computer is a domain controller, verify that the primary domain controller (the PDC Emulator) is running Windows Server 2003 with Service Pack 1 (SP1), and that Active Directory has completed replication between the domain controllers since the Windows Server 2003 SP1 installation.
So I start debugging with item 1. Since I am not the first Administrator to work on this installation AND there is another DPM server located elsewhere on the network which was recenctly installed, it seems possible that something odd was done with this computer wpointed to another DPM Server.
First I try uninstalling the client locally on the system and I log into the server to remove the program using Add/Remove Programs, however the Add/Remove Programs listing is completely blank. I do a bunch of research on this and eventually I determine that the Unistall information must somehow be corrupt, the system needs a OS restore or something. I cant afford this and will plan to do this another day. I start browsing around in the Program Files directory for the DPM Client to try and find an uninstall program or something and I happen upon an executable that looks interesting. I open a command prompt and run the program to find out what it does.
#> cd C:Program FilesMicrosoft Data Protection ManagerDPMbin
#> setDPMServer.exe /?
This shows me how to run this program
#> SetDPMServer -dpmservername < servername>
So I run it with the name of my DPM server
#> SetDPMServer -dpmservername MYSERVER
And it clearly does something giving me the following information.
Configuring dpm server settings and firewall settings for dpm server =[MYSERVER]
Configuring dpm server settings and firewall settings for dpm server =[W2K.DOMAIN.COMMYSERVER]
Configuration completed successfully!!!
Now I head back over to my DPM server and run the install again from the Management Tab of the DPM 2007 Administrator Console. And would you beleive it? It installed perfectly. So there are two things I need to get in order to address the other issues on my network (find out why Add / Remove Programs is not coming up, find out if anyone is trying to protect some of the computers using another DPM server on the network).
The thing I never found out was if it could have been items 2 or 3 where there is a time sync problem between the AD controller and the server. It might have been better to start with the easy fixes described in those steps since that would have been easier and would have ruled it in our out.
Until then though this will work; Mystery Solved!
DPM Error 307: Manually Uninstalling Microsoft System Center DPM Protection Agent
DPM Error 307: Manually Uninstalling Microsoft System Center DPM Protection Agent
When installing an Protection Agent from DPM 2007 on a server on a Windows 2003 Domain I ran into a wacky problem.
A server errored out with a 307 error.
The protection agent operation failed because DPM detected an unknown DPM protection agent on MYSERVER.
The Microsoft Documentation says that the recommended action is to:
Use Add or Remove Programs in Control Panel to uninstall the protection agent from MYSERVER, then reinstall the protection agent and perform the operation again.
So I log into the server to remove the program using Add/Remove Programs, however the Add/Remove Programs listing is completely blank. I do a bunch of research on this and eventually I determine that the Uninstall information must somehow be corrupt, the system needs a OS restore or something. I cant afford this and will plan to do this another day. In the mean time I need to get this program uninstalled so I can reinstall the DPM Agent on this server.
I couldn’t find an MSI or anything to use to uninstall it but I found a post describing where in the registry to find uninstall program locations is for certain programs.
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowCurrentVersionUninstall
Well, there is supposed to be an entry here for each of the programs that are installed on your system, but there was not one for the DPM agent, I did find all sorts of UID type entries and I looked through them and low and behold, I found an entry for Microsoft System Center DPM Protection Agent (the name of the agent was in the ‘DisplayName’ string key) I then copied the string in the ‘UninstallString’ key
MsiExec.exe /I{D58FCD22-5818-412B-93C3-D03CF3D6A2CE}
Note: do not run this on your system, the UID above should correspond to your systempasted it into a command prompt window and it then ran the uninstall program for “Microsoft System Center DPM Protection Agent” and prompted for a reboot.
I rebooted and the system came back up, out of curiosity I went back into the registry and I could not find the entry in the registry any more. I am not going to do more investigation into at this point however it makes me think that the items that show in this registry folder with a UID instead of a program name are somehow corrupted even though this one ran okay. I looked on my windows XP workstation (which Add/Remove Programs works on) and I have dozens of UID entries in this registry area so I am sure that this is not the cause of the “corrupted” Add/Remove programs issue.
Anyway, thats it, the “corrupt” DPM protection agent was removed and so I was able to rerun the install process from the DPM 2007 Administrator Console again. It succeeded without issue and now I can backup my server.
PowerEdge 1750 RAID Array Repair
PowerEdge 1750 RAID Array Repair
This blog describes some basic commands to repair an array in the case of a failed disk on the Dell 1750 running Linux via Dells afacli command line utility.
The actual manual for afacli can be found here:
http://docs.us.dell.com/support/edocs/storage/57kgr/cli/en/index.htm
Accessing the CLI from the UNIX Prompt
To access the CLI from the UNIX prompt, display a window and type afacli
in any directory. The system displays the FASTCMD>
prompt, which indicates you can now use CLI commands. The path in the startup file (.login
or .cshrc
) must include the directory where the software is installed for the command to work in any directory. See your UNIX documentation for information on setting up directory paths in the .login
and .cshrc
files.
To view all controllers use ‘controller list’
To connect to the controller with the command line utility, execute:
FASTCMD> open afa0
AFA0>
To show the status of all disks in all arrays, execute ‘enclosure show status’.
AFA0> enclosure show status
Executing: enclosure show status
Enclosure
ID (B:ID:L) UpTime D:H:M PowerCycle Interval Door Alarm
———– ————– ———- ——– ——– —–
0 0:06:0 0:00:00 0 10 UNKNOWN OFF
Enclosure
ID (B:ID:L) Fan Status
———– — ————-
0 0:06:0 0 OK
0 0:06:0 1 OK
0 0:06:0 2 OK
Enclosure
ID (B:ID:L) Power State Status
———– —– ———— ——-
Enclosure
ID (B:ID:L) Slot scsiId Insert Status
———– —- —— ——- ——————————————
0 0:06:0 0 0:00:0 0 OK ACTIVATE
0 0:06:0 1 0:01:0 0 OK ACTIVATE
0 0:06:0 2 0:02:0 0 ERROR FAILED CRITICAL WARNING ACTIVATE
0 0:06:0 3 0:03:0 0 ERROR FAILED CRITICAL WARNING ACTIVATE
0 0:06:0 4 0:04:0 0 ERROR FAILED CRITICAL WARNING ACTIVATE
0 0:06:0 5 0:05:0 0 ERROR FAULTY FAILED CRITICAL WARNING ACTIVATE
Enclosure
ID (B:ID:L) Sensor Temperature Threshold Status
———– —— ———– ——— ——–
0 0:06:0 0 82 F 120 NORMAL
0 0:06:0 1 86 F 120 NORMAL
Above, the disk in slot 5 is bad, so first deactivate the slot:
AFA0> enclosure prepare slot 0 5
Wait for the lights to go out, then remove the disk. Replace the disk with a functional, identical replacement disk.
Then, activate the slot:
AFA0> enclosure activate slot 0 5
Now, wait for the disk to rebuild. You can view the rebuild process with ‘task list’.
AFA0> task list
Executing: task list
Controller Tasks
TaskId Function Done% Container State Specific1 Specific2
—— ——– ——- ——— —– ——— ———
101 Rebuild 0.7% 1 RUN 00000000 00000000
The disk may be ready for use once this is complete however if it’s not try the command ‘disk initialize’
disk initialize
To initialize a SCSI disk for use with the currently opened controller, use the disk initialize
command. This command writes data structures to the disk so that the controller can use the disk.
HINT: If you need to actually see which disk to pull out of the server ‘disk blink’ causes the disk drive light to blink.
Delete Auto Complete Entries From Outlook
Delete Auto Complete Entries From Outlook
You may have noticed email addresses showing up when you start typing an email address to send mail to. This is Outlooks auto complete feature. You may want to remove old email addresses or miss typed email addresses from showing up.
Start a new message & click in the To… box
Start typing the email address you want remove & use the down arrow to select it.
Once it’s highlighted hit Delete & it will be removed.
You can delete all auto complete entries from outlook.
The file is here, where username is unique to your installation: “C:Documents and SettingsusernameApplication DataMicrosoftOutlook”
Delete or rename all *.nk2 files at this location.
Microsoft has a more detailed how to here:
http://support.microsoft.com/?kbid=287623
Cygwin Not Connecting via SSH
Cygwin Not Connecting via SSH
I have a scheduled task that is setup to run a command with Cygwin each night to backup files to a Linux machine. I would find Bash and SSH processes left running but the backup didn’t start. This is because I needed permissions to the /cygwin/etc/group and /cygwin/etc/passwd files setup correctly for the user account that’s running the backup.
This is what the task is set to run “c:cygwinbinbash.exe -l -c /home/backup/rbackup_redirect”
To troubleshoot I would schedule the backup for a few minutes ahead. It would fail running under the backup user account. I tried it on an admin account and the backup account, which isn’t an admin, by manually starting it in Cygwin. The admin account would work. The backup account wouldn’t. I then watched the SSH traffic on the Linux server as I manually started the backup. I saw that it would attempt to connect but fail when started from the backup account. It would hang for some time not moving on to the next step then stop trying. On the windows system Bash and SSH would still be running but on the Linux system SSH would stop running.
When I start Cygwin under the backup user account it would give a message saying that I may not be in the right group and I may need to rebuild /cygwin/etc/group and /cygwin/etc/passwd but it would go on to bash and let me run commands like normal. I tried rebuilding them. That didn’t work. I checked the file permissions on those files and found the issue. Just adding the backup user account didn’t work though. I had to actually delete the files. Make new ones that were blank. Then add the backup user account to have full rights. Then I rebuilt the files & SSH connections work fine.
Workaround Solution – Cold Fusion Transient Error – Invalid Method Signature Options
Workaround Solution – Cold Fusion Transient Error – Invalid Method Signature Options
Occassionally I have run into a strange error which I could never duplicate.
It read something like
Invalid method signature: xxxxxx;)Ljava/lang/Object; null
with different values at xxxxx
I did a bunch of research into the problem and it seems that the end result is that there is a bug in ColdFusion 7 with the “evaluate()” function.
I was querying dynamically named queries and there appeared to be some sort of problem with the class files that were being written.
The solution was to uncheck the “Save Class Files” in the Cold Fusion Administrator, delete the /cfclasses directory and restart Cold Fusion.
Macromedia also said there was a fix released in ColdFusion 7.0.1. (you can find your ColdFusion version by following the simple instructions in Ben’s post )
Here are links to a forums with the some discussion of the error and the update.
Thanks for the help!
http://groups.google.com/group/macromedia.coldfusion.cfml_general_discussion/
If your ISP has not upgraded to this version yet you can point them to Adobe’s website to get the update.
http://www.adobe.com/support/coldfusion/downloads_updates.html#mx7
Matraex 5th Annual Rafting Trip
Matraex 5th Annual Rafting Trip
In our annual tradition we broke away for the afternoon and went Rafting on the South Fork of the Payette River.
It was July 25th, 2008, a Friday afternoon, we closed up shop and headed up to Banks, Idaho.
The previous 3 years we rafted the Boise Main but this time around we thought we try something a bit more intense.
Here’s our seating chart in case you don’t recognize us in the hats.
Front Left – John Lyon
Front Right – Andre Nosalsky
Middle Left – Michael Porterr
Middle Right – Becky Gilmore
Back Left – Ryan Smith
Back Right – Michael Blood
Bronco Billy, Staircase, Dog Leg and even a dead elk along the way, everyone had fun and stopped at the Mexican Restaurant in Horseshoe Bend for dinner and drinks like we do every year. (I dont remember the name it changes every year)
We tossed the idea around of a full day rafting trip with a campout the night before for next years trip.
Thanks to Bear Valley River Co. for the tour.
There are more pictures on Flickr.
Moved Into Our New Space
Moved Into Our New Space
Well, after about a month of construction a couple of weeks of waiting for cubicles and desks we have finally moved our offices across the hall to Suite 150 in the same building (1450 Eagle Flight Way Boise, Idaho 83709)
As we all expected we love it, Everything is new, It’s more private, there’s more space and natural light, our conference room is big enough for us to use, the a kitchen has a sink, the server room is isolated and quieter, the list goes on an on.
We are happy to be in new office and to show it off to anyone that wants to drop by, consider this an open invitation.
Our original office suite is being slightly remodeled to make an expaned space in our Executive suite. In the future this office will be layed out to handle growth in our Network Office Support services department.
Matraex Expanding in Boise
Matraex, Inc is expanding! We have signed a new 5 year lease with Sundance Co to double our current office space (Suite 125) by adding a second office space (Suite 150). After a tenant across the hall moved out from our current location at 1450 Eagle Flight way in Boise, we began watching to see if we could expand to it. After several months of negotiations and planning the layout was decided, agreements were signed and as of February 4th renovations have begun. The schedule move in date will be March 1st 2008.
The expanded space will have 6 new office spaces as well as a dedicated server room, a conference and break room as well as a reception area. Long frontage windows will provide 4 offices with full length windows, which will allow a lot more natural light into our lives than Suite 125 did. The new conference room / break room will have a sink and dishwasher. While this seems small, it is actually something that we really pushed for, we can now graduate from paper cups and plates to real plates, utensils and coffee cups! Best of all our conference room will fit all of the employees in the company.
Here is the new plan, The walls in green will be torn down, the walls in red will be added to
Customers and Clients can continue to send correspondence, letters and information to Suite 125 however we will transition to using Suite 150 for this in the near future.
As soon as the renovations are complete all of the current employees will head over and stake claim to their space. While the renovations to our original space have not yet been decided we plan that it will be used for our growing office network support services. Some of this space will actually be used for our €œco-leasors€, SpeedyQuick Networks, Inc. As their operation has expanded they now have a need for 3 offices within this suite.
The 5 year $280,00+ deal marks our 9th year in business. Matraex previously has been in this building for only 2 years but this lease shows our commitment to this building. The building also houses several other IT companies including Solutions Pro. Since we have utilized Solutions Pro for our data center over the last 7 years we feel very comfortable here. The fact that we have up to 1 GB connections to our live and development servers allows us to work quickly and efficiency without a slower less reliable DSL or T1 internet connection in the way. We can not picture a more ideal location for our business.