Waldron Digital

Archive for the ‘Technology’ Category

Adding a Gravatar Image to your own, self-hosted WordPress site in 4 easy steps

with one comment

I was a little mystified exactly how to get a Gravatar image working for my local WordPress account (the one I use to post, comment and administer my blog).  Turns out it’s a piece of cake – all you need to do is to create a Gravatar account and add an e-mail that matches the e-mail account you use on your self-hosted WordPress server.

Here’s the quick and dirty:

  1. Head over to Gravatar.com by clicking here: www.gravatar.com.
  2. Create an account.
  3. Link the e-mail address that you use on your WordPress blog/server to post/comment; then add your picture/logo/etc. to Gravatar.  Hint: if you use multiple accounts on your own WordPress site or other sites that use Gravatar, you can simply add the e-mails for those accounts to display the same Gravatar image that you uploaded.
  4. In my experience your new Gravatar won’t appear without you adding a comment to any blog post.  I added one, saw my picture displayed, then immediately deleted the comment.  At that time all my existing comments (some from years/months prior) displayed my new Gravatar image.

Boom-shaka-laka!  You’re done.

Written by Mike Waldron

May 19th, 2010 at 3:56 pm

Blackberry Application Server Service Terminated Unexpectedly with BES Express

with 2 comments

After a recent reboot I found that my BES Express server was no longer communicating with devices.

My first dilemma was the Blackberry Controller Service wouldn’t start.  I got this in my controller log file:

[20000] (05/16 01:22:56.500):{0x147C} LogReceiver: Failed to bind a socket

That told me that there was a conflict with whatever port the controller was trying to grab.  After a little Googling I found that adding port 4070-4071 to the ReservedPorts TCP/IP registry key would fix this.  The Microsoft DNS service fights with BES for control of ephemeral ports which is a known situation.  Rebooted the computer and found that my devices were updating and the controller service started successfully.  However, my Application Server service kept shutting down every time I would attempt to access it, and could not enter the web administration interface.  I would ultimately get a connection timed out message.  I observed this in my system log:

Error: The BlackBerry Administration Service – Application Server service terminated unexpectedly.
It has done this 1 time(s).  The following corrective action will be taken in 60000 milliseconds: Restart the service.

And this in my BBAS logs:

(05/17 19:34:43:369):{main} [org.jboss.system.ServiceController] [WARN] Problem starting service jboss.cache:service=BASObjectVersioningCache
org.jgroups.ChannelException: failed to start protocol stack

I eventually found the fix here at the Blackberry support forums, which is to add an additional range of reserved ports for the Application Service:

Click Start, click Run, type regedit, and then click OK.
Locate and then click the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Right-click ReservedPorts, and then click Modify.
Paste the following at the bottom.
48855-48858
45588-45588
49955-49955
45599-45599

Restart the server.

Once you go to the web admin, you will think its not going to work but hang tight, give it a few seconds and you will be surprised!!

Here’s what my ReservedPorts looks like after my two fixes (ignore the first three lines which were already there in my environment):

I don’t know how this person picked these ports (maybe spoke with support?)… but it DID indeed fix the problem for me.

My environment: Windows 2003 Server / Domain Controller / Exchange Server 2003 Standard

E-mail ghettoVCB Backup Logs for Windows & VMware ESX/ESXi

with 17 comments

ghettoVCB Log-2-Email, Version 0.95
Last Update: 8/4/2010

I developed the attached Windows batch file for use with VMware (I use ESXi 4) and ghettoVCB.  When used in conjuction with ghettoVCB’s log file, it will:

  1. Detect if:
    a. The backup log doesn’t exist in the specified path (the backup didn’t run).
    b. There is a “Final status: ERROR” message in the log (error condition).
    c. The backup process ran with no errors.
    d. The backup log contained neither a good or bad backup indication (blank file handling).
  2. After checking the above, the script will e-mail you the log file/result using BLAT.EXE mailer (enclosed).  It will clearly tell you in the subject if the backup was successful or not.  If your logfile does not exist (job never ran) it  sends an e-mail alerting you to this as well.
  3. After e-mailing, the logs are rotated and the script will keep up to 6 backups of past logs should you need to trace an older backup.  The filenames will be “Backup1.log” – “Backup6.log”.  “Backup1.log” being the newest backup log rotated, and “Backup6.log” being the oldest.

Installation and Setup Instructions:

  • Ensure that your ghettoVCB command line (cronjob) has the “-L” (capitalized for readability) parameter defined so that your backup log file has the same name and IS NOT date stamped by ghettoVCB.  The file MUST have the same name on every backup or my script will not work!  In my environment I use the filename “gvcb-backup.log”.
  • Download the gvLog2Em batch file and BLAT.EXE mailer package here.  Extract to a folder/directory of your choosing.
  • Edit the environment variables in gvlog2em.bat to match your environment.

