Saturday, November 9, 2013

XHOST Setup on Ubuntu

It is mandatory to set-up XHOST in order to run any installation through UI, for Instance Oracle installation. If XHOST is not configured property Ubuntu will not trigger any UI installer window.

How to Set-up:

Edit default users bashrc file (Under user Home directory)

sirishg@ubuntu:~$ vi .bashrc

Add the following lines,

xhost local:<username>

Example:

#### Sirish Changes Start ####
echo Adding xhost for users sterling, oracle and sirishg

xhost local:sterling
xhost local:oracle
xhost local:sirishg

echo Adding xhost for users Done!
#### Sirish Changes End ####

Wednesday, May 29, 2013

My EDI Notes

E
​DI File Structure

ISA
GS
ST
Abouve 3 are envelope hearders.

It contain transaction details, sender and receiver details, transaction details, X12 standard versions.

SE
GE
IEA

Abouve 3 are envelope Tailers.

*) EDI file is delimiter file.
*) Each segment (line) is terminated by segmenet terminated. default symbol is ~
*) Segment is collection of elements and composite elements. Composite element is a sub element.
*) Each sgement will contain some specific information for the transaction.

ISA

ISA*00* *00* *08*9251750000 *08*1234567890 *030627*1304*U*00401*000001403*0*P*>~ 

ISA Elements Details

ISA01 Authorization Information Qualifier
ISA02 Authorization Information
ISA03 Security Information Qualifier
ISA04 Security Information
ISA05 Interchange ID Qualifier
ISA06 Interchange Sender ID
ISA07 Interchange ID Qualifier
ISA08 Interchange Receiver ID
ISA09 Interchange Date
ISA10 Interchange Time
ISA11 Interchange Control Standards ID
ISA12 Interchange Control Version Number
ISA13 Interchange Control Number
ISA14 Acknowledgement Requested
ISA15 Test Indicator
ISA16 Subelement Separator

X12 VS EDIFact?
   


Friday, May 24, 2013

Avoid duplicate file processing in Sterling File Gateway (SFG)

The actual error we see in the logs is just the way SFTP in SI detects
duplicate files and since you have the option in the
mailbox.properties set to:

disallowDuplicateMessages=false

This means that duplicate files are allowed and therefore SFG
processed those duplicate uploads.

So the partner should investigate why did their application trigger a
duplicate upload of the same file.

If you want to avoid duplicate uploads, you should consider setting
the option disallowDuplicateMessages to true in both nodes, this will
stop SI from accepting duplicate files.

If you want to make that change, you will need to modify\create your
customer_overrides.properties on both nodes and add the following
line:
mailbox.disallowDuplicateMessages=true

Both nodes need to be restarted for the change to take effect.

Thursday, May 16, 2013

Attach multiple SSH Authorized User Key to Sterling File Gateway (SFG) Profile


Multiple source systems can talk to one Sterling Integrator SFTP server and the Authorized User Key for the remote servers could be different. The limitation with SFG is we can’t attach multiple Authorized user key to SFG profile, if we edit the profile SFG will list all the user profiles in drop down it mean we can select only One.
To overcome this problem  DO NOT attach SSH Authorized User Keys from SFG instead go to Sterling Integrator Dashboard and edit the SFG Profile User there is page to attach multiple SSH Authorized User  Keys to one user.
SI Dashboard > Account > User Accounts > Account Name (Search on Account Name), Edit the user and assign multiple SSH Authorized User Keys. 


Wednesday, May 15, 2013

Setting up SSH public/private keys


Setting up SSH public/private keys

SSH (Secure Shell) can be set up with public/private key pairs so that you don't have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of typing.​
     

SSH Version 2

​On the local machine, type the BOLD part. The non-bold part is what you might see as output or prompt.
  • Step 1:
    % ssh-keygen -t dsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (~/.ssh/id_dsa):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return)
    Enter same passphrase again:
    (just type return)
    Your identification has been saved in ~/.ssh/id_dsa
    Your public key has been saved in ~/.ssh/id_dsa.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste the content of the local ~/.ssh/id_dsa.pub file into the file ~/.ssh/authorized_keys on the remote host.
  • RSA instead of DSA
    • If you want something strong, you could try
      % ssh-keygen -t rsa -b 4096
    • Instead of the names id_dsa and id_dsa.pub, it will be id_rsa and id_rsa.pub , etc.
    • The rest of the steps are identical.
