Archive for the ‘administration’ Category
We have git repo at github ( and would like to move onto some our corporate box inside our network, for example on internal.bokov.net. This repository is shared for group of developers and all who have ssh access onto internal.bokov.net shall have right to commits onto git repository. So first of all prepare place for git repo at new hosting :
ssh user@internal.bokov.net
cd var
mkdir git_repo
chmod 777 git_repo
cd git_repo
mkdir my_project
cd my_project
git init --bare --shared=all
cd objects
chmod g+ws *
Next clone existing repo and change its settings to point onto internal.bokov.net
git clone --bare git@github.com:bokov/github_project.git
git remote add -t master -m master origin ssh://internal.bokov.net/var/git_repo/my_project/
git push origin master
to start work with new repo just use
git clone ssh://internal.bokov.net/var/git_repo/my_project/
have fun.
Posted by Alexey Bokov on February 9, 2010 at 12:49 pm under administration, programming, project managment.
Tags: administration, git, ssh, ubuntu, work
1 Comment.
[root@my-box ~]# useradd -g users -u 560 tuser
[root@my-box ~]# passwd tuser
Posted by Alexey Bokov on February 8, 2010 at 8:03 pm under administration, linux.
Tags: stuff, ubuntu, work
Comment on this post.
When I tried to restart mysql
sudo /etc/init.d/mysql restart
it failed with
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]
Continue reading ‘Quick fix problem with mySQL starting on Ubuntu 9.10’ »
Posted by Alexey Bokov on November 26, 2009 at 6:23 pm under administration.
Tags: mysql, ubuntu
Comment on this post.
Posted by Alexey Bokov on November 11, 2009 at 1:45 pm under administration, ec2.
Tags: administration, Amazon EC2, java, ubuntu, work
Comment on this post.
If anyone interested in it – here’s new update for Sun Grid Engine 6.2 – update 4. It almost about bug fixing and man’s changes – list of changes is here. Sources’ tag for CVS is V62u4_TAG (make sense for Grid Engine, ARCo, SGE Inspect ), by the way as I know Hedeby is still 1.0u3.
Posted by Alexey Bokov on October 26, 2009 at 1:01 pm under administration, compute grid, news, useful links.
Tags: Amazon EC2, hedeby, java, news, open source, SGE, Solaris, sun, Sun Grid Engine, work
Comment on this post.
- Recursively add files and foldes into CVS
find . -type d -print | grep -v CVS | xargs -n1 cvs add
- Delete “.svn” files from current folder
find . -type f -exec echo \"{}\" \; | grep ".svn" | xargs rm
Posted by Alexey Bokov on October 20, 2009 at 1:06 pm under administration, linux.
Tags: administration, bash, ubuntu, work
Comment on this post.
On one of my apache I use suexec to run some tasks – some weeks before I configure all it and all stuff works well, but some days later when I try to run my cgi-perl script I found I have “500 Internal error”. I change nothing in apache config or in my scripts – I just install fresh updates for ubuntu. In apache’s error log I’ve got :
[Wed Jul 29 08:15:28 2009] [error] (13)Permission denied: exec of ‘/usr/lib/apache2/suexec’ failed
[Wed Jul 29 08:15:28 2009] [error] [client my_ip] Premature end of script headers: script.pl
It’s strange, but anyway it doesn’t works. I spent some time trying to fix it ( some guys recommend to rebuilt suexec – but it’s not a simplest way to fix this problem ) – in my case it was fixed by changing owner of my suexec. I check out current properties :
ls -la /usr/lib/apache2/suexec
-rwsr-xr– 1 root www-data 18872 2009-07-10 18:40 /usr/lib/apache2/suexec
and change them :
chown root:root /usr/lib/apache2/suexec
chmod 4755 /usr/lib/apache2/suexec
And don’t forget to restart :
/etc/init.d/apache2 restart
ps. by the way suexec’s id’s are :
#id www-user
uid=1000(www-user) gid=109(www-group) groups=109(www-group)
Posted by Alexey Bokov on July 29, 2009 at 2:17 pm under administration.
Tags: 500 internal error, administration, apache, cgi, httpd, perl, suexec, ubuntu
Comment on this post.
Here’s some steps which I frequently use to configure Ubuntu to work as EC2 manager
Continue reading ‘Quick steps to configure Ubuntu for with EC2 API’ »
Posted by Alexey Bokov on July 17, 2009 at 3:28 pm under administration, ec2.
Tags: administration, Amazon EC2, bash, bashrc, ec2 api, java, ubuntu
Comment on this post.
Sun Grid Engine’s top engineer Richard Hierlmeier wrote article ( and some bash scripts which implements it – btw why you not to put it them onto your cvs? ) about using SDM in compute cloud ( here’s EC2 as example, I suppose that GoGrid can be used also without too many changes ) – Using SDM Cloud Adapter to Manage Solaris Zones.
Posted by Alexey Bokov on July 7, 2009 at 12:03 pm under administration, compute grid, ec2.
Tags: administration, Amazon EC2, bash, compute cloud, Elastic Compute Cloud, hedeby, qconf, SGE, Solaris, sun, work
Comment on this post.
My way – run sqlplus, spool in using html markup and convert this html onto text by using sed replacements. It works fast enought, and better than parse resulted text by spool without markup. Bash script which impelement it is under below Continue reading ‘How to dump oracle table into tab separated text file ( csv )’ »
Posted by Alexey Bokov on July 3, 2009 at 10:35 pm under administration, programming.
Tags: bash, csv, database, oracle, script, sed, sqlplus, work
Comment on this post.
strange enough, but in some Ubuntu 9.04 ( 64 bit ) apache2 may tell
/usr/sbin/apache2 -k restart
apache2: bad user name ${APACHE_RUN_USER}
instead callin apache2 from /usr/bin use /etc/init.d/ :
/etc/init.d/apache2 restart
Posted by Alexey Bokov on June 24, 2009 at 4:50 pm under administration.
Tags: apache2, work
Comment on this post.
As base AMI i used ami-7db75014 – it’s OpenSolaris supported by Sun, common informartion about installing and using OpenSolaris in EC2 also available in Sun’s Amazon EC2 Getting started guide – in this post I will focus almost in SGE using in Amazon EC2. As SGE distributive i use all-in-one tar package – i choosed “All supported platform” in Grid Engige download page – it takes about 350 Mb, but I don’t worry about platform architecture – if sun support it – it will be in this package. This ge62u2_1.tar.gz contains bunch of other tar.gz’s ( and even hedeby’s core package ) and can be unpacked by :
root@ec2-server:~/tools/archive# gzip -dc ge62u2_1.tar.gz | tar xvpf -
So I just go inside ge6.2u2_1 and unpack them all using something like this
for myfile in *.tar.gz
do
gzip -dc $myfile | tar xvpf -
done
One important thing – hedeby-1.0u2-core.tar.gz contains old versions of some files from ge-6.2u2_1-common.tar.gz – there’s conflicts in files common/util/arch and common/util/arch_variables – here’s diff for them – may be sometimes it can be usefull, but for my configuration it causes very strange errors when I try to install executor host :
value == NULL for attribute “mailer” in configuration list of “ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com”
./inst_sge[261]: Translate: not found [No such file or directory]
./inst_sge[263]: Translate: not found [No such file or directory]
./inst_sge[264]: Translate: not found [No such file or directory]
When I replace this files from ge-6.2u2_1-common.tar.gz installation works as expected. Next point it’s DNS configuration – SGE is very picky to DNS and it will cause some problems in running SGE Amazon EC2 instances with SGE, this stuff can be fixed using host_aliases file in SGE, or other way it’s to use /etc/hosts file for it – some kind of this technique used in Hedeby-SGE on Amazon EC2 demo, for example if we have master this name and 2 executor hosts I put this lines into /etc/hosts :
#internal_ip external_full_name external_short_name internal_full_name internal_short_name
10.yyy.xyz.zzz ec2-RRR-TTT-ZZZ-YYY.compute-1.amazonaws.com ec2-RRR-TTT-ZZZ-YYY domU-mm-ww-PPP-WWW-FFF-GGG.compute-1.internal domU-mm-ww-PPP-WWW-FFF-GGG
10.yyy.qwe.ttt ec2-aaa-bbb-ccc-ddd.compute-1.amazonaws.com ec2-aaa-bbb-ccc-ddd domU-mm-ww-JJJ-HHH-DDD-SSS.compute-1.internal domU-mm-ww-JJJ-HHH-DDD-SSS
10.yyy.pre.ppp ec2-yyy-rrr-eee-qqq.compute-1.amazonaws.com ec2-yyy-rrr-eee-qqq domU-mm-ww-UUU-III-OOO-PPP.compute-1.internal domU-mm-ww-UUU-III-OOO-PPP
Also I use hostname ec2-RRR-TTT-ZZZ-YYY ( external_short_name ) to set instance hostname – this names I use as hostnames when I configure SGE.
Posted by Alexey Bokov on April 7, 2009 at 9:54 pm under administration, compute grid, ec2.
Tags: /etc/hosts, administration, Amazon EC2, hostname, open source, OpenSolaris, SGE, sun, work
Comment on this post.
Below I try to summary my experience with SGE and it’s using on vary platform ( Solaris 10, Ubuntu, OpenSolaris, etc.. ). If you use Solaris – check out my Solaris – common questions and it’s differences from Linux – may be your problems deal with Solaris, but not SGE.
So let’s go :
- when I installing SGE, and after export SGE_ROOT=<my_sge_path> i try to run util/setfileperm.sh I got ‘can’t find script /util/arch‘ error as shown below :
root@domU-12-31-39-03-CC-95:/opt/ge6.2u2_1# util/setfileperm.sh $SGE_ROOT
can’t find script /util/arch
this error can be fixed by set SDM_DIST enviroment variable :
export SDM_DIST=$SGE_ROOT
- I got commlib error :
error: commlib error: access denied (client IP resolved to host name “”. This is not identical to clients host name “”)ERROR: unable to contact qmaster using port 10500 on host “solaris-master.devnet.int.corp”
rebooting SGE master host helps – see Sun Grid Engine : execution host can’t connet to master host with “commlib error: access denied
- to be continued..
Posted by Alexey Bokov on April 3, 2009 at 4:10 pm under administration, compute grid.
Tags: SGE, Solaris, sun
Comment on this post.
Actually newbies in Solaris ( and experienced users in Linux
) have troubles with some every-day routines which works in Solaris in a different way than in most Linux like Ubuntu. Below I try to list most ”popular” problems and questins about differences in Solaris and Linux and try to figure them out.
- grep doesn’t have -r switch, so there’s no recursive looking throught directories, here’s alternatives for recursive grep on Solaris :
grep 'somestring' `find . -name '*'`
find . | xargs grep 'somestring'
- tar doesn’t support -z option, so tar xfz my_archive.tar.gz will fail with error “tar: z: unknown function modifier“. To unpack tar.gz archive on Solaris you may use this one :
gzip -dc my_archive.tar.gz | tar xvpf -
- how to set environment variables in Solaris ( i set them in \~/.bashrc, but it doesn’t works ) : to make Solaris read and apply to user environment barsh_rc file try to create file ~/.bash_profile in your home, and put in it lines listed below :
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
To be continued…
Usefull links : Solaris Infrequently Asked and Obscure Questions
Posted by Alexey Bokov on April 2, 2009 at 9:00 pm under administration.
Tags: bash, grep, gzip, Solaris, sun, tar
Comment on this post.
I got some problems with my SGE cluster – I got some amount of Solaris 10 which running under some virtualization, all servers are the same configured and have equally environment, on one machine I install SGE master, on other SGE execution hosts – and some execution hosts works well, but on another I have strange error from “install_execd” :
Checking hostname resolving
—————————
Cannot contact qmaster. The command failed:
./bin/sol-x86/qconf -sh
The error message was:
error: commlib error: access denied (client IP resolved to host name “”. This is not identical to clients host name “”)
ERROR: unable to contact qmaster using port 10500 on host “solaris-master.devnet.int.corp”
When I run “qconf -sh” I got :
bash-3.00# qconf -sh
error: commlib error: access denied (client IP resolved to host name “”. This is not identical to clients host name “”)
ERROR: unable to contact qmaster using port 10500 on host “solaris-master.devnet.int.corp“
I check out connection – ping works, hostname resolved, telnet connection on port 10500 – it works, after I check connection from master host – there’s no problems too. I compare environment on execution hosts which are worked well with hosts which have error – they got the same environment, master host configuration also have no any suspicios-looking stuff. I try to find something usefull in web – no results, some guys have same problem, but no one knows that’s happen and how to fix it. After I try to reboot execution hosts – no effect.
But when I try run “reboot” on master host – wow, it helps! So, guys, if you’ got the same errors with SGE – try to “reboot” on your master host – it may helps.
Posted by Alexey Bokov on April 2, 2009 at 1:15 pm under administration.
Tags: administration, qconf, SGE, Solaris, sun, telnet, work
Comment on this post.