This was on a Suse Linux 11 64 bit machine.
I installed two thridparty softwares freetds and unixodbc. After the customary installation steps of unixodbc. I installed freetds with the following set of commands
./configure --with-unixodbc=/usr/local
make
make install
Both the softwares generated a few so files and placed it under /usr/local/lib ( could be lib64 as well). If it places in lib64 , then you will not need to worry about the next few steps. However in my case the binaries were put into /usr/local/lib
To make the binaries available in the LD_LIBRARY_PATH, I followed the below steps
vi /etc/ld.so.conf; add /usr/local/lib i.e: the path where both freetds and unixodbc binaries are installed
ldconfig ; this is run to include the newly added lib path into the LD_LIBRARY_PATH
ldconfig -p | grep libtdsodb; to check if I will be able to find the newly added nbinaries eg: libtdsodb using the LD_LIBRARY_PATH set by the system
Just to check if my database connections were working
cp *.ini /usr/local/etc/ ; these ini's are pre configured with the database ip addresses and the
connection details
To test if DB connects, use the below command
isql -v MSSQLTestServer sa admin
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
My googled working solutions for those teeny weeny irritating problems I face in my day to day life.Occasional reviews of free software tools
Friday, February 18, 2011
Bullseye error while executing through hudson/jenkins job on windows
I was unable to execute any commands of cov01.exe on windows through hudson . whereas form the systems command prompt all commands worked fine. Through the hudson job , I was getting an error
Exception: cannot determine home directory
I could not find out the exact solution to this. But I did find a workaround. I had to set a few environment variables
set APPDATA=C:\Documents and Settings\build\Application Data
set HOMEDRIVE=C:
set HOMEPATH=\Documents and Settings\build
The problem seems to be because the Bullseye needs a home directory to start its operations which for some strange reason was not being set from the hudson job.
Exception: cannot determine home directory
I could not find out the exact solution to this. But I did find a workaround. I had to set a few environment variables
set APPDATA=C:\Documents and Settings\build\Application Data
set HOMEDRIVE=C:
set HOMEPATH=\Documents and Settings\build
The problem seems to be because the Bullseye needs a home directory to start its operations which for some strange reason was not being set from the hudson job.
Wednesday, February 16, 2011
Increase the Number of open files
In Hudson/Jenkins, we were unable to open a new session through the browser. However what I noticed on looking at the hudson logs was that the sessions were running in the background. However we did find a SEVER error message which said the
"(Too many open files)"
When I ran an lsof | wc -l it was almost at 1247
however as you can see from the below command , the limit for number of open files was set to 1024
# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 139264
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
To resolve this, and to increase the number of open files that are allowed in the system, I did the below..
edit the /etc/security/limits.conf and add the following.
* soft nofile 4096
* hard nofile 4096
This means that for every user ( indicated by *) , the maximumm number of open files would be 4096. Instead of specifying *, you can specify the user-name .
You will have to restart the service, and exit the session for the new ulimit values to be in place.
# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 139264
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
A FEW commands that I had run to understand the various system parameters. Putting it down here for future reference
lsof -p
cat /proc/sys/fs/file-max
sysctl -a
/etc/sysctl.conf
sysctl -p
"(Too many open files)"
When I ran an lsof | wc -l it was almost at 1247
however as you can see from the below command , the limit for number of open files was set to 1024
# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 139264
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
To resolve this, and to increase the number of open files that are allowed in the system, I did the below..
edit the /etc/security/limits.conf and add the following.
* soft nofile 4096
* hard nofile 4096
This means that for every user ( indicated by *) , the maximumm number of open files would be 4096. Instead of specifying *, you can specify the user-name .
You will have to restart the service, and exit the session for the new ulimit values to be in place.
# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 139264
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
A FEW commands that I had run to understand the various system parameters. Putting it down here for future reference
lsof -p
cat /proc/sys/fs/file-max
sysctl -a
/etc/sysctl.conf
sysctl -p
Wednesday, September 15, 2010
rm: 0653-611 Directory not empty in aix
This was happening on aix. I was unable to remove a folder . The error it gave was
rm: 0653-611 Directory "xyz " not empty
The issues seems to be because of Unreferenced directory in the filesystem.
I had to un-mount the partition and run an fsck on the filesystem.
fsck /home
FSCK output
===========================================
** Checking /dev/rhd1 (/home)
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
Unreferenced directory I=7743662 owner=bin mode=240750
size=512 mtime=Sep 13 08:00 2010 ; RECONNECT? YES
Directory Inode=7743662 connected, parent was Inode=8990791
Unreferenced directory I=8984658 owner=bin mode=240750
size=512 mtime=Sep 14 03:11 2010 ; RECONNECT? y
Directory Inode=8984658 connected, parent was Inode=8990791
** Phase 4 - Check Reference Counts
link count directory I=7743662 owner=bin mode=240750
size=512 mtime=Sep 13 08:00 2010
count 1 should be 2; ADJUST? y
link count directory I=8984658 owner=bin mode=240750
size=512 mtime=Sep 14 03:11 2010
count 1 should be 2; ADJUST? y
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
526042 files 51713965 blocks 78833747 free
================================================
Once the fsck was done.. After remounting the partition , I was able to remove the folder.
rm: 0653-611 Directory "xyz " not empty
The issues seems to be because of Unreferenced directory in the filesystem.
I had to un-mount the partition and run an fsck on the filesystem.
fsck /home
FSCK output
===========================================
** Checking /dev/rhd1 (/home)
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
Unreferenced directory I=7743662 owner=bin mode=240750
size=512 mtime=Sep 13 08:00 2010 ; RECONNECT? YES
Directory Inode=7743662 connected, parent was Inode=8990791
Unreferenced directory I=8984658 owner=bin mode=240750
size=512 mtime=Sep 14 03:11 2010 ; RECONNECT? y
Directory Inode=8984658 connected, parent was Inode=8990791
** Phase 4 - Check Reference Counts
link count directory I=7743662 owner=bin mode=240750
size=512 mtime=Sep 13 08:00 2010
count 1 should be 2; ADJUST? y
link count directory I=8984658 owner=bin mode=240750
size=512 mtime=Sep 14 03:11 2010
count 1 should be 2; ADJUST? y
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
526042 files 51713965 blocks 78833747 free
================================================
Once the fsck was done.. After remounting the partition , I was able to remove the folder.
Thursday, March 11, 2010
Merge PDfs into a single PDF file - windows
http://www.codejacked.com/combine-multiple-pdfs-into-one-merged-document/
Visual Studio "fatal error C1902: Program database manager mismatch; please check your installation"
Got this error when executing remote build using hudson on the windows slave machine . Was using Visual Studio 2005.
There is a hotfix that Midcrosoft has provided which replaces the mspdb80.dll located at VCINSTALLDIR\common7\IDE
http://support.microsoft.com/kb/920770
This has to do with visual studio not being able to build using the Local System Account ".
This fix ensures that you need to change any cygwin sshd service settings as has been instructed in other posts
There is a hotfix that Midcrosoft has provided which replaces the mspdb80.dll located at VCINSTALLDIR\common7\IDE
http://support.microsoft.com/kb/920770
This has to do with visual studio not being able to build using the Local System Account ".
This fix ensures that you need to change any cygwin sshd service settings as has been instructed in other posts
Thursday, December 3, 2009
Fast Copy tool
A colleague suggested using this tool called teracopy
http://www.codesector.com/download.php
Amazing tool.. accelerates copying both over the network and within the system as well . Works on windows primarily.
Try it!!! and let me know if you know anything better.
http://www.codesector.com/download.php
Amazing tool.. accelerates copying both over the network and within the system as well . Works on windows primarily.
Try it!!! and let me know if you know anything better.
Subscribe to:
Posts (Atom)