That's it!
FAQ:
  • Q: I follow the exact steps, but ssh still ask me for my password!
  • A: Check your remote .ssh directory. It should have only your own read/write/access permission (octal 700)
    % chmod 700 ~/.ssh

SSH Version 1

  • Step 1:
    % cd ~/.ssh
    % ssh-keygen -t rsa1
    Generating public/private rsa1 key pair.
    Enter file in which to save the key (~/.ssh/identity):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return) Enter same passphrase again: (just type return)
    Your identification has been saved in ~/.ssh/identity
    Your public key has been saved in ~/.ssh/identity.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste content of the local ~/.ssh/identity.pub file into the file ~/.ssh/authorized_keys on the remote host.

​​
Reference​
​​
​​


​                   
http://www.ece.uci.edu/~chou/ssh-key.html

​ Configure External Databases to IBM Sterling B2B Integrator

We can add multiple
​​
external databases to IBM Sterling B2B Integrator. To add custom database need to do the following things,

1. Stop IBM Sterling B2B Integrator
2. Navigate to SI_INSTALL_DIR\properties and edit jdbc_customer.properties.in and add the below properties.
3. Run setupfiles.bat/sh (SI_INSTALL_DIR\bin\setupfiles.bat/sh)
4. Start IBM Sterling B2B Integrator

Note: SI_EXTENSION is my pool name. We can name whatever we want.

MS SQL Server Database

Need to change the test query depending on server, For MS SQL Server Database
SI_EXTENSION.testOnReserveQuery=SELECT GETDATE()

Oracle Database

Need to change the test query depending on server, For Oracle Database
SI_EXTENSION.testOnReserveQuery=SELECT * FROM DUAL

jdbc_customer.properties.in

SI_EXTENSION.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
SI_EXTENSION.url=jdbc:sqlserver://localhost:1433;databaseName=SI_EXTENSION;SelectMethod=cursor
SI_EXTENSION.user=sa
SI_EXTENSION.password=
#SI_EXTENSION.maxconn=20
SI_EXTENSION.storedProcClassName=com.sterlingcommerce.woodstock.util.frame.jdbc.SybaseStoredProcQuery
SI_EXTENSION.varDataClassName=com.sterlingcommerce.woodstock.util.frame.jdbc.MSSQLVarData
SI_EXTENSION.catalog=SI_EXTENSION
SI_EXTENSION.type=remote
SI_EXTENSION.tr

​​
ansaction=true
SI_EXTENSION.testOnReserve=true
SI_EXTENSION.testOnReserveQuery=SELECT GETDATE()
SI_EXTENSION.testOnReserveInterval=60000
SI_EXTENSION.maxRetries=100
SI_EXTENSION.blobPageSize=1024000
SI_EXTENSION.compressBlob=true
SI_EXTENSION.dbvendor=mssql
SI_EXTENSION.buffersize=500
SI_EXTENSION.maxsize=20
SI_EXTENSION.initsize=0
SI_EXTENSION.factory=com.sterlingcommerce.woodstock.util.frame.jdbc.ConnectionFactory
SI_EXTENSION.behaviour=2
SI_EXTENSION.lifespan=0
SI_EXTENSION.idletimeout=86400000
SI_EXTENSION.housekeepinginterval=3600000
SI_EXTENSION.waittime=1000
SI_EXTENSION.errorMissingTable=16945
SI_EXTENSION.systemPool=true       



How to ​Validate Connection Pool Creation
Go to Dashboard --> Operations --> System --> Troubleshooter --> Database Usage we will find connection pool.

Question

Can I use AD (Active Directory) Logins in Sterling B2B Integrator to communicate with SQL Server?

Answer


Active Directory logins cannot be used for Sterling B2B Integrator and SQL Server. The jdbc driver Sterling B2B Integrator uses does not allow using AD accounts. SQL Server accounts must be used.

