2009-12-12

broken java networking

If your Java networking is broken and any traffic always
results in a "java.net.SocketException: Network is unreachable" error, then here comes a quick fix:

  1. edit /etc/sysctl.d/bindv6only.conf
  2. change value net.ipv6.bindv6only=1 into 0
  3. invoke-rc.d procps restart

Volume too low with VIA

When your Linux box has a VIA motherboard and the sound is too low you might want to configure Via DXS sliders in alsamixer. Debian people read bug #532613.

2009-12-01

FileNet GUID Regular Expression

That's the regexp to match a GUID:
"^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$"

2009-11-23

WSVR0028I: The product has expired

This explains how to get rid of the WSVR0028I error.
Solution is about the /properties/was.license file, which can be copied among different systems and always return the following MD5 checksum: c60f4e18d530bf4e7c8315e23fd1dbf9.

Restoring a Snapshot Fails with Insufficient Permissions Error

You can find some very useful hints here.

2009-11-07

Quick encoding mov to avi using mencoder

mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -lameopts vbr=3 file.mov

How to setup BOINC on your Debian box

I've found this troubleshooting page very useful.

If unable to connect via Boinc Manager, remember to add your ip and pwd (the one written into /var/lib/boinc-client/gui_rpc_auth.cfg) in Advanced > Select computer.

2009-10-23

no confirm on windows ftp client

If you don't want to be bothered with answering whether you'd like to retrieve every single file you specify with mget, then start the FTP client using the ``-i'' argument, like so:
ftp -i 127.0.0.1

2009-10-14

FileNet Image Manager BES_convert fails

When performing "initfnsw start", if you get:

2009/10/14 16:12:06.296 161,0,1008 BES_convert (2944.3060.20 0xb80.bf4) ... SSD(2944): Can't bind dn_len, size=2

2009/10/14 16:12:06.406 211,1,13 TM_daemon_ctl -f 344 -p 0x64c -c 0x1 (3072.2688.1 0xc00.a80) ... [SERIOUS] Exec of 'BES_convert' returned non-zero status of '0x3'.

2009/10/14 16:12:06.406 211,1,11 TM_daemon_ctl -f 344 -p 0x64c -c 0x1 (3072.2688.1 0xc00.a80) ... [SERIOUS] A failure occurred while waiting for a process to complete.

2009/10/14 16:12:06.406 211,1,13 TM_daemon_ctl -f 344 -p 0x64c -c 0x1 (3072.2688.1 0xc00.a80) ... [SERIOUS] Error (0xd301000d) encountered during initialization of IS software!

2009/10/14 16:12:06.406 211,1,11 TM_daemon_ctl -f 344 -p 0x64c -c 0x1 (3072.2688.1 0xc00.a80) ... [INFO] syslog semaphore has been re-established.

2009/10/14 16:12:06.406 211,1,11 TM_daemon_ctl -f 344 -p 0x64c -c 0x1 (3072.2688.1 0xc00.a80) ... [INFO] Software will now be shutdown due to previous error.

You can recover with:
fn_util initsec
initfnsw start

[info]

2009-10-09

how to u/mount drives on windows command line

Creates, deletes, or lists a volume mount point.

MOUNTVOL [drive:]path VolumeName
MOUNTVOL [drive:]path /D
MOUNTVOL [drive:]path /L

path Specifies the existing NTFS directory where the mount
point will reside.
VolumeName Specifies the volume name that is the target of the mount
point.
/D Removes the volume mount point from the specified directory
/L Lists the mounted volume name for the specified directory.

2009-10-06

FileNet Content Engine 3.5 - Verity Indexing Stopped

Here are some pointers regarding indexing and what to look for when comes to figuring out if there are problems.

1) Gather CE trace logs, specifically ContentSearch and ContentRM. Turn on all the trace options/flags for both of these logs.
You can view the ContentRM CE trace log and see the items being queued for indexing by looking for the phrase "sending filename to CBR indexer". If the indexing failed, you'll see "indexing failed, updating all requests".

You should see signs of indexing the ContentRM with a call to IndexIQFile, like this example below.
2005/07/27 22:31:33.418 0ed4 0000 -> CFN_Indexer::IndexIQFile 2005/07/27
22:31:33.418 0ed4 0000 C:\Program Files\FileNet\Content Engine\Log \IndexQueue\000000065{529A1CC0-7CB8-456D-B37D-51D05248E179}001000
{0C3C9546-8729-4DB3-A567-85DD4260E93A}.IQ

2) Verity SHOULD log errors to ContentSearch trace if there is a problem with indexing a specific item.

