Showing posts with label IBM Sterling File Gateway. Show all posts
Showing posts with label IBM Sterling File Gateway. Show all posts

Friday, August 30, 2019

Update sharedLocation in InstallationManager (IBM Sterling B2B Integrator)

First of all the following value has to be unique to each install of Sterling Integrator. If you accidentally used shared location for cluster installation your second node installation not going to work. So here is how we can fix this.

1. Go to user home and move $USERHOME$/IBM/IBMSHARED to new local location.

2. Update the reference in /home/user/var/ibm/InstallationManager/installRegistry.xml

         

That's it. This will fix First node IBMSHARED location and we can proceed with second node installation.

How to verify?
1. Go to InstallManager tools
    cd /InstallationManager/IM_Linux/tools 
2. ./imcl listInstalledPackages -verbose

Validate the output something like below,

[Shared]
Shared resources directory: /opt/ibm/IBMIMShared

[Package group]
Name: Sterling Integrator
Installation directory: /opt/ibm/sfg
Translations:
Architecture: 64-bit

[Package]
Name: IBM Sterling B2B Integrator (com.ibm.sterling.integrator.install.offering)
Version: 5.2.6.1 (5.2.6001.20151220_1540)
Repository: /opt/ibm/media/b2birepo
Features:
    IBM Sterling File Gateway (filegateway.feature)
Fixes:
    None
Rollback versions:
    None

Monday, July 1, 2019

PGP - Generate Import Export PGP Keys

Generate PGP Keys

gpg --gen-key

Enter Key details, Email, Expiration etc.,

Export Secret Key

gpg --export-secret-key -a MY_PGP_KEY >> /tmp/MY_PGP_KEY.key

Export Public Key

gpg --export -a MY_PGP_KEY >> /tmp/MY_PGP_KEY.asc

Import Secret Key

gpg --import /tmp/MY_PGP_KEY.key

Import Public Key

gpg --import /tmp/MY_PGP_KEY.asc

Update Key Trust Trust after importing the Key

gpg --edit-key
$trust
$5
$save

Friday, November 2, 2018

Sterling Integrator User, Workflow Queries

Active Worksflows in Sterling Integrator

select DISTINCT NAME , WC2.WORKFLOW_ID, sysdate - START_T AS TIMEDIFF
From WORKFLOW_CONTEXT WC,
(
SELECT MAX(STEP_ID) STEP_ID , MIN(START_TIME) START_T, WORKFLOW_ID
FROM WORKFLOW_CONTEXT
GROUP BY WORKFLOW_ID
) WC2,
WFD
WHERE WC.WORKFLOW_ID = WC2.WORKFLOW_ID
AND WC.STEP_ID = WC2.STEP_ID
AND WC.NEXT_AI_ID != -1
AND WC.WFD_ID = WFD.WFD_ID
AND WC.WFD_VERSION = WFD.WFD_VERSION
AND BASIC_STATUS = 0

Sterling Integrator User & User Associated Groups List 

select YFS_USER.LOGINID, YFS_USER_GROUP.USERGROUP_NAME from YFS_USER, YFS_USER_GROUP, YFS_USER_GROUP_LIST
where YFS_USER.USER_KEY=YFS_USER_GROUP_LIST.USER_KEY
and YFS_USER_GROUP.USERGROUP_KEY=YFS_USER_GROUP_LIST.USERGROUP_KEY

Tuesday, June 5, 2018

SSHKeyGrabber in Sterling Integrator not working

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

Sometimes SSHKeyGrabber don't work when we trying to extract Known Host Key from Sterling Integrator UI. The work around for this is disable StrictHostKeyChecking and download the Key from Linux/Windows and Check in the key to Sterling Integrator.

$ssh -o StrictHostKeyChecking=no user@sftp.host.com -p 22

Above command will save host key to known_hosts file located .~/.ssh/known_hosts

Note: Remove excess content from host key and just keep the key from ssh-rsa followed the key. 

Tuesday, June 28, 2016

Install 3rdParty JAR on IBM B2B Sterling Integrator

If we want to install external JARs (3rdParty JARs) on Sterling Integrator here are the steps,

1. Stop B2BI Cluster (All Nodes) by running hardStop.sh/cmd.
2. install3rdParty.sh -j
         -j = JAR
         -l = Library File
3. Run setupfile.sh
4. Repeat Step 2 and 3 on all Nodes.
5. Restart B2BI Cluster.