http://www-01.ibm.com/support/docview.wss?uid=swg21683970

Tuesday, May 14, 2013

Installing Oracle 11g Enterprise Edition on Ubuntu 12.10



Required Software’s

VMware Player

Download and install VMware Player (Non-Commercial Software)

Ubuntu 12.10

Download and install Ubuntu 12.10 32 bit or 64 bit based on your Hardware.

XClock Problem

To setup $DISPLAY across the user try running this as root before you do "su - oracle" or other users.
$>xhost local:oracle
$>xhost local:sirishg

Oracle Installation Process

Follow the below link,
Note:
About link works for Ubuntu 32 Bit as well.

Note: Just ignored all above missing packages.





Note: Run the above commands as root user.

Post Installation Errors

Error Message while starting sqlplus
sqlplus: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory.
Reason for the Problem
libclntsh.so.11.1 was missing.
Solution
Below solution solve this problem as well.
Error message while starting Net Manager
oracle@ubuntu:~/app/oracle/product/11.2.0/dbhome_1/bin$ ./netca
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libnjni11.so: libclntsh.so.11.1: cannot open shared object file: No such file or directory
java.lang.UnsatisfiedLinkError: jniGetOracleHome
            at oracle.net.common.NetGetEnv.jniGetOracleHome(Native Method)
            at oracle.net.common.NetGetEnv.getOracleHome(Unknown Source)
            at oracle.net.ca.NetCALogger.getOracleHome(NetCALogger.java:230)
            at oracle.net.ca.NetCALogger.initOracleParameters(NetCALogger.java:215)
            at oracle.net.ca.NetCALogger.initLogger(NetCALogger.java:130)
            at oracle.net.ca.NetCA.main(NetCA.java:404)

Error: jniGetOracleHome
Oracle Net Services configuration failed.  The exit code is 1
Reason for the Problem
libclntsh.so.11.1 was missing.
Solution
Go to terminal and locate the missing file libclntsh.so.11.1 using below command,
Copy the above file to $ORACLE_HOME\lib (/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/)

Post Installation Configurations

Database Listener Configuration

If we need to configure database listener go to $ORACLE_HOME/lib and execute shell called netca

Create new Database

Exception while creating new Database

 

References

This is Important One

Solving compilation/link errors

Some issues should appear during installation.
If you have not created the symbolic links above, you will have to solve error lib//libagtsh.so: undefined reference to `nnfyboot' in make: rdbms/lib/dg4odbc] Error 1. For this, create the symbolic links and execute the commands:
export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1
cd $ORACLE_HOME/lib
ln -s libclient11.a libagtsh.a
$ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0


Now we will encounter many errors due to indirect library linking:
To solve error # libnnz11.so: could not read symbols: Invalid operation /sysman/lib/ins_emagent.mk, enter the command:
export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk

To solve error # nsglsn.c:(.text+0xc29): undefined reference to `ons_subscriber_close' /network/lib/ins_net_server.mk, enter the command:
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
To solve error # libocrutl11.so: undefined reference to `lfifcp' rdbms/lib/ins_rdbms.mk, enter the commands:
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk

You also need to execute the following commands to prevent from later errors:
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk

Starting up the database

Once your server have been restarted, your database may not start. To solve this issue, first check in /etc/oratab that it has the 'Y' flag, if not, set it.
sudo gedit /etc/oratab

And replace N by Y
orcl:/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1:Y

Manually starting up the database

Finally, to manually start Oracle, run these commands as oracle user
dbstart $ORACLE_HOME

Manually shutting down the database


dbshut $ORACLE_HOME

Tuesday, March 19, 2013

Read and Write Primary Document in ​ IBM B2B Sterling Integrator using MESA

​Read​
 ​and Write Primary Document while implementing
​a ​
Custom Service in
​​
IBM B2B Sterling Integrator
​ using MESA Studio​
. ​