If a Verity Indexing submit request fails there will be an error in the event log 'An error occurred in a Verity VDK method call.' on the File Store Service computer. To get detailed info the best place to start is the ContentSearch trace, which will contain output from the Verity call-backs. Normally Verity (through the VDK, CS used K2) doesn't fail the submit request if files are missing, or can't be indexed - it logs it in the callbacks and returns success.

3) Check the sysinfo log (under the indexing folder in the file store
physical location, typically : C:\\
\index\fs0
Look for errors “unable to open” and UNC paths. Permissions errors can indicate that the user that is running the FSS may not have adequate permissions to the FileStore folder (see step 10).

4) Look in same folder : C:\\\index\fs0
“lock” files .lck. Believe that removing them from that folder may release the indexing mechanism if it was locked by Verity when it hit a previous error. I.e. Collection.lck

5) If nothing is being indexed, check the indexing folder “parts” folder for current entries (this is a bit more difficult if there are multiple indexes since you’ll have to check every one of them). Check that the files have recent date time stamps. If they are rather old and yet the system has been up for a while, the indexing isn’t running correctly.

6) If nothing is being indexed, look on the CE, there is a folder under the installation folder that holds items waiting to be indexed. If the CBR halts for any reason, ...\FileNet\Content Engine\Log\IndexQueue will begin to fill up with files. Once indexing resumes, the number of files in the folders should go back down until it reaches zero (then the indexing process will have caught up with the current system requests).

7) When is indexing completed? The number of files in...\FileNet\Content Engine\Log\IndexQueue will be zero and queue entries such as the following will appear in the ContentSearch CE trace log:

2005/06/10 01:04:13.632 05d4 0000 VdkCollectionSubmit AOK 2005/06/10 01:04:13.632 05d4 0000 VdkCollectionSubmit: \\3lfsusda\fn_fs \FS_FS2_upg\index\fs0 <656>

[Thanks Fintan]

2009-09-08

Low Fragmentation Heap for FileNet Content Engine

If you ever get this error generated by Filenet Content Engine 3.5:

PID=864, TID=860, Fnk_CatService.exe hr=0x80070032(The network request is not supported.) Lfh.cpp[122] ($Revision: 1.2 $): An error occurred in a Win32 API method call. (function HeapSetInformation(), Enable the Low Fragmentation Heap on Object Store Default Heap failed. See MS kb929136 for LFH instructions. GFlags and debuggers should not be used with LFH.).

Modify the registry at
HKLM\Software\FileNet\ECM\Content Engine\Client\

and add the following:

DWORD EnableLFHClientCRT=0
DWORD EnableLFHClientDefault=0

More info available here.

2009-09-04

VMware disks created by an unsupported version

When you get the following error on VMware:

One or more of the disks used by this virtual machine was created by an unsupported version of VMware Server. To power on or upgrade the virtual machine, either remove the unsupported disks(s) or use a version of VMware Server that supports this version of the disks. Below is a list of the disks and their reported versions.

You can perform the following:

1) Edit file.VMX
2) Modify virtualHWVersion = "n"; n might be 4 for example
3) Edit the smallest file.VMDK (the one without -flat)
4) Modify ddb.virtualHWVersion = "n", the same way as before

Register Websphere as a service

I have installed Websphere 6.1 on Windows but it only registered Dmgr as a service: how can I register nodeagent and the appsrv as well?

Here are the commands to launch:

WASService -add nodeagent -servername nodeagent -profilePath "C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01"

WASService -add server1 -servername server1 -profilePath "C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01"

2009-09-03

Windows the great & "Insufficient system resources to complete the requested service" error while copying a file

Some people found out that turing off the antivirus can help. It didn't work for me, anyway. Not even by using xcopy or xcopy /Z as someone else suggested.

What I need to do is perform a local copy using ftp. If your source drive is an external hd, you may want to add that path to ftp and download it locally. You can find some info about that here.

2009-05-20

enlarge your disk - vmware virtual disk

assumptions: the disk is system volume (i.e. there's only C:).
Also, there's no snapshot: if there's any, they should be removed for this to work as described.

1) increase virtual disk file size:
vmware-vdiskmanager -x 20Gb vmdiskfile.vmdk

2) add it as hd to another vm.
note: once the other vm has booted, the "new" hd should already automagically have a letter assigned. if not, then there's probably a snapshot and the process won't work (point 7 won't, at least).

3) inside the booted vm open a dos window and run: diskpart
4) list volume
5) set volume=X
6) list volume, just to verify
7) extend

