wsadmin command gives warning *sys-package-mgr*: can't write cache file - websphere

When I run the jython script using wsadmin command on WAS 8.5 ND it shows me below messages:
[wsadmin] *sys-package-mgr*: processing modified jar, '/opt/IBM/WebSphere/AppServer/java_1.7_64/lib/ibmorbtools.jar'
[wsadmin] *sys-package-mgr*: can't write cache file for '/opt/IBM/WebSphere/AppServer/java_1.7_64/lib/ibmorbtools.jar'
I have provided the 777 permission to the specified directory. How can I remove these messages.

This warnings usually look like this:
...
*sys-package-mgr*: processing modified jar, '/usr/IBM/WebSphere/AppServer/plugins/org.eclipse.core.runtime.compatibility.jar'
*sys-package-mgr*: can't write cache file for '/usr/IBM/WebSphere/AppServer/plugins/org.eclipse.core.runtime.compatibility.jar'
*sys-package-mgr*: can't write index file
This are confusing. Source of errors is jython underlying wsadmin. Jython is scanning WebSphere jars, trying to create a pkc file for an each scanned jar and finally is creating or updating the package.idx file. Warnings are raised as user running jython/wsadmin has no proper file permissions.
User running wsadmin must have read and write permission for jython cache folder and all contained files. Default cache folder is temp/cachedir within WAS profile. For example my "Deployment manager" named Dmgr01 has jython cache folder within:
${WAS_INSTALL_ROOT}/profiles/Dgmr01/temp/cachedir
Once one proper rights are given "can't write cache file for" and "can't write index file" warnings will be gone. And "processing modified jar" will be raised whenever jars are updated or temp folder cleaned which is rare event for WAS installation.

If wlst works before and doesn't work now, this error means the temp directory "/tmp/wlstTemporacle/packages" are corrupted.
If you go into "/tmp/wlstTemporacle/packages", you will lots of *.pkc files are duplicated with a "$1" in it's name. In your case, the file "ibmorbtools.pkc" will have a crapy sibling "ibmorbtools$1.pkc" there. This is not correct and it means this directory is corrupted.
The solution is to totally remove directory "/tmp/wlstTemporacle/packages", or even entire "/tmp/wlstTemporacle". And then rerun wlst.sh, you will see a new directory structure is created and all *.pkc are copied over correctly. Your above error message will go away.
Notes: In my case, this is oracle WebLogic 10.x.x.x running on Linux. Its WLST is Jython apps. The temp dir for java is point to "/tmp/wlstTemporacle". If your case is different, the easiest way to determine where is temp directory for your environment is to do a full search for file "ibmorbtools.pkc". It's name come from your error message which is "ibmorbtools.jar", just postfix are different.
Hopefully, this will help!
Yubo

Related

Writer initialization failed.Error opening output file.The system cannot find the path specified

In informatica pc I got an error like Writer initialization failed.Error opening output file.The system cannot find the path specified.
Even I checked the directories and file names but what exactly confused.
It's exactly as it says: the Writer failed to initialize, as it was not able to locate the path and file specified.
Note that PowerCenter Workflows and Mappings are executed on the Server. So while you develop on your local laptop (for example) and place a file in C:\Temp folder, and you are able to see the file, once you run the process, it will be executed on the Server. And the Server will not refer your laptop. It will look for C:\Temp location on its local disk. And if that's a unix box, there won't even be a C: path!
Hence, the process will fail with exactly the message you've seen: initialization failed, error opening output file. You need to place the file in the location accessible by Server.
In case of Writer, you name target location where the file will be created - make sure the user used by PowerCenter does have the write access.

AWS Codedeploy access a file within BeforeInstall script

I'm bundling a file to be accessed by BeforeInstall shell script file. But shell script file cannot locate the file. I tried bundling in the same folder as script file. Still not working. It gives No such file or directory
bundle
scripts
beforeInstall.sh
file.properties
May I know if this is possible...
The files are not placed in the locations you have specified yet during the BeforeInstall step. At that point the zip has only been downloaded to a default location, so the file path in your script probably doesn't exist yet.
What do you want your script to do? Would running it during the AfterInstall step work?

Kafka installation - classpath is empty

I try to install kafka on my windows(8), and it's not work.
I download kafka and extract it on c:\kafka after it i change the server.properties and zookeeper.properties.
I set in those file the logs path.
I even try to download an tun zookeper outside the kafka install but the zookeeper runing and the kafka not.
the Error that i get when i try to run this command is:
bin\windows\zookeeper-server-start.bat .config\zookeeper.properties
and this is the result:
Classpath is empty. Please build the project first e.g. by running 'gradlew jarAll'
The solutions is to Download the binary jar file.
go to config\server.properties and config\zookeeper.properties and change the folder. the new folder need to be write with / and not .
and after it you need to got the main folder and run the command:
bin\windows\zookeeper-server-start.bat config\zookeeper.properties
without the . before "config\zookeeper.properties"
I have provided the answer for the similar error here, check this out.
https://i-am-jabi.medium.com/fixing-classpath-is-empty-69288c1509a2
Here are the steps to resolve the issue:
Open kafka-run-class.bat file. You will find this in bin\windows folder of your confluent Kafka.
Search for “rem Classpath addition for core” in kafka-run-class.bat file. When you find it, it looks like below.
Now lets add the below snippet above the “rem Classpath addition for core” line in kafka-run-class.bat file.
rem classpath addition for LSB style path
if exist %BASE_DIR%\share\java\kafka\* (
call:concat %BASE_DIR%\share\java\kafka\*
)
After adding the above snippet, your file will look like this.
Now, when you run the bat files under windows folder, they will run fine without any issues. Here is the zookeeper start log after fixing the classpath error.

Jython creates file in c:\windows\system32\drivers\etc failed

In my RF scripts, I need to modify the hosts file under c:\windows\system32\drivers\etc to finish my test job. But the scripts fail with ERROR 20047, I tried to create file in another folder, it was OK. I get the conclusion that it only doesn't work in folder etc, it seems that I do have the permission to create/modify hosts file. I modified the owner of folder etc and granted all permission to the current user and tried again. It still does not work.
BTW: The RF scripts run with jython. I find that It works while I use python to create/modify hosts in folder etc.
Could anyone help me ?

run.as option does not work other than Nifi user

I want to run my NiFi application using ec2-user rather than default nifi user. I changed run.as=ec2-user in bootstrap.conf but it did not worked .It is not allowing me to start Nifi application getting following error while staring nifi service.
./nifi.sh start
nifi.sh: JAVA_HOME not set; results may vary
Java home:
NiFi home: /opt/nifi/current
Bootstrap Config File: /opt/nifi/current/conf/bootstrap.conf
User Runnug Nifi Application : sudo -u ec2-user
Error: Could not find or load main class org.apache.nifi.bootstrap.RunNiFi
Any pointer to this issue?
This is most likely a file permission problem, which is not covered by installing the service with nifi.sh install. A summary of the required permissions includes:
Read access to the entire distribution in the NIFI_HOME directory
Write access to the NIFI_HOME directory itself - NiFi will create a number of directories and files at runtime including logs, work, state, and various repositories.
Write access to the bin directory
Write access to the conf directory
Write access to the lib directory, and to all of the files in the lib directory
It is certainly possible to narrow the permissions by creating the working directories manually, and by adjusting NiFi's settings to rearrange the directory layout. But the permissions above should get you started.

Resources