Note: Make sure NOT to use quotations (even for long file paths) in defining variables.
Also make sure there are NO SPACES between the variable and the string “var=string”.

set blatpath=\\computer\share\path      <– The path to BLAT.EXE mailer / local or network
set logpath=\\computer\share\path      <– The path to your logfiles / local or network
set logfile=gvcb-backup.log  <– The name of your logfile

set temppath=%temp% <– Writable path to store temp mailbody text file.  Usually you can leave it as-is (I set it to the user temporary path).  New in 0.94. If the variable is omitted the script automatically sets it to the user temporary path.

set emailfrom=vmware@yourdomain.com  <– Backup log “From” email address.
set emailto=you@yourdomain.com  <– Backup log “To” email address.
set emailsmtp=mail.yourdomain.com  <– Your SMTP server
set emailport=25  <– Your SMTP port

set emailauth=False  <– Make this “True” or “TRUE’ or “true”  if you require SMTP AUTH.
(i.e. TrUe will not be found as a “true” condition in my code).
set emailauthu=username  <– SMTP auth username
set emailauthp=password  <– SMTP auth password

set esxiserver=myesxi.yourdomain.com  <– The name of your ESX(i) server, used in SUBJECT line (cosmetic).

  • Make sure the Windows machine running this script has read, write and execute access to the logfile path.
  • Test the operation of the script/batch in your environment, checking for errors in the console output.
  • Once confirmed working, schedule a Windows task to run after your ghettoVCB backup.  (I use an XP virtual machine running on my ESXi server).

Tip: To enable logging of the batch file so you can troubleshoot your automated process, simply redirect it to a file when scheduling the automated task (after interactive testing), like this:

gvlog2em.bat > \\computer\share\path\gvlog2em.log

or really get nuts and put a date stamp at the end:

gvlog2em.bat > \\computer\share\path\gvlog2em_%date:~12,2%-%date:~4,2%-%date:~7,2%.log

Troubleshooting:

  • “ERROR: Parameters missing or incorrect.  Check the configuration.”
    This means that one of the e-mail parameters is either missing or invalid.  Check your vars to ensure you have no spaces or quotation marks in your variables!
  • “ERROR: Could not find the BLAT.EXE mailer at <blank>..”
    “ERROR: Without BLAT.EXE I can’t continue!”
    You left the blatpath variable empty or included spaces or quotes in the variable.
  • “ERROR: Could not find the BLAT.EXE mailer at \\YOUR\network\path..”
    “ERROR: Without BLAT.EXE I can’t continue!”
    Could not find BLAT.EXE in the \\YOUR\network\path location variable.  Check that BLAT.EXE exists in the path you specified.  No trailing backspashes!

How I use it:

  • I run a LOCAL cronjob on the ESXi server calling William Lam’s ghettoVCB.sh
  • My rc.local injection boot-up command line for crontab looks like this:
    /bin/echo “0 0 * * 0 /vmfs/volumes/datastore1/Tools/ghettoVCB/ghettoVCB.sh -a -l /vmfs/volumes/readynasduo/VMBackups/Logs/gVCB-backup.log” >>/var/spool/cron/crontabs/root
    Note: 1. This is a single line (duh) and 2.  I specify the logfile name … no date stamping.
  • I scheduled a Windows task to run the script 6 hours after my ghettoVCB backup (mine takes approx 2 hours to complete).

My environment:

  • VMware ESXi 4.1 (new*)
  • ghettoVCB.sh (latest) running locally within ESXi via rc.local injection cronjob.
  • ghettoVCB backs up to a Netgear ReadyNAS Duo via NFS (datastore mounted via NFS)
    My backup happens once a week, Sunday at 0:00.
  • Windows XP Professional VM on same server runs the task at 6:00am on Sunday.

Please let me know if you experience any issues or have improvements in mind!  I will continue to update this script as I receive feedback.

Changelog:

0.95 (2) – Fixed minor issue with feature introduced in 0.95, where the log would not be included if error or success conditions were not found.

0.95 – Handling of blank log files that do not indicate good or bad backup – will send an error message email.  Usually blank logs are due to ghettoVCB version issues.

0.94 – Better handling of non-existant/offline NFS systems/logpath shares.  Changed failure e-mail body bug that would not send an error e-mail if the logpath was not found.  New variable introduced “tempvar”.  See revision in the parameters section of the installation tutorial above.

0.93 – Minor cosmetic changes.

0.92 – Changed find behavior to look for final status error messages only, so that NFS sleep errors are not reported for successful backups.

0.91 – Added SMTP high priority flag to BLAT.EXE command line for unsuccessful backups.  Succesful backups are sent with the normal priority.  5/11/2010

