Monday, February 16, 2009
Linux Shell Meets Java UID
Java Unique ID generator (java.rmi.server.UID().toString()) can come in handy when needing unique directory names. However some basic Linux shell commands like ls, cd, rm, etc. may not like the "-" part in directory names like "-2374f8d0", Either "ls ./-2374f8d0" or "rm -- -2374f8d0" can do the trick.
Ant Launcher
I don't remember (or ever know) if you can use ~ in place of /home/username/ for Java classpath settings. But I got "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain" for ant-launcher.jar. Internet says one should also check $ANT_HOME value when running into similar errors.
Change Axis2 Client Read Timeout
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
options.setTimeOutInMilliSeconds(180000);
Thursday, February 12, 2009
MarsEdit
Finally found this not so pita blogging tool for Mac, especially when it comes to handling image insert to Blogger. Maybe I should pick up blogging again.
Friday, June 13, 2008
Apache Security
When hosting an Apache web server for very concerned customers, authentication, authorization, and access control can all flood in the way. Some may even ask for host-based methods. Just keep in mind that Apache has its own way for them all, including where to write logs. Don't go mess with usual files like /etc/hosts, /etc/hosts.allow, /etc/hosts.deny, or /var/log/messages. Unless, of course, your boss told you to.
Tuesday, June 3, 2008
MySQL in Non-standard Locations
Sometimes one ends up with a machine containing multiple MySQL installations, and no clue how and why it happened in the first place. Besides normal which password to use for which server confusions, it also requires some attention when installing packages like Perl DBD-mysql module. Be sure to specify the correct -I and -L paths at "perl Makefile.PL" step of the installation.
For example:
A Perl DBI client connection string can specify the non-standard socket location like this:
For example:
perl Makefile.PL --cflags="-I/usr/local/mysql/include -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" --libs="-L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto"
A Perl DBI client connection string can specify the non-standard socket location like this:
"DBI:mysql:mydb:localhost:mysql_socket=/tmp/mysql.sock"
Friday, May 30, 2008
What CoG Really Wants
I ran into various error messages from the CoG Kit when attempting a fresh install of GridFTP enabled CIMA portal. After figuring out and fixing all mishaps on my part, I wonder if anyone else also find those messages cryptic.
Maybe they don't look as cryptic now as before, when I was scratching my head over them...
- Using wrong Java.
$ java --version
java version "1.5.0"
gij (GNU libgcj) version 4.1.2 20070925 (Red Hat 4.1.2-27)
$ ./cog-myproxy -h myproxy.teragrid.org -p 7514 -l username -S anonget
Enter MyProxy Pass Phrase:
Error: MyProxy get failed. [Caused by: Authentication failed [Caused by: Miscellaneous failure. [Caused by: Bad certificate (java.security.SignatureException: MD5/RSA/PKCS#1: Not initialized)]]]
Should have used the following one from Sun instead:
$ java -version
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing) - Missing the remote host/server CA certificate from
$HOME/.globus/certificates. In the following example, it's missing the NCSA certificate, CA who signed the BigRed cluster. Insiders may like this reference.
$ ./cog-file-transfer -s gsiftp://gridftp.bigred.iu.teragrid.org/N/dc/projects/cima/lustre_iumsc_frames/07108/a_071081.001 -d file:///tmp/a_071081.001
ERROR - File transfer failed
Authentication failed. Caused by Failure unspecified at GSS-API level. Caused by
COM.claymoresystems.ptls.SSLThrewAlertException: Unknown CA
at COM.claymoresystems.ptls.SSLConn.alert(SSLConn.java:235)
at COM.claymoresystems.ptls.SSLHandshake.recvCertificate(SSLHandshake.java:304)
at COM.claymoresystems.ptls.SSLHandshakeClient.processTokens(SSLHandshakeClient.java:128)
at COM.claymoresystems.ptls.SSLHandshake.processHandshake(SSLHandshake.java:135)
at org.globus.gsi.gssapi.GlobusGSSContextImpl.initSecContext(GlobusGSSContextImpl.java:488)
at org.globus.ftp.extended.GridFTPControlChannel.authenticate(GridFTPControlChannel.java:208)
at org.globus.ftp.GridFTPClient.authenticate(GridFTPClient.java:104)
at org.globus.ftp.GridFTPClient.authenticate(GridFTPClient.java:89)
at org.globus.cog.abstraction.impl.file.gridftp.old.FileResourceImpl.start(FileResourceImpl.java:97)
at org.globus.cog.abstraction.impl.file.gridftp.FileResourceImpl.start(FileResourceImpl.java:47)
at org.globus.cog.abstraction.impl.fileTransfer.DelegatedFileTransferHandler.startResource(DelegatedFileTransferHandler.java:415)
at org.globus.cog.abstraction.impl.fileTransfer.DelegatedFileTransferHandler.prepareService(DelegatedFileTransferHandler.java:191)
at org.globus.cog.abstraction.impl.fileTransfer.DelegatedFileTransferHandler.run(DelegatedFileTransferHandler.java:434)
at java.lang.Thread.run(Thread.java:595) - Missing the NCSA MyProxy CA certificate.
$ ./cog-file-transfer -s gsiftp://gridftp.bigred.iu.teragrid.org/N/dc/projects/cima/lustre_iumsc_frames/07108/a_071081.001 -d file:///tmp/a_071081.001
ERROR - File transfer failed
org.globus.cog.abstraction.impl.file.FileResourceException: Exception in getFile
at org.globus.cog.abstraction.impl.file.gridftp.old.FileResourceImpl.getFile(FileResourceImpl.java:312)
at org.globus.cog.abstraction.impl.fileTransfer.DelegatedFileTransferHandler.doSource(DelegatedFileTransferHandler.java:251)
at org.globus.cog.abstraction.impl.fileTransfer.DelegatedFileTransferHandler.run(DelegatedFileTransferHandler.java:438)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.globus.ftp.exception.ServerException: Server refused performing the request. Custom message: (error code 1) [Nested exception message: Custom message: Unexpected reply: 451 active connection to server failed
org.globus.common.ChainedIOException: Authentication failed [Caused by: Failure unspecified at GSS-API level [Caused by: Unknown CA]]
Authentication failed. Caused by Failure unspecified at GSS-API level. Caused by COM.claymoresystems.ptls.SSLThrewAlertException: Unknown CA
at COM.claymoresystems.ptls.SSLConn.alert(SSLConn.java:235)
at COM.claymoresystems.ptls.SSLHandshake.recvCertificate(SSLHandshake.java:304)
at COM.claymoresystems.ptls.SSLHandshakeClient.processTokens(SSLHandshakeClient.java:128)
at COM.claymoresystems.ptls.SSLHandshake.processHandshake(SSLHandshake.java:135)
at org.globus.gsi.gssapi.GlobusGSSContextImpl.initSecContext(GlobusGSSContextImpl.java:488)
at org.globus.gsi.gssapi.net.GssSocket.authenticateClient(GssSocket.java:107)
at org.globus.gsi.gssapi.net.GssSocket.startHandshake(GssSocket.java:145)
at org.globus.gsi.gssapi.net.GssSocket.getOutputStream(GssSocket.java:166)
at org.globus.ftp.extended.GridFTPServerFacade.authenticate(GridFTPServerFacade.java:550)
at org.globus.ftp.dc.GridFTPActiveConnectTask.execute(GridFTPActiveConnectTask.java:86)
at org.globus.ftp.dc.TaskThread.run(TaskThread.java:71)
at java.lang.Thread.run(Thread.java:595)
] [Nested exception is org.globus.ftp.exception.UnexpectedReplyCodeException: Custom message: Unexpected reply: 451 active connection to server failed
org.globus.common.ChainedIOException: Authentication failed [Caused by: Failure unspecified at GSS-API level [Caused by: Unknown CA]]
Authentication failed. Caused by Failure unspecified at GSS-API level. Caused by COM.claymoresystems.ptls.SSLThrewAlertException: Unknown CA
at COM.claymoresystems.ptls.SSLConn.alert(SSLConn.java:235)
at COM.claymoresystems.ptls.SSLHandshake.recvCertificate(SSLHandshake.java:304)
at COM.claymoresystems.ptls.SSLHandshakeClient.processTokens(SSLHandshakeClient.java:128)
at COM.claymoresystems.ptls.SSLHandshake.processHandshake(SSLHandshake.java:135)
at org.globus.gsi.gssapi.GlobusGSSContextImpl.initSecContext(GlobusGSSContextImpl.java:488)
at org.globus.gsi.gssapi.net.GssSocket.authenticateClient(GssSocket.java:107)
at org.globus.gsi.gssapi.net.GssSocket.startHandshake(GssSocket.java:145)
at org.globus.gsi.gssapi.net.GssSocket.getOutputStream(GssSocket.java:166)
at org.globus.ftp.extended.GridFTPServerFacade.authenticate(GridFTPServerFacade.java:550)
at org.globus.ftp.dc.GridFTPActiveConnectTask.execute(GridFTPActiveConnectTask.java:86)
at org.globus.ftp.dc.TaskThread.run(TaskThread.java:71)
at java.lang.Thread.run(Thread.java:595)
]
at org.globus.ftp.exception.ServerException.embedUnexpectedReplyCodeException(ServerException.java:101)
at org.globus.ftp.exception.ServerException.embedUnexpectedReplyCodeException(ServerException.java:110)
at org.globus.ftp.vanilla.TransferMonitor.run(TransferMonitor.java:195)
... 1 more
Maybe they don't look as cryptic now as before, when I was scratching my head over them...
Subscribe to:
Posts (Atom)