That's it. Shutdown, remove the disk and go back to the original vm.

2009-05-12

IE8 compatibility mode

To have your IE8 render a page like IE7 used to do, you have to add the following to your page:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

By doing so, IE8 will render that page just like IE7 would do.

2009-03-30

oracle instance uptime

As reported here, this is the query to execute:

select
'Hostname : ' || host_name
,'Instance Name : ' || instance_name
,'Started At : ' || to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') stime
,'Uptime : ' || floor(sysdate - startup_time) || ' days(s) ' ||
trunc( 24*((sysdate-startup_time) -
trunc(sysdate-startup_time))) || ' hour(s) ' ||
mod(trunc(1440*((sysdate-startup_time) -
trunc(sysdate-startup_time))), 60) ||' minute(s) ' ||
mod(trunc(86400*((sysdate-startup_time) -
trunc(sysdate-startup_time))), 60) ||' seconds' uptime
from
sys.v_$instance;

2009-03-25

Websphere error WSVR0101W

If you ever get an error like this:

0000006d ApplicationMg A WSVR0200I: Starting application: MyAppEAR
0000006d ApplicationMg E WSVR0101W: An error occurred starting MyAppEAR
0000006d ApplicationMg A WSVR0217I: Stopping application: MyAppEAR
0000006d ApplicationMg A WSVR0220I: Application stopped: MyAppEAR


Make sure your web.xml is correct. In our case, we had some unexistent servlet mapping, which caused the application to fault.

2009-03-17

Adobe & "com.ibm.jsse2.util.h: No trusted certificate found" error

Suddenly a new error on Websphere Application Server, where Adobe PDF Generator runs:

RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: org.omg.CORBA.COMM_FAILURE: CAUGHT_EXCEPTION_WHILE_CONFIGURING_SSL_CLIENT_SOCKET:
JSSL0080E: javax.net.ssl.SSLHandshakeException - The client and server could not negotiate the desired level of security.
Reason: com.ibm.jsse2.util.h: No trusted certificate found vmcid: 0x49421000 minor code: 70 completed: No


Found this 6 point help somewhere on the web (thanks Soorya!):

Hi,
You need to obtain signer certificates from remote machine for SSL configuration.
I have explained you the steps below for the same.
1. From administrative console, follow
Security -> SSL certificate and key management -> key stores and certificates - > NodeDefaultTrustStore -> Signer certificates -> Retrive from port.
2. Enter remote machine name at Host.
3. Enter CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS of the remote machine at Port.
4. Enter Alias for reference.
5. Click “Retrieve signer information”.
6. Apply and save the changes.

Hope it will useful.
Regards,
Soorya Prakash.S


Following the hints, I managed to solve using localhost:9043 for points 2 and 3, and "adobe" for point 4. No reboot needed, the application now transforms into PDF nicely.

2009-03-16

IE6 issues with javascript with accents

The following code won't run with IE6, but does run perfectly on IE7:

function changeFunction(obj) {
var div = null;
var idScheda = '';
var o = obj;

alert('ID: ' + obj.id); // undefined
alert('TO: ' + typeof(obj.id)); // undefined
alert('IF: ' + (typeof(obj.id) == 'undefined')); // true

if (typeof(obj.id) == 'undefined') {
// compatibilità
alert('OK');


Basically, the problem was that we never got the OK alert, even though we got the true alert, one line before. We found out the error was related to the accent in compatibilità: changing that into compatibilita made the whole thing run on IE6 as well.

2009-03-12

JavaMail 1.4.2 released

New JavaMail release, 1.4.2, available here. Pretty nice info in the SSLNOTES file, which might actually help wrt the difficulties I experienced in a previous post. HTH.

2009-03-05

surviving process on aix

On Aix, to run a command in background and in a way which will not be killed once you disconnect you remote session, you should issue the following command:
nohup command &

How to run Win apps as service

Problem: I have a Windows application which has to be always open. Therefore it stays on a server, but I have to be careful and disconnect every time stop working, or the process gets killed.

Solution: http://www.cypressnet.com/Products/autotask/autotask.htm: "This allows for many types of tasks to be ran in the background, even when the users are logged off." Not for free.

2009-03-02

sAMAccountName 20 chat limit

Here is published a description of the Active Directory fields.

My interest is focused on the sAMAccountName (which is limited to 20 chars due to backwards compatibility) and userPrincipalName (which can be up longer and may include @domain). Systems with long user names should rather use the latter.

The story of the secure connection on Websphere 6.0.0

Once upon a time, our web application required to establish a SSL connection. Therefore we added JavaMail 1.4.1 JARs in our WEB-INF/lib directory, deployed the web application on Websphere 6.0.0 and experienced the application server was still loading its 1.3 version.

LESSON #1: use PARENT_LAST and PARENT_FIRST to determine whether the EAR/WAR file JARs are the last or the first to be loaded. A good explanation was found here.

Once we set PARENT_LAST on the Web Module, we ran into several XML casting related errors, such as: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration. That was because of the presence of unneeded JARs in WEB-INF/lib, eventually conflicting with Websphere ones, and previously bypassed by the PARTENT_FIRST option. Also in this care there's a lot of documentation and explanations, such as here, here, and here. However, what it had to be done was to clean up the unused JARs and/or substitute some of them with proper others.

LESSON #2: as a web application grows with time, it arrives the moment to stop and anlayze how many trash JAR it has collected. Therefore procede per steps:
  1. remove all JARs;
  2. if you are using the API of some suite, make sure you are using the required JARs;
  3. add JARs one by one, from the most important to the last important, till all compinling errors go away;
  4. go round you web application until you face some run time error, then add the remaining missing JARs. (Any suggestion on better ways is highly accepted!)
Now that the application can be started without errors and properly use JavaMail 1.4, we face a new error caused by:
javax.net.ssl.SSLException: Unsupported record version Unknown 111.109
at com.ibm.jsse2.a.b(Unknown Source)
at com.ibm.jsse2.a.a(Unknown Source)


Which seems to be due our current Websphere version (alas, still 6.0.0, while RAD 6.0.2 has it fixed). A fix is available here, even though I found it impossible to download APAR PK32916 by Fix Central. Given the fact it's impossible for us to upgrade WAS as of now, we have to find a workaround, but before that:

LESSON #3: should be needless to say, however better make sure your development team is using locally the same version of application server which is running on the test and production environments.

So, if it is impossible to use IBM JSSE API because they are old (as for JavaMail) and buggy, why not give it a try with SUN JSSE. I know it's dirty, however I extracted jsse.jar from Sun Java SDK 1.4 and added it to WEB-INF/lib. It resulted in a new error, which goes like:
java.net.SocketException: Export restriction: this JSSE implementation is non-pluggable.
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA12275)

Apparently the walkaround for this issue is reported here, and it says to patch org.apache.axis.components.net.JSSESocketFactory, and shows how. The reason is reported on Java 1.4 release notes, and goes like: "The JSSE implementation provided in this release includes strong cipher suites. However, due to U.S. export control restrictions, this release does not allow alternate "pluggable" SSL/TLS implementations to be used. For more information, please see the JSSE Reference Guide."

LESSON #4: you have to know when to stop even if you would like to carry on with the challenge. There are probably more critical things to deal with, so leave your ego apart.

We'll wait till we upgrade Websphere.

2009-02-28

Sid X.Org going crazy

A few apt-get update's ago, my X.Org server suddenly stopped working properly with my keyboard. Kb still worked fine in pure console, but when I typed anything in X my kb scroll lock led was turned on and off as I typed, making it impossible to write properly. Also, it was like the Ctrl key was costantly kept pushed.

The errors I got were only of this kind:
expected keysym, got ISO_Level5_Shift: line 17 of level5
expected keysym, got ISO_Level5_Shift: line 23 of level5
expected keysym, got ISO_Level5_Latch: line 27 of level5
expected keysym, got ISO_Level5_Latch: line 32 of level5
expected keysym, got ISO_Level5_Lock: line 36 of level5
expected keysym, got ISO_Level5_Lock: line 41 of level5
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Multiple interpretations of "NoSymbol+AnyOfOrNone(all)"
> Using last definition for duplicate fields
> Warning: Multiple interpretations of "NoSymbol+AnyOf(all)"
> Using last definition for duplicate fields
> Warning: Multiple interpretations of "NoSymbol+AnyOfOrNone(all)"
> Using last definition for duplicate fields
Errors from xkbcomp are not fatal to the X server
expected keysym, got ISO_Level5_Shift: line 17 of level5
expected keysym, got ISO_Level5_Shift: line 23 of level5
expected keysym, got ISO_Level5_Latch: line 27 of level5
expected keysym, got ISO_Level5_Latch: line 32 of level5
expected keysym, got ISO_Level5_Lock: line 36 of level5
expected keysym, got ISO_Level5_Lock: line 41 of level5
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Multiple interpretations of "NoSymbol+AnyOfOrNone(all)"
> Using last definition for duplicate fields
> Warning: Multiple interpretations of "NoSymbol+AnyOf(all)"
> Using last definition for duplicate fields
> Warning: Multiple interpretations of "NoSymbol+AnyOfOrNone(all)"
> Using last definition for duplicate fields
> Warning: Type "ONE_LEVEL" has 1 levels, but
has 2 symbols
> Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server


I finally got the situation manageable by configuring /etc/X11/xorg.conf this way:
Option "XkbRules" "walkaround"
#Option "XkbRules" "xorg"


Don't ask why, but now I can use my kb at 70%. I still get some errors, such as can't type letters with accents, @, £ and so on, plus, obviously, the following:
(EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/xfree
(WW) Couldn't load XKB keymap, falling back to pre-XKB keymap
(EE) Error compiling keymap (server-0)
(EE) XKB: Couldn't compile keymap
SetClientVersion: 0 9
SetKbdSettings - type: 0 rate: 30 delay: 500 snumlk: 0


Finally, I found the bug filed on bdo:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514975

Following its instructions, I upgraded libx11-6 from 1.0.3-7 to 1.1.5-2 and restored Option "XkbRules" "xorg" in xorg.conf. After restarting X and issuing setxkbmap it I can finally use my kb 100%. Yikes!

2009-02-24

How to enable a grayed out COM+ button on Win 2003

Case: on a Win 2003 server (not DC) it is impossible to enable COM+ because its button ("edit limits") is grayed out. How to enable it?

The referring security policy is: DCOM: Machine Access Restrictions in Security Descriptor Definition Language (SDDL) syntax, which can be found in: Local Security Settings\Security Settings\Local Policies\Security Options, and it must be set to "Not Defined" in order to have the button enabled.

On the (not DC) box, it seems to be impossible to set the policy to such value, and therefore the following registry key must be erased: HKLM\Software\Policies\Microsoft\Windows NT\DCOM.

Unvisible meta-LUN

I happened to see a Windows box not being able to see a meta-LUN (a bigger LUN formed of several "standard" size LUN) because its id was a too high number.
To keep in mind.

2009-02-23

log4j causing OutOfMemory error

OutOfMemory Error on application server.

Thread dump analysis reported 15 threads active out of 650. The others were in wait. Inactive threads stack trace reported the following:

at java.lang.Thread.sleep(Native Method)
at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java(Compiled Code))

In here http://www.theserverside.com/discussions/thread.tss?thread_id=27315 I found the following:

I found from the thread dump that lot of threads are created for log4j and not getting recycled.(see the thread dump below). I masked the log4j logging from my code. These log4j threads still get generated. Any ideas???

Thread Dump
"Thread-10" daemon prio=5 tid=0x113015d0 nid=0x838c waiting on monitor [0x133bf000..0x133bfdbc]
at java.lang.Thread.sleep(Native Method)
at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:95)

