Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Practical solutions for connections administrators


Published on

ICONUK version of the Practical Solutions for Connections Admin - mostly working with version 5 - more scripts and the rest of V5 will be added soon

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Practical solutions for connections administrators

  1. 1. Prac%cal Solu%ons for Connec%ons Administrators Christoph Stoe,ner & Sharon Bellamy
  2. 2. Who are we? Sharon Bellamy Mum of three, Star Wars & Disney fan – Mandalorian costumer & admin for iCosplay an;-­‐bullying campaign Administrator and Implementer Specializes in IBM Connec8ons, WebSphere and other collabora8on solu8ons Working with WAS based products since 2003 Lover of Linux Christoph StoeGner Bavarian, Dad of two, likes hiking Administrator and implementer Specialized in the infrastructure of IBM Connec8ons and IBM Domino Lover of Linux
  3. 3. Agenda Installing and Configuring Business as Usual • Autostart IBM WebSphere IBM HTTP Server • Performance Tuning DataSources • SeBng J2EE Security Roles • Configure JVM Log Files • Set JVM Heap Sizes • Check External ID against LDAP • AcNvate and DeacNvate Users • Synchronize User External IDs • Work with Policies • Adding Policies to personal or community libraries • Database reorganizaNon These scripts were wriGen for Connec8ons 4.5 – Most will work with V5. There are a few issues with the member scripts, we hope to have updated V5 scripts available very soon.
  4. 4. Agenda (cont..) Troubleshooting Documenting • ApplicaNon state • Database access • JVM Heap Sizes • JVM Log SeBngs • Used Ports within WebSphere • WebSphere Variables These scripts were wriGen for Connec8ons 4.5 – Most will work with V5. There are a few issues with the member scripts, we hope to have updated V5 scripts available very soon.
  5. 5. Disclaimer & Cau8on • With scripts • Shell / BASH / ZSH / KSH / SH, Jython / JACL • PowerShell / Batch / VB, SQL • You can... • Save a lot of Nme! • Change tons of stuff in seconds! • TIPS: • Create Backups • Install to a Test system (if you don’t have one – BUILD ONE) • Document your changes BACKUP before you make any changes The use of all scripts shown in these slides or downloaded from our repositories are WITHOUT WARRANTY and at your own risk!
  6. 6. Using the scripts • Using the Community Scripts • Download links at the end of this presenta8on • Extract zip to DMGR/bin • all files are in subfolder ibmcnx • rename ibmcnx_sample.properNes to ibmcnx.properNes* • edit ibmcnx.properNes* • configure loading the db2 jdbc driver* *(more details in resources secNon of the presentaNon and at h,p:// blog/documentaNon)
  7. 7. Installing & Configuring
  8. 8. Auto star8ng WebSphere Number of ways of star8ng WebSphere/Connec8ons Manually -­‐ takes Nme and requires much typing or copy and pasNng to the command line. AutomaNcally -­‐ via a service can ofen be the easiest way to start the servers (assuming the monitoring policy is set correctly). Using a script – run one command and start all the connecNons servers in one swoop.
  9. 9. Registering WAS services Registering a Linux service Registering WebSphere as a Linux service is straight forward. Use the wasservice script -­‐ which is held in the <WAS_HOME>/bin directory (default is /opt/IBM/WebSphere/AppServer/bin) Running the wasservice commands with the appropriate arguments (see example above for syntax), will create a service for the Deployment manager and Nodeagent servers. Adding the –stopArgs will allow you to add the wasadmin user and password here so it is not held in a file or is required when the service runs. Adding the –stopservers argument to the nodeagent server will stop the WebSphere servers on the node when the nodeagent is stopped. If you now list the contents of /etc/init.d the services can be seen.
  10. 10. Registering WAS services Registering a windows service Registering a WebSphere windows services are very similar to adding a Linux service. From the <WAS Profile>bin directory wasservice –add <service name> -­‐serverName <name of server> -­‐profilePath <path to server profile> To enable the server to restart automaNcally and to encode the user name and password, addiNonal parameters are required. -­‐encodeParams –restart true -­‐startType automa;c -­‐stopArgs “-­‐username wasadmin –password password ” And to the nodeagent add the addiNonal -­‐encodeParams –restart true -­‐startType automa;c -­‐stopArgs '-­‐username wasadmin –password password -­‐stopservers' Once the wasservice command has been run successfully, the new services will be visible under
  11. 11. Se^ng the monitoring policy Using the Web Console to set the monitoring policy Open each ApplicaNon Server Server Infrastructure – Java and Process Management – Monitoring Policy Change Node restart state to “RUNNING”. Ensure that the configuraNon is saved before quiBng the ISC. When the server is restarted the monitoring policy will be set. NOTE: Ensure that the monitoring policy is set to STOPPED when applying fix packs and ifixes.
  12. 12. Se^ng the monitoring policy Using a script to set the monitoring policy Run the config monitoring policy script ( ./ -­‐lang jython -­‐f A prompt is presented asking which state you would like to set stopped, running or previous. Once complete the script will synchronise the changes to the nodeagents. Again note that prior to applying fix packs or ifixes the monitoring policy should be set to STOPPED.
  13. 13. Start / Stop with a script Windows Create a service for the Dmgr, Nodeagent and ConnecNons servers. Create a windows batch file to stop and start the services. ***** Example of start servers batch file **** @echo off echo Star;ng DeploymentManager NET START "IBMWAS80Service -­‐ Dmgr" echo Star;ng NodeAgent NET START "IBMWAS80Service -­‐ Node" echo Star;ng server Cubey NET START "IBMWAS80Service – cubey" echo Servers started now exi;ng pause exit Use the NET STOP command for stopping the servers and NET START for starNng the servers. When run, the start / stop batch file starts or stops the servers in the order specified in the file.
  14. 14. Start / Stop with a script Linux If you prefer to manually start the ConnecNons servers under Linux by far the easiest way is to use the connctrl script (see download the scripts). Copy the connctrl script to the /etc directory and edit the variables, path to App server profiles, server names and if a non root user is required The script is then called from /etc /etc/ Usage: ConnCtrl {start|stop} {0|3|4} {nru} 0=just 1 IC server, 3=3 IC servers & 4=4IC servers nru = if you are using a user other than root i.e.. /etc/ stop 4 wasadmin or /etc/connctrl start 0 The script will start and stop the servers in a similar way to the windows batch files. Each server in turn is stopped (or started).
  15. 15. DEMO
  16. 16. Auto start HTTP Server Windows create a Service for IHS and Admin Service From <HTTP ROOT>bin h,pd -­‐k install -­‐n <name of service> -­‐f <path to config file> i.e.. h,pd -­‐k install -­‐n IBMHTTPAdmin -­‐f C:IBMHTTPServerconfadmin.conf Linux | AIX: Create Symbolic Link: ln -­‐s /opt/IBM/HTTPServer/bin/apachectl /etc/init.d/ ln -­‐s /opt/IBM/HTTPServer/bin/adminctl /etc/init.d/ Add Service chkconfig –add apachectl chkconfig –add adminctl
  17. 17. Performance Tuning • Performance Tuning IBM Connec8ons • Increase min-­‐ and max ConnecNons of Data Sources Performance Tuning Guide IBM ConnecNons 4.0 Performance Tuning Guide Addendum • Review these seBngs periodically with “Tivoli Performance Viewer” Performance Tuning Guide IBM ConnecNons 4.0 – h,p://www-­‐ Performance Tuning Guide Addendum -­‐ h,p://www-­‐ IBM_ConnecNons_4.5_Performance_Tuning_Guide_Addendum
  18. 18. Configure Data Sources 15 + Data Sources to Change (at least 100 clicks) Resources > JDBC >Data sources > <data source name> > AddiNonal Features > ConnecNonPools Change the maximum and minimum connecNons for each data source, save each of the changes, sync the nodes and restart the servers. This process can take about 30 minutes depending on the speed of the machines you are working on.
  19. 19. Configure Data Sources • Why not configure using a script: About 30 seconds to change all needed parameters of all Data Sources Set the data source properNes in the ibmcnx.properNes in the script directory – allowing edits and re-­‐running of the script.
  20. 20. HTTP mod_deflate • See my blog, the white paper or • Set mod_deflate in your IBM HTTP server config Edit the h,pd config and enable the deflate module. Add the deflate informaNon. Set the deflate compression level to the desired level. Add the informaNon to the virtual hosts. Restart the HTTP server. Loading my profile with deflate on saves approx. 75% of the page load Nme.
  21. 21. DEMO
  22. 22. Set J2EE Security Roles • First found on Klaus Bild’s Blog: hGp:// • Extended version with Group support and input opNon. • No need to edit the script. • Two versions: • Restricted Each applicaNon ask for credenNals, no data visible for anonymous users. • Unrestricted Default SeBngs, some content is visible to anonymous users. NOTE -­‐ ApplicaNons restart automaNcally, when you change J2EE roles.
  23. 23. Set J2EE Roles for special applica8ons As some applica8ons are configured different from environment to environment • Save 8me and use following scripts: • • • • • Deac8vate or ac8vate the applica8on for users and groups
  24. 24. DEMO
  25. 25. J2EE Security Roles -­‐ BACKUP CR and Fix pack Installa8ons pre IBM Connec8ons 4.0 oien reset J2EE roles back to the default se^ngs. Mainly this isn’t an issue anymore, BUT before running an update or making significant changes to the security seBngs, it is wise to back up the applicaNon security roles. Script writes text files as backup to a local folder. Roles of all installed WebSphere applicaNons (including IBM Docs, Forms Experience Builder, Kudos etc.), not just the connecNons applicaNons are backed up.
  26. 26. J2EE Security Roles -­‐ RESTORE Once you have a backup of the applicaNon security seBngs, it is possible to restore it if necessary. Advantages to using the script to restore. • You can edit the backup files to add or change users. • Backup of Dev or QA Systems can be restored in producNon (Admin Users and Groups must exist there). To run a restore use the script. The script will prompt for the directory where the security text files are stored. Once complete the roles are restored and visible in the ISC.
  27. 27. DEMO
  28. 28. Configure JVM Log Files • Default Se^ng for JVM Log Files (SystemOut.log & SystemErr.log): Size: 1 MB No historical Log Files Too small to troubleshoot errors • Reconfigure: Size: 20 – 40 MB 5-­‐10 historical Log Files • Configure via the ISC (Wasadmin console) Many clicks, Nme consuming Especially for large environments TroubleshooNng > Logs and trace > <server name> > JVM Logs
  29. 29. Configure JVM Log Files • Use a script to set the log size and history ( • The script prompts for • RolloverType – Size (to just set the size) or Both for size and history. • Maximum log size in mb. • Maximum number of backup files. The seBngs are saved to the WebSphere configuraNon and are picked up on the next server restart.
  30. 30. DEMO
  31. 31. Set JVM Heap Sizes • JVM (Java Virtual Machine) heap sizes should be set according to your environment. • By default the maximum JVM heap is set to 2506 MB for each Connec8ons server. The JVM heap size can be changed in the ISC. Each server must be changed individually. Server Types > WebSphere ApplicaNon Server > <server name> > Server Infrastructure > Java Process Management > Process DefiniNon > Java Virtual Machine Many clicks can be Nme consuming depending on the size of the environment. Set the iniNal heap size, maximum heap size, save and sync once the servers are restarted and the new seBngs are picked up.
  32. 32. Set JVM Heap Sizes • To use the script to set the JVM heap, use the script. The script shows actual size of iniNalHeapSize and maximumHeapSize for all JVM. Prompts for iniNalHeapSize and maximumHeapSize for all JVM. “Return” leaves actual seBng intact with no changes. Once the script is complete, the new seBngs are visible in the ISC and are picked up on the next server restart.
  33. 33. DEMO
  34. 34. Business as usual
  35. 35. Check External IDs against LDAP • Some8mes users can't logon to single Connec8ons Applica8ons • ExtIDs are out of sync, you see several error messages. • Script to check if LDAP UUIDs (GUID, SID) are equal to Connec8ons UUID • Script reads PROF_GUID from peopleDB through JDBC and Check UUID in ApplicaNons. Mail address of profile you want to check: sharon@cube-­‐ Profiles: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 AcNviNes: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 Blogs: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 CommuniNes: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 Dogear: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 Files: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 Forums: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 News, Search, Homepage: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 Wikis: 9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3 No need to run individual scripts per app to check the ID.
  36. 36. DEMO
  37. 37. Deac8vate and Ac8vate Users • Aier rename or some8mes without real reason Users get out of sync. They can open Profiles, but no other ApplicaNon. Or they have problems with a single App. • When DeacNvaNng and ReacNvaNng through the ProfilesService can be a resoluNon for this issue. This forces the applicaNons to resynchronise with the profiles applicaNon. you want to reac8vate a user you must provide UID and EMAIL (was deleted through Deac8vate) execfile("") ProfilesService.acNvateUserByUserId("9EE90251-­‐33DE-­‐4699-­‐A6F1-­‐BFDB381F7DD3", email="sharon@cube-­‐", loginId="sharon")
  38. 38. Use the Deact&Act script • Use the script -­‐ • Stores UID and Mail in memory and deacNvates and acNvates in one command. • It basically turns it off and on again – forcing a resync with the ConnecNons applicaNons and resolving the users *out of sync* issues. • Result = Happy Users J
  39. 39. Sync External IDs of all Users in all Applica8ons • SomeNmes LDAP IDs and UUID come out of sync • Switch LDAP System requires a synchronizaNon. • Running the MemberService scripts can resolve this. MemberService.syncAllMembersByExtId for each applicaNon. Can be Nme consuming, much copying and pasNng of commands and each one has to complete before the next one can be run.
  40. 40. Sync External IDs of all Users in all Applica8ons • Use the script -­‐ • The script resyncs ALL applicaNons for ALL users. Running the script syncs all users against all applicaNons, rather than having to run each applicaNon sync all members script separately. ResulNng in happy users.
  41. 41. DEMO
  42. 42. Working with files policies • Crea8ng or edi8ng policies is some8mes a pain • Library size must be provided as Long (e.g. 2 GB = 2147483648L) • Edit example: • FilesPolicyService.edit("2d93497d-­‐065a-­‐4022ae25-­‐ a4b52598d11a", "My Policy", 2147483648L). • Find UUID of Policy to edit, copy the size from calculator. • Use a script -­‐
  43. 43. DEMO
  44. 44. Add Policies to Libraries • You need UUID from Policy and Community • Community LisNng provides too much informaNon, hard to find UUID. • Example assign Policy • FilesLibraryService.assignPolicy("f0d01111-­‐9b21-­‐4dd8-­‐b8be-­‐8825631cb84b", "2d93497d-­‐065a-­‐4022ae25-­‐a4b52598d11a") • If you need to find the library informa8on it’s a pain: FilesLibraryService.browseCommunity("Ntle", "true", 1, 20)
  45. 45. Add Policies to Libraries • Or you can use a script ( Allows for searching across Personal or Community libraries. Select a community the policies will be listed and you may assign a new policy.
  46. 46. DEMO
  47. 47. Reparen8ng Communi8es • Big thanks to Klaus Bild Script allows the moving of a main community to a sub (assuming it has no subs). Or a sub to a main community. Wild card searches are also available.
  48. 48. Data base maintenance • Lots of DB maintenance that can be run: • Op8miza8on – Check the Connec8ons performance guide for DB tuning and op8miza8on. • ReOrg – Should be run regularly – scripts are available in the Connec8ons wizards folder (connec8ons.sql folder), can be set as a scheduled job. • Run Stats – Can be set through automa8c maintenance. • Backup the DBs on a regular basis – either as part of your regular back up rou8ne or an offline backup regularly. • Lots of informa8on on the site and on the DB2 info centres.
  49. 49. Troubleshoo8ng
  50. 50. Are all applica8ons running • To check If all IBM Connec8ons Applica8ons are running • Go to ISC – ApplicaNons – ApplicaNon Types – WebSphere Enterprise ApplicaNons. • Or use a script ( One bu,on press and the script checks all apps and lists them as stopped or started.
  51. 51. Can WAS connect to Data Sources • Go to ISC – Resources – JDBC – Data sources • Check all Data Sources and click Test connecNon. • Use a script (/check/ The script checks connecNon to the DB and tests the data Sources. Then lists successful, failures and databases not installed.
  52. 52. DEMO
  53. 53. Documenta8on
  54. 54. Connec8ons Documenta8on • Everyone knows you should document your install right? • Never fear – there is a script to do most of the hard work for you.
  55. 55. Documenta8on scripts • Use the scripts 1. Show JVM Heap Sizes (ibmcnx/doc/ 2. Show JVM Se^ngs (ibmcnx/doc/JVMSe^ 3. Show SystemOut/Err Log Sizes (ibmcnx/doc/ 4. Show all used ports (ibmcnx/doc/ 5. Show all used variables (ibmcnx/doc/ 6. Show all j2ee roles of inst. applica8ons (ibmcnx/doc/ 7. Create a file with all documenta8on (ibmcnx/doc/ – this isn’t implemented in the menu as yet – call with|bat -­‐lang jython -­‐f ibmcnx/doc/Documenta>
  56. 56. DEMO
  57. 57. Documenta8on Demo
  58. 58. Resources
  59. 59. Download the scripts • If you wish to use any of the scripts described in this presentaNon, they are available for download. • Please be aware that they are community created scripts and are available without warranty. They should be used at your own risk. • Git Hub -­‐ h,ps:// • OpenNTF Project since – AdministraNon Scripts for WebSphere -­‐ h,p:// %20WebSphere/summary • ConContrl – Linux ConnecNons start / stop script from Tim Clark and Sharon Bellamy h,ps://
  60. 60. Install the scripts • hGp://­‐the-­‐scripts/ • Create links to extracted scripts directory • Linux cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin ln -­‐s /opt/IBM/ibmcnx2/ibmcnx ./ • Windows mklink /d <link> <target> mklink /d D:IBMWebSphereAppServerprofilesDmgr01binibmcnx D:IBMibmcnx2ibmcnx • Edit the ibmcnx.proper8es At the moment there are 3 parts: Generic, Database and Tuning. Generic: You should change the values within Generic of all j2ee.* parameters and put your administraNon users and groups in it. This part is used to set the J2EE Security Roles and you save typing in the values each Nme. Database: The User scripts (checking ExId, DeacNvate) are using the db* parameters and you can put the User, password, host and so on. Tuning: These parameters are used for DataSource performance tuning and are set to the values provided in the IBM ConnecNons Performance Tuning Guide. That’s a good starNng point, but you should check them in your environment.
  61. 61. Install the scripts (cont.) • Addi8onal tasks to load JDBC Drivers within Jython Linux Create a WAS_USER_SCRIPT (/opt/IBM/JDBC is my path to the database drivers): export WAS_EXT_DIRS=$WAS_EXT_DIRS:/opt/IBM/JDBC Now you have to set an environment variable each Nme when you want to start the scripts: export WAS_USER_SCRIPT=/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/ibmcnx/ Windows There is an issue loading the JDBC Driver path through WAS_USER_SCRIPT on Windows. To resolve this edit setupCmdLine.bat in dmgr/bin and add the path to WAS_EXT_DIRS i.e. SET WAS_EXT_DIRS=%JAVA_HOME%lib;%WAS_HOME%classes;%WAS_HOME%lib ……C:IBMSQLLIBjava • Load the script menu Linux ./ -­‐lang jython -­‐username wasadmin –password password -­‐f ibmcnx/menu/ Windows wsadmin.bat -­‐lang jython -­‐username wasadmin –password password -­‐f
  62. 62. Useful links / Ar8cles • IBM ConnecNons Performance Tuning – relevant for Version 4 and 4.5 (see Addendum for 4.5 addiNons and changes) -­‐ h,p://www-­‐ IBM_ConnecNons_4.0_Performance_Tuning_Guide • IBM ConnecNons Performance Tuning Addendum – relevant for 4.5 changes -­‐ h,p://www-­‐ IBM_ConnecNons_4.5_Performance_Tuning_Guide_Addendum • Auto start DB2 on RHEL6 systems -­‐ h,ps://www-­‐ • Tuning WebSphere ApplicaNon Server V7 and V8 for performance -­‐ h,p:// 0909_blythe.html • DB2 Info centre -­‐ h,p:// • IBM ConnecNons wiki -­‐ h,p://www-­‐ • IBM WebSphere 8 info centre -­‐ h,p://
  63. 63. Skype Chats • There are a number of community skype chats If you wish to be added to any of these chats either ping myself or Christoph. Sharon – dilfechnical Christoph -­‐ christophstoe,ner
  64. 64. Giving Credit • IBM® Notes® • IBM® Domino® • IBM® ConnecNons • IBM® WebSphere® • IBM® DB2 • IBM® AIX® • Tivoli® • Linux® • Java® • Microsof® Windows® • Red Hat® Linux® • Twi,er® • Skype® • This presentaNon menNons the following Copyrights and Trademarks.