Pages

Saturday, April 20, 2013

Fixing su: cannot set user id: Resources temporarily

#su -
su: cannot set user id: Resource temporarily unavailable
#

After searching and googling few minutes, i found a quick resolution to fixing this issue.
This is all about VPS limit.

Edit limit.conf below or change if needed.
#vi /etc/security/limit.conf
#### add/change on these line below:
* soft nproc 2047
* hard nproc 16384
* soft nofile 2048
* hard nofile 65536

After that try to relogin using a normal access user and then try to get su -
this should fixed your issue.

Friday, April 19, 2013

Conver Putty ppk key to SSH key

In many occasions I needed to convert a Putty ppk private key nack to open ssh key to be able to use it directly from a linux box command line. It is fairly simple to do but I always need to look it up so here it is for easy reference :

Install putty using yum in Fedora.
If you are using Ubuntu you need to install putty-tools as well

From the command line give

puttygen xxxxx2.ppk -O private-openssh -o key.ssh

Enter passphrase to load key:

Then log onto your system using

ssh root@84.200.82.6 -p 8057 -i key.ssh

Tuesday, April 16, 2013

Troubleshooting apache

check httpd service is running or not

• if its not starting the check the syntax of the config file
#httpd -S (display the all files and its location )
#httpd -t or apachectl configtest
if syntax is ok the config file is correct
• check the error logs of apache
/var/log/httpd/error_log
• apache also requires working dsn client support via /etc/resolv.conf and make sure dns is working fine
• check httpd.conf file there is correct entry of server name is there or not and check the port no
• check the size of the log file if it is full then it ll cause error 500 so make sure that log files are under limit and we can us e tool called logrotate in /etc/logrorate.d/httpd create configuration file for httpd log files
• It is possible that some other process may be using port 80 or 443. Use netstat command to list open port and their owners:
#nestat -tulpn
#netstat -tulpn |grep ‘:80′
If other process using port 80 / 443, you need to stop them or assign another port to Apache