SOLUTION [in short: log4j configureAndWatch() spreads lots of threads without deallocating them, eventually causing OOM exceptions]:

I have not worked on JBoss. I am having Weblogic Server. But I am pretty much sure that JBoss might let you do similar stuff.

1. After you have launched the server, run your application in a loop.
2. At the point where the server says that it cannot create new native threads, get a thread dump. In weblogic I did it by running the command :

java weblogic.Admin -url hostname:7001 -username admin -password mypassword THREAD_DUMP

3. Take a look at all the threads that are waiting on monitor. Chances are that 90% of the threads will be spawned by same process. In my case, it was

"Thread-14" daemon prio=5 tid=0x11999e90 nid=0x3388 waiting on monitor [0x135bf000..0x135bfdbc]
at java.lang.Thread.sleep(Native Method)
at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:95)

I knew that this has something to do with log4j framework that I was using for logging.

4. So I started masking the logging lines, to see where this was being generated from. Eventually I found that the line
DOMConfigurator.configureAndWatch(fileFileName, logFileWatchTime)
was generating the threads that were not getting recycled. So I just went ahead and masked them.

Now everything works fine. It is going to be a different day I will be spending trouble shooting why this is happening. I was using this, because I liked the idea that by doing so, you could dynamically change log4j properties file and not restart the server.

But for now, I can leave with the idea of restarting the server if I change any configuration in log4j properties file. ;->

What i would suggest is that instead of looping 1000 times, just loop 20 times. Get a thread dump before you run your client and after you run youyr client. See what threads are created new, and if most of them are for same process, you need to see where they care created. It might be a bug in your code or third party library that you are using.

first post

First post!
Why a blog? To keep track of stuff I'd be forgetting after a few time.
Hopefully I'll keep it updated.