0.90 – Initial Release  5/11/2010

Thanks to:

  • William Lam for creating ghettoVCB.  The “Rolls-Royce” of ghetto VMware backup solutions.
  • BLAT, one of the handiest utilities for Windows in my toolbox.. and all the folks who brought it to fruition!
ERROR: Could not find the BLAT.EXE mailer at ..
ERROR: Without BLAT.EXE I can’t continue!

Written by Mike Waldron

May 11th, 2010 at 7:24 am

Cannot activate user in Blackberry BES Express, IEMSTest.exe fails with Send As account operator error, Provision User Failed

with 3 comments

After installing BES Express last night, I went to activate my first user and could not get it working.  I tried a “wired” activation using the user web console as well as an “OTA” activation.  The ETA.DAT Blackberry activation e-mail would just sit there in the user’s box and not get picked up.  Also, the OTA activation would just hang at “Activating”.  The wired activation would return a “contact your administrator” text in red when you try to activate that way.

After researching a bit, I ran IEMSTest.exe from the \RIM\BB\Utility\ folder.

It failed with:

BESAdmin: No Send As permission for the {DOMAIN\besadmin} account operator.

Also I received this error in my BBAS-AS Logfile in RIM\BB\Logs after trying to activate a user:

com.rim.bes.bas.besutilityaccess.DeviceActivationJNIException: JBeginActivation::ProvisionUser Provision user failed [sourcefile = c:\ec_build\besxp_5.0.1\6280\bx_adminservice\source\enterprise\bas \server\nativeutil\src\core\main\cpp\basbesutil\src\jbeginactivation.cpp line=286]

I fixed the IEMSTest issue by doing the following:

  1. Implement the Microsoft KB 907434 by applying this script (click to download) to your BES server. Replace YOURDOMAIN with your AD domain (don’t forget to change the extension if you are .net, .local) and replace BESAdminAccountNameHere with your BESAdmin account.  You may need to remove the domain\ from the last line if you are not using a domain account for your BES server as I am.  You have to perform this step as Windows server will reset the permissions you are setting in the following steps automatically without this fix.
  2. Open Active Directory Users & Computers
  3. Enable Advanced Features in AD (View, Advanced Features)
  4. Double-click (open) your BESAdmin user
  5. Security tab
  6. Add the BESAdmin user to the Security tab giving Send As, Receive As – this is in addition to the defaults that were in there.

My IEMSTest.exe works now and I was able to get my users activated over the air.

My environment: Exchange 2003 Standard running on Windows 2003 Server Domain Controller

Written by Mike Waldron

March 4th, 2010 at 3:44 pm

Slow iPhone Response? Try a HARD RESET!

without comments

Recently I upgraded my iPhone firmware to 3.1.3.  Immediately after the update, text messaging was SUPER SLOW and the phone was just plain laggy.  Opening apps would sometimes result in a white blank screen for seconds and all button presses lagged by 2-3 seconds.  I tried your standard soft-reboot (hold down SLEEP and slide to turn off), but that certainly didn’t fix it.

After posting a quick question on the Apple forums, the fix was easy:
http://discussions.apple.com/thread.jspa?threadID=2330402&tstart=0

Perform a HARD RESET by pressing HOME + SLEEP until you see the Apple logo.  Apparently this actually reloads OS X on the phone and it fixed my issue!

Written by Mike Waldron

February 9th, 2010 at 1:44 pm

Posted in Technology

Tagged with , ,

GoDaddy Premium EV Certificate Hidden Web Beacon Link – FOUND!

with one comment

I don’t know why GoDaddy doesn’t publicize it’s hidden web beacon, they talk about it in the help section but you won’t find it anywhere.  I had to contact support twice to get the link below.  The web beacon or site seal is required for the EV green bar to appear in Internet Explorer 7.  The difference is the site seal is visible (and somewhat tacky IMHO) while the web beacon is NOT visible.

Here’s the link:

http://seal.godaddy.com/js/gdwebbeacon.js

or download it at my site here: GoDaddy Web Beacon

Usage is such:

<script type=”text/javascript” src=”http://seal.godaddy.com/js/gdwebbeacon.js“></script>

NOTE: I’d recommend downloading the script and placing it local to your website to keep it segregated from GoDaddy’s website.  So your link would look like:

<script type=”text/javascript” src=”http://www.mysite.com/myscripts/gdwebbeacon.js”></script>

While I was waiting for GoDaddy to respond, I figured out a hack to download the site seal and hide it… which I will share just for kicks:

<div id=”hiddenseal” style=”display:none”><script type=”text/javascript” src=”https://seal.godaddy.com/getSeal?sealID=1234″></script></div>

Written by Mike Waldron

October 23rd, 2009 at 4:45 pm