public WorkFlowContext processData(WorkFlowContext wfc)
            throws WorkFlowException {
        Document outputDocument;
        String codeListOutputXML = null;
        OutputStream outputStream;
        BufferedOutputStream bos;
        String svcName = wfc.getServiceName();
        XLogger log = new XLogger("SI_Auto_DeployImpl", svcName);
        wfc.harnessRegister();
        wfc.setBasicStatus(WorkFlowContext.SUCCESS);
        try {
            CodeListDeployer codeListDeployer = new CodeListDeployer();
            // Read the input from PrimaryDocument
             Document srcDoc = wfc.getPrimaryDocument();   
             codeListOutputXML = codeListDeployer.readCodeListExcel(srcDoc.getInputStream());
             //Write output to new PrimaryDocument
             outputDocument = wfc.newDocument();
             outputStream = outputDocument.getOutputStream();
             bos = new BufferedOutputStream(outputStream);
             bos.write(codeListOutputXML.getBytes());
             wfc.setAdvancedStatus("CodeList Created Successfully!!");
             bos.close();
             wfc.putPrimaryDocument(outputDocument);
        } catch (Exception e) {
            handleError(log, wfc, SI_Auto_DeployMessages.Global_Exception,
                    new Object[] { SI_Auto_DeployImpl.class.getName() }, e);
        } finally {
            wfc.unregisterThread();
        }
        return wfc;
    }


Friday, March 15, 2013

File Compress Service in IBM B2B Sterling Integrator

<operation name="Compress"> 
 <participant name="CompressionService"/>
 <output message="outputMessage">
 <assign to="." from="*"/>
 <assign to="compression_action">Compress</assign>
 <assign to="compressed_filename" from="concat('FileName__','.gz')"/>
 <assign to="compression_level">1</assign> <!-- 1 Cost Less CPU cycles -->
 <assign to="file_name">string(OriginalFileName)</assign>
<assign to="doc_to_compress">primary_doc</assign>
</output>
 <input message="inputMessage">
 <assign to="." from="*"/>
</input>
 </operation>

Thursday, February 28, 2013

IBM B2B Sterling Integrator (SI) and Sterling File Gateway Installation Procedure

1. Install and Configure Sterling Integrator DB. Follow the below link to create and configure database,
         http://sirishg.blogspot.com/2012/12/sterling-integrator-oracle-user-and.html

2. Update License Set.
   Need to update the License Set because while installing SI it will take the out of box license file which needs to be overriden after post installation. Below command will update the Sterling Integrator license,
         InstallDirectory/bin$ AddLicenseSet.sh
        
3. Start SI and go to Operations --> System --> Licenses and do List All and check all carefully that we have got license for all
   required SI components for instance File Gateway Core
   Note: Check under InstallDirectory/properties/licensefiles for SI and SFG License.
 
4. Shutdown Sterling Integrator and proceed for Sterling File Gateway Installation
   InstallDirectory/bin$ InstallService.sh
   Note: We will find SFG under InstallDirectory/packages/filegateway_XXX.jar
 
5. After installation start SI we will be automatically pointed to filegateway URL.

​​Note: Only important factor here is before we trigger SFG installation we need to make sure we have valid licese for SFG, Otherwise your installation will be semi completed.

Telugu Devotional Song

Wednesday, February 27, 2013

Uninstall​ IBM Sterling File Gateway (SFG) from IBM B2B Sterling Integrator (SI) Installation

Below process explains how to remove IBM Sterling File Gateway (SFG) from IBM B2B Sterling Integrator(SI) Installations. Please do not consider this as an official procedure, This is a just a WORK AROUND to remove SFG from SI.


1. Shutdown all Sterling Integrator nodes and perform below tasks on all nodes.

2. Go to installFolder/container/Applications - Remove filegateway exploded folder and filegateway.war.

3. Go to installFolder/noapp/deploy - Remove filegateway exploded folder and filegateway.war.

4. Go to installFolder/jar/ - Remove filegateway folder.

5. Go to installFolder/properties/dynamicclasspath.cfg.in - Remove entries for FileGateway-ui.jar and filegateway.jar.

6. Run setupfiles.cmd/sh

7. Run deployer.cmd/sh

8. Bring up Sterling Integrator.

Note:​ Please note that above process will not clean database and it will leave few database tables related to SFG but they don't harm any of the SI processes. ​