Thursday, April 18, 2024

Disk usage on windows

 On windows it is bit cumbersome to find the space/storage usage of each folder. To get the space used by each folder, download the disk usage utility from here. Example command that can be use to find the usage:

du.exe" -l 2 c:\Users\<user name>\AppData\Local\Docker

Docker Desktop taking up storage space on windows, Configuring log rotation

Docker desktop by default is not configured with log rotation. Because of this you will run out of disk space. This document will help with debugging, cleanup and configuring log rotation. Logs contain both docker daemon logs and container logs. Limiting the size and the number of log files is part of the log rotation.

To figure out what your logging driver is, run the below:

$ docker info --format '{{.LoggingDriver}}'

On windows, logs can be found typically in:

daemon logs -  %LOCALAPPDATA%\Docker\log\vm\dockerd.log
containerd logs - %LOCALAPPDATA%\Docker\log\vm\containerd.log

For configuring docker daemon logs

Find (or create) the below file:

OS and configuration File location
Linux, regular setup /etc/docker/daemon.json
Linux, rootless mode ~/.config/docker/daemon.json
Windows C:\ProgramData\docker\config\daemon.json

Contents of daemon.json:

{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

Restart docker desktop from the system tray order the desktop itself.

For configuring docker container logs

You can set the logging driver for a specific container by using the --log-driver flag to docker container create or docker run:

docker run \
      --log-driver json-file --log-opt max-size=10m \
      alpine echo hello world





Monday, June 5, 2023

AWS CodeWhisperer - CDK Development

 

Setup AWS CodeWhisperer

Using Visual Studio Code for Typescript

Install AWS Toolkit



Select a connection and Enter login and password









Proceed to create AWS builder id, receive validation




code and successfully connect with code whisperer service.


Using AWS Cloud9



Create CDK Project – Typescript Language

Create a folder aws-cdk-demo and cd into it.

cdk init sample-app --language typescript



Create CloudFormation Stacks

Create SQS Stack

/* Create a sqs queue and add a subscription to a topic */



Create S3 Bucket Stack

/* create an s3 bucket and add resource policy to it */



Keep hitting enter and each import is place appropriately by the code whisperer



After writing one export class statement, below is what is put in by code whisperer



 

References

·        https://aws.amazon.com/codewhisperer/

·        https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/codewhisperer.html

 

 

Wednesday, June 27, 2012

Hibernate Most Commonly Occuring Issues

1. With Oracle and Eclipse (Indigo for example), i have installed hibernate plugins from jobss and tried to reverse engineer POJOs from Oracle DB. However hibernate configuration kept giving a message that "Fetching Children of Database..." on the lower right corner but was returning nothing. After a couple of hours of debugging, i figured that "hibernate.connection.username" in case of Oracle must be provided in UPPERCASE only, mixed or lower case will not work.


Tuesday, May 29, 2012

Forms 11g Webutil configuration

I did the following setup on linux,  with some minor changes mostly path related items the steps below should work for windows server environment as well. Before making change take good backups of your environment.

Steps below are for Forms services 11gR2, steps may vary slightly for 11gR1. Please consult with oracle documentation for detailed steps.


1.       Run create_webutil_db.sql
a.       CREATE USER webutil IDENTIFIED BY webutil
b.      Grant connect, resource to webutil
c.       Connect webutil/webutil
d.      @[ORACLE_HOME]/forms/create_webutil_db.sql
e.      Create public synonym webutil_db for webutil.webutil_db;
f.        Connect sys as sysdba
g.       Grant execute on webutil_db to public;
a.       Unzip the jacob download and place jacob.jar in the ORACLE_HOME/forms/java directory
b.      backup sign_webuitl.bat script in [ORACLE_INSTANCE]/bin/sign_webutil.sh
c.       search for <Your KEYSTORE password> and replace it with welcome1 (or something like this)
d.      search for <Your private key password> and replace it with welcome1 (or something like this)
e.      Save the script and use it to sign jacob.jar as below
f.        [ORACLE_INSTANCE]/bin/sign_webutil.sh [ORACLE_HOME]/forms/java/jacob.jar
3.       Place jacob.dll in the ORACLE_HOME/forms/webutil/ directory
4.       Jacob.dll in r2 – file names must be verified against webutil.cfg file
a.       Place jacob-1.14.3-x86.dll in the ORACLE_HOME/forms/webutil/win32 directory.
b.      Place jacob-1.14.3-x64.dll in the ORACLE_HOME/forms/webutil/win64 directory
5.       Using weblogic EM console, Add ORACLE_HOME/forms/java/frmall.jar to the CLASSPATH in the default.env
6.       Update formsweb.cfg webutil section with the following if not already done:
a.       Add frmwebutil.jar and jacob.jar to the WebutilArchive parameter in the [webutil] configuration section. For some versions of 11g, this is already added.
b.       Specify webutil_demo as the form to be run in the [webutil] configuration section
7.       Download webutil demo from link below, extract and put the contents in a folder http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/196249.zip
8.       Copy ffisamp.dll to the <ORACLE_HOME>\forms\webutil directory.
9.       Open your webutil.cfg file and add the following line install.syslib.0.user.1=ffisamp.dll|40960|1.0|true
10.   If not already done do the following in webutil.cfg
a.       transfer.appsrv.workAreaRoot=c:\temp
b.      transfer.appsrv.accessControl=TRUE
c.       transfer.database.enabled=TRUE
d.      transfer.appsrv.enabled=TRUE
11.   Add the folder in FORMS_PATH in enterprise manager
12.   Replace db and run the following command:
a.       frmcmp.sh module=webutil_demo.fmb module_type=form userid=webutil/webutil@<db> compile_all=yes
b.      FORMS_PATH variable and make sure webutil.pll folder is available in the path or run the above command from command shell in the folder where webutil.pll is available
13.   Restart opmnctl and wls_forms weblogic instance
14.   Run the webutil demo - http://server:port/forms/frmservlet?form=wu_fileupdown_demo&config=webutil

please use reference document with Metalink DOC ID - 1093985.1


Forms 11g DB connection

Add your DB connectivity information in

<oracle home of wls forms and reports>/FrmsInst1/config/tnsnames.ora

After adding it here, your users can now connect using their forms related username, password and DB tnsname

Monday, May 28, 2012

Oracle Forms 11gR2 installation instructions

Make sure there are no spaces in $PATH variable, this is not a problem with unix/linux generally.

Install openmotif and openmotif22 (prerequisites for Reports Server)
yum install openmotif
yum install openmotif22 (update yum repository as described in http://public-yum.oracle.com)
 
install jdk 1.6 update 30

download weblogic 10.3.5 + coherence + oepe package
install at /formsdisk/Oracle/Middleware

download ofm_frmrpts_linux_11 linux package from oracle and extract
cd Disk1
runInstall -ignoreSysPrereqs
skip software updates
select install only - do not configure
select Oracle middleware home -  /formsdisk/Oracle/Middleware
Name Oracle Home Directory - FrmsHome
Click install

cd /formsdisk/Oracle/Middleware/Oracle_FRHome1/
config.sh
select "configure for deployment"
select and change name of oracle instance location and oracle instance name if needed
provide weblogic username/password - remember this one or write it down somewhere
I select all options available in the configure components screen
select auto options configuration
select do not use proxy configuration setting
uncheck use application identity store
click configure butting

Address any issues, I had the following issue and fixed it:
"Invalid JMX Port"
/etc/hosts file was not configured with ipaddress correctly as i had DHCP in one case and wireless connection in another and had to change this. If you have a static IP this may not be an issue

In case java update 25 or whatever in your formweb.cfg file is required below test url will automatically download it for you on IE browser, firefox can later load the same thing automatically as well.  Vice-versa needs manual configuration in firefox

Test installation:

http://<server_hostname>:8889/forms/frmservlet?form=test.fmx&userid=&o therparams=useSDI=yes&lookAndFeel=oracle&colorScheme=blue