Validation Procedure:

If installation was successful then you will see an entry for your new JAR file in dynamicclasspath.cfg file.  

Sunday, May 15, 2016

IBM Sterling B2B Integrator Map Editor Rules Hierarchy

Here is how IBM Sterling B2B Integrator map editor translator controller parse and executes the Rules.

Pre-Session (Variable Declarations & Hard Coded Values)
Root On Begin
   Root Exedend Rules
Record On Begin
Standard Rule & Exedend Rule

Record On End
Root On Begin
Post-Session (Executes before end of map)

Saturday, February 13, 2016

Calling B2BI WebService from SOAP UI

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mesa="http://www.sterlingcommerce.com/mesa"
   soapenv:Header/
   soapenv:Body
      mesa:DEMO_WEB_SERVICE xmlns:mesa="http://www.sterlingcommerce.com/mesa"
Payload goes here....
      /mesa:DEMO_WEB_SERVICE
   /soapenv:Body

/soapenv:Envelope



Need to add namespace xmlns:mesa="http://www.sterlingcommerce.com/mesa under soapenv:Body.

Wednesday, January 6, 2016

Setting up VisualVM from Sterling Integrator

1. Download  VisualVM 
2. Find the value of the property called ACTIVEMQ_JMX_PORT from sandbox.cfg.

3. Add Remote Host First and under Remote Host add Add JMX Connection. 
    <SI HOST Name>:<ACTIVEMQ_JMX_PORT>
    No need of providing user credentials and Save the connection. 


Monday, December 21, 2015

Enable External Purge in Sterling Integrator

Starting an External Purge

Procedure

  1. If you have a cluster installation, make sure that you are not running the external purge on another node of the cluster. If you are running the external purge on more than one node, it will cause database locks. For more information, see Monitoring an External Purge.
    Important: It is the customer's responsibility to keep exactly one of these external purge processes running in the cluster. If you need to shut down the hardware that is running the external purge, you must run the external purge on a different node.
  2. Disable the default Purge service. Click Deployment Schedules, search for PurgeService, and then clear the Enabled checkbox for PurgeService.
    Note: If you have customized the Schedule_PurgeService business process, you need to add your customized code to the new Schedule_PurgeService business process. The new Schedule_PurgeService business process includes a warning message about running the external purge while the scheduled new purge is enabled.
  3. Turn off the "Important Schedules are Disabled" email notifications by adding the following line to the customer_overrides.properties file. This removes the Purge Service SQL query for the schedule.
    resourceMonitor.ScheduleMonitor.propertyValue.1=SELECT STATUS, SERVICENAME FROMSCHEDULE WHERE SERVICENAME IN ('BackupService','IndexBusinessProcessService','AssociateBPsToDocs'
    ,'BPRecovery','BPLinkagePurgeService')
  4. Do the following:
    • In Windows, do one of the following:
      • Run the command startExternalPurgeWindowsService.cmd from the INSTALL_DIR\bin directory.
      • Run the Windows service. Click Control Panel > Administrative Tools > Services, right-click IBM Sterling B2B Integrator External Purge at BASE_PORT, and click Start.
    • In UNIX, run the command control_extpurge.sh start from the INSTALL_DIR/bin directory.
    • In iSeries, run the command
      SBMJOB CMD (QSH CMD('cd INSTALL_DIR/bin; ./ExternalPurgeConsole.sh -clearlocks > INSTALL_DIR/logs/extpurge.log')) JOB(EXTPURGE)

Wednesday, November 25, 2015

Remove SFG Partner Profile (Hard Delete if SFG removal fails)

There was bug in SFG (old versions) where it leaves some orphan entries in DB when you try to remove the trading partner from SFG UI. To solve the problem here are steps to do hard delete of partner profile.

Attempt to delete from SFG in regular way and then remove from Dashboard --> Trading Partner (All Contracts, Document Exchange, Profile, Routing Channels, Mailbox Virtual Roots if any etc.)

Make sure the following table should not return any entry for Trading Partner, If it returns then remove the entry manually...

This example Partner Name is : EDI

select 'YFS_USER' from YFS_USER where UPPER(USERNAME) like '%EDI%'  UNION
select 'YFS_ORGANIZATION' from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) like '%EDI%'  UNION
select 'MBX_ACTION'  from MBX_ACTION where UPPER(USER_ID) like '%EDI%'  UNION
select 'MBX_MAILBOX'  from MBX_MAILBOX where UPPER(PATH) like '%EDI%'  UNION
select 'SCI_CONTRACT' from SCI_CONTRACT where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_DOC_EXCHANGE' from SCI_DOC_EXCHANGE where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_ENTITY'  from SCI_ENTITY where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_PACKAGING'  from SCI_PACKAGING where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_PROFILE' from SCI_PROFILE where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_TRANSPORT' from SCI_TRANSPORT where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_CODE_USR_XREF'  from SCI_CODE_USR_XREF where UPPER(USER_ID) = 'EDI%';

select * from YFS_USER where UPPER(USERNAME) = 'EDI';
select * from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) = 'EDI';
select * from MBX_ACTION where UPPER(USER_ID) = 'EDI';
select * from MBX_MAILBOX where UPPER(PATH) = 'EDI';
select * from SCI_CONTRACT where UPPER(OBJECT_NAME) ='EDI';
select * from SCI_DOC_EXCHANGE where UPPER(OBJECT_NAME) = 'EDI';
select *  from SCI_ENTITY where UPPER(OBJECT_NAME) = 'EDI'; 
select *  from SCI_PACKAGING where UPPER(OBJECT_NAME) = 'EDI';
select * from SCI_PROFILE where UPPER(OBJECT_NAME) = 'EDI';
select * from SCI_TRANSPORT where UPPER(OBJECT_NAME) = 'EDI';
select * from SCI_CODE_USR_XREF where UPPER(USER_ID) = 'EDI';

--finally delete (be careful) --
DELETE from YFS_USER where UPPER(USERNAME) = 'EDI';
DELETE from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) = 'EDI';

Tuesday, August 11, 2015

Encoding a Payload in Sterling Integrator using Java Task

import java.io.InputStream;
import java.lang.StringBuilder;
import com.sterlingcommerce.woodstock.workflow.Document;
import com.sterlingcommerce.woodstock.util.Base64;

Document doc = wfc.getPrimaryDocument();
InputStream in = doc.getInputStream();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < in.available(); i++) {
   sb.append(in.read());
}
byte data[] = sb.toString().getBytes();
byte newdata[] = Base64.encode(data);
doc.setBody(new String( ""+ new String(newdata)+"").getBytes());
return new String(sb.toString());

Wednesday, January 7, 2015

Sterling Integrator Purge All Tables

1.  EDI_COMPLIANCE_RPT
2.  EDI_DOCUMENT_STATE
3.  WF_INST_S
4.  WORKFLOW_CONTEXT
5.  WORKFLOW_LIFESPAN
6.  WORKFLOW_DATA
7.  EDIINTDOC
8.  MSGMDNDUP
9.  MSGMDNCORRELATION
10. WEBX_MINED_DATA
11. WF_INACTIVE
12. GENERIC_ACK
13. CORRELATION_SET
14. ACT_SESSION
15. ACT_AUTHENTICATE
16. ACT_AUTHORIZE
17. ACT_XFER
18. ACT_NON_XFER
19. DATA_FLOW
20. DMI_ROUTE
21. DMI_ROUTE_FACT
22. MBX_MESSAGE
23. TRANS_DATA

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. 


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.

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. ​

Tuesday, December 11, 2012

Remove Custom Service from Sterling Integrator

If we need to uninstall a custom service in IBM B2B Sterling Integrator follow the blow steps. Please note you have to clean from File system and from database as well.

File System Cleanup


C:\Sirish\SterlingIntegrator\install\installed_data\Your Custom Service Name directory.

C:\Sirish\SterlingIntegrator\install\jar\
Your Custom Service Name directory.

C:\Sirish\SterlingIntegrator\install\properties\lang\en\Your Custom Service Name_en.properties

C:\Sirish\SterlingIntegrator\install\properties\services\Your Custom Service Name.xml


Database Cleanup


select * from service_def_guid where current_id = 461;

select * from service_def_parms where def_id = 461

select * from service_def where def_lookup_name like '%com.mypackage%';  

Note: 

Please check def_look_up name in service instance page under Development --> Services --> Installation/Setup  

delete from service_def_guid where current_id = 461;

delete from service_def where def_id = 461;

delete from service_def_parms where def_id = 461;

commit;

Note: 461 is my CS unique Id in a database.