Thursday, 30 December 2010

OpenDeploy Common Errors and Resolution

We will see in this article how should we tackle the errors occurred during OpenDeploy transfer. Before I list down the errors and what do they likely indicate, for people who are new to OpenDeploy / TeamSite stuff it is a good idea first to learn where to look for the errors and what should be looked into for resolving them. One of the first step to this is, locating the OpenDeploy log files for errors.

OpenDeploy log files are generally created at location OD-home/<instance-name> for eg: if you have a OpenDeploy instance named '20016' and the OpenDeploy transfer has failed for this particular instance then you should be checking the log files at : OD-Home/20016/ location.

What files to be checked?
Once you know where to locate the log files and navigate there, it is likely to get lost by looking at number of files with similar names. This is where the naming convention of OpenDeploy logs helps you to zero down on the exact log file/s. OpenDeploy log files are generated with naming convention /(per) deployment as :
src.<VAR1>.<VAR2>.<VAR3>.to.<VAR4>.log

VAR1 - Branch Name
VAR2 - Deployment Definition Name as in OpenDeploy xml
VAR3 - Source Server Name
VAR4 - Target Server Name

If you know each of the above variable thing for your set up, it should be very easy for you to know which file you need to open for finding the error. Alternative way if you don't want to build the OpenDeploy log file name as above is know the timestamp of the deployment failure and then sort the list of files by the timestamp and check for relevant file. It is very likely that you end up having multiple deployments at the same time and hence multiple log files with same timestamp. Always match the OpenDeploy log file name and timestamp both to zero down the exact log file.

What should be checked in the log files?
Once you know the location of log file and the exact log file name, the most important step is to look for the error message/s in the log file and what do they indicate. It is advised to always look for the keyword 'ERROR' or 'FAILED' or 'failed'. Most often or not, you will see the OpenDeploy logs logging the error messages with the above mentioned 3 keywords in and around the error message. Now that, you have reached the exact message what is the error message indicating to you? The answer follows:

Following are the list of very common errors that are logged while OpenDeploy Transfer.

Exceeded all 3 retries to get a connection with the target OpenDeploy host.

Failed creating socket

As the error message itself indicates that, a connection with target OpenDeploy host can not be done. It means that, OpenDeploy receiver i.e.OpenDeploy instance/service on the target server is not running.

Solution: Get on to the target server (Don't ask me how?)and check if the OpenDeploy is running or not:

/OD-Home/bin/iwodserverstatus -odinstance <instance name>

You are likely to see message stating 'OpenDeploy is not running.'

This confirms the OD service is not running and you need to get it up and running to receive deployments. Once OD is restarted, retry the deployment.

Remote-ERROR: remote-dir-not-ok
ERROR: prepare-failed.
Receiver-ERROR: ERROR: [x/y/z] is not an allowed deployment path.
ERROR: Failed to deploy local_directory[.] of area[x/y/z]


This error is logged when the receiver server's odrcvr.xml file is not configured to accept deployments from source. Confusing??
Try this:
Solution:
Lets say you are deploying from Source server 'S' to Target server 'T'. You encountered an error stating 'not an allowed deployment path'. This means, your 'T' server needs to accept deployment from 'S' at /x/y/z path and for that all you have to do is, update odrcvr.xml file on 'T' at location
OD-Home/etc to allow 'S' to deploy to 'T' @ x/y/z.
Example entry:

<allowedHosts>
    <node host="jupiter.mycompany.com">
        <allowedDirectories>
            <path name="x/y/z"/>
        </allowedDirectories>
    </node>
</allowedHosts>

Make sure that you restart the OD service on target server for OD to re-read updated configurations. Once OD is restarted, retry the deployment.

Assumption here is: Source 'S' already has 'T' as an allowed deployment target.


Receiver-ERROR: ERROR: Client specified bad local path

Solution: If you find the above error, make sure that your OpenDeploy xml has the correct path for receiver mentioned in in. Also, allowed host as explained above @ receiver's end needs to have the correct entry. Always check that you are giving correct path in either entries. Most of the times 'incorrect path' leads to difficult to debug errors.


Note that, all log files here are referring to the source side log files (for all explained errors).

In addition to above errors, there are many errors which are logged as a result of configuration issues/ network issues/ access issues and so on. To have a further detailed help for specific errors Devnet is a great platform to seek Expert Advice from the Guru's. Click Here

Your feedback / Comments are welcome.