Memmory out of error while using Yum

Error Message
++++++++++++++++

testing
Loaded plugins: fastestmirror, rhnplugin
Loading mirror speeds from cached hostfile
* cloudlinux-x86_64-server-5: cl-mirror.london.uk2.net
Excluding Packages in global exclude list
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 309, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 178, in main
result, resultmsgs = base.doCommands()
File “/usr/share/yum-cli/cli.py”, line 345, in doCommands
self._getTs(needTsRemove)
File “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 101, in _getTs
self._getTsInfo(remove_only)
File “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 112, in _getTsIn fo
pkgSack = self.pkgSack
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 662, in
pkgSack = property(fget=lambda self: self._getSacks(),
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 508, in _getSack s
self.excludePackages()
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 1096, in exclude Packages
ignore_case=False)
File “/usr/lib/python2.4/site-packages/yum/packageSack.py”, line 396, in retur nPackages
None, patterns, ignore_case)
File “/usr/lib/python2.4/site-packages/yum/packageSack.py”, line 482, in _comp uteAggregateListResult
sackResult = apply(method, args)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 1210, in retur nPackages
pkgobjlist = self._buildPkgObjList(repoid, patterns, ignore_case)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 44, in newFunc
return func(*args, **kwargs)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 1191, in _buil dPkgObjList
po = self._packageByKeyData(repo, x[‘pkgKey’], x)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 444, in _packa geByKeyData
po = self.pc(repo, data)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 73, in __init_ _
self._loadedfiles = False
MemoryError
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “/usr/lib64/python2.4/atexit.py”, line 24, in _run_exitfuncs
Error in sys.exitfunc:
Traceback (most recent call last):
File “/usr/lib64/python2.4/atexit.py”, line 30, in _run_exitfuncs
traceback.print_exc()
File “/usr/lib64/python2.4/traceback.py”, line 212, in print_exc
print_exception(etype, value, tb, limit, file)
File “/usr/lib64/python2.4/traceback.py”, line 125, in print_exception
print_tb(tb, limit, file)
File “/usr/lib64/python2.4/traceback.py”, line 69, in print_tb
line = linecache.getline(filename, lineno)
File “/usr/lib64/python2.4/linecache.py”, line 14, in getline
lines = getlines(filename)
File “/usr/lib64/python2.4/linecache.py”, line 40, in getlines
return updatecache(filename)
File “/usr/lib64/python2.4/linecache.py”, line 100, in updatecache
fp = open(fullname, ‘rU’)
MemoryError

————————————————–
Solution
++++++

# ulimit -a

The output for this will be obtained as :

root@server1 [~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 19
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) 10000
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) 15
virtual memory (kbytes, -v) 262144
file locks (-x) unlimited

The reason for such memory error is because of virtual memory and max. memory size. It should be unlimited, otherwise it will show memory error.
# ulimit -m unlimited
# ulimit -v unlimited

Then run Yum

PhpBB to MyBB Migration ( steps for migrating phpBB site to MyBB)

Hi Guys, following steps will allow you to migrate your existing PhpBB site to MyBB site.

To convert or merge a forum, you must have a version of MyBB 1.6 installed on your server, as well as a copy of the database of the forum to be merged on your server. You must also have the latest version of the merge system uploaded to your server as a subdirectory of your copy of MyBB.

For downloading MyBB please visit following url:

http://www.mybb.com/downloads

For downloading merge system please visit http://www.mybb.com/downloads/merge-system

Steps

1 First take a backup of your existing site including database

2 Install MyBB on location where you want to install it.

* unzip the file that you downloaded from http://www.mybb.com/downloads and upload it’s contents to the location where you want to install it.
* Also create a database for installation via your control panel

* README file will give you more details.

3 Then unzip and upload the contents of merge software us a sub-folder to installation path( use subdirectory name as merge)

4 After uploading the files to your existing MyBB install, visit your forum’s URL, appending /merge/ to the end. So, if your forum is at http://www.yourforum.com/forums/ you would visit http://www.yourforum.com/forums/merge/

5 The first page you see is the Welcome page. From this page, you must choose the forum software and the version of the forum you will be converting into MyBB. Select the appropriate software, and then click “Next”

6 This page lets you pick and choose what you want imported, and what you don’t want imported. As you can see, many modules have “dependencies,” which requires you to run another module first before running that one. After you run all of the “dependencies,” you will be able to run that module.

7 Then proceed with the steps that on installation page.
Please let me know if you are facing any kind of difficulties during this procedure.

If your posts are missing after migration using above steps then please do following thing after login to your site admin panel

ACP > Tools & Maintenance > Recount & Rebuild

How to put a global block on wp-login.php files

Recently a wide scale attacks on wp-login.php files are occurred on servers which hosted wordpress sites. So a temporary and effective fix for resolving this issues is putting a .htaccess file in /home with following entries

(less than symbol) Files tilde “^wp-login.php”>
Order deny,allow
Allow from all
satisfy all
less than symbol/Files>”

Then for clients to get access, they could just add this to their wordpress .htaccess:
satisfy

#Order deny,allow
#Deny from all
#Allow from x.x.x.x

Cpanel:Internal Server Error exit level [die] [pid=8572] (setuids failed: Could not resolve UID () or GID ()) at /usr/local/cpanel/Cpanel/Logger.pm line 433 Cpanel::Logger::logger(‘Cpanel::Logger=HASH(0xdc17e0)’, ‘HASH(0xdcf640)’) called at /usr/local/cpanel/Cpanel/Logger.pm line 306 Cpanel::Logger::die(‘Cpanel::Logger=HASH(0xdc17e0)’, ‘setuids failed: Could not resolve UID () or GID ()’) called at /usr/local/cpanel/Cpanel/AccessIds/SetUids.pm line 49

When you are trying to access your whm if you get following error message

(ERR_SSL_PROTOCOL_ERROR)

And sometimes backed up by this extensive error output

Internal Server Error

exit level [die] [pid=8572] (setuids failed: Could not resolve UID () or GID ())
at /usr/local/cpanel/Cpanel/Logger.pm line 433
Cpanel::Logger::logger(‘Cpanel::Logger=HASH(0xdc17e0)’, ‘HASH(0xdcf640)’) called at /usr/local/cpanel/Cpanel/Logger.pm line 306
Cpanel::Logger::die(‘Cpanel::Logger=HASH(0xdc17e0)’, ‘setuids failed: Could not resolve UID () or GID ()’) called at /usr/local/cpanel/Cpanel/AccessIds/SetUids.pm line 49
Cpanel::AccessIds::SetUids::setuids(‘cpanellogin’) called at cpsrvd-ssl line 4238
main::__ANON__() called at /usr/local/cpanel/Cpanel/SafeRun/InOut.pm line 28
Cpanel::SafeRun::InOut::inout(‘GLOB(0xd5f130)’, ‘GLOB(0x2011d930)’, ‘CODE(0xd54030)’, ‘/usr/local/cpanel/base/show_template.stor’, ‘docroot’, ‘/usr/local/cpanel/base’, ‘default_login_theme’, ‘cpanel’, …) called at cpsrvd-ssl line 4244
main::process_login_template(‘cpanel’, ‘login’, 1, ‘goto_uri’, ‘/’, ‘dest_uri’, ‘/’, ‘user’, …) called at cpsrvd-ssl line 2634
main::badpass() called at cpsrvd-ssl line 4716
main::handle_auth() called at cpsrvd-ssl line 993
main::handle_one_connection() called at cpsrvd-ssl line 863

Please do following things to resolve it

/etc/init.d/cpanel restart
/scripts/checkperlmodules –full –force
/etc/init.d/cpanel restart
mv /var/cpanel/sql/eximstats.sql /var/cpanel/sql/eximstats.sql.tmp_working_copy3
/scripts/restartsrv_tailwatchd
mysql eximstats < /var/cpanel/sql/eximstats.sql.tmp_working_copy3
/scripts/upcp –force

php -v command show fatal error in linux cpanel server

The above error is mainly due to miss configurations of php settings on server. Here memory_limit in php.ini may given without proper notation.

example:

memory_limit=999 incorrect
memory_limit=999M correct

If you are receiving premature end of scripts then it is better to recompile php with another version and then give a retry. If it won’t help then revert back to initial version.

socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (8 more tries)

Solution:

That means there is already a smtp program listening on Port 25. Port 25 is reserved for Exim. To find out what other application(s) is listening to Port 25, SSH to the server and run the following command:

/bin/netstat -lnp | grep 25

You can either stop or kill the application that is listening to Port 25.Then restart Exim .

to find the process listening on 25 can be find out using
lsof -w -n -i tcp:25

/scripts/restartsrv_exim

ubuntu — login screen weired issue 12.04

Solution:

LightDM is the new login screen introduced in Ubuntu 12.04 in the place of good old GDM.Changing the LightDM screen resolution in 12.04 involves little bit terminal work.

1 Open up a terminal.

2 Type or Copy and paste the below command into terminal to show your display details:

sample output :

DVI-0 connected 1680×1050+0+0 (normal left inverted right x axis y axis)
473mm x 296mm

width:1680px
height:1050px
x: 0 (distance from top left corner horizontally)
y: 0 (distance from top left corner vertically)
using the x and y values you should be able to identify which monitor is which – that is if the resolution doesn’t already give it away. As I have mentioned earlier, we need only screen identifier which is DVI-0 and your desired supported resolution from the above steps.

Open up your favorite text editor, Type or copy the below in it (You need to replace screen identifier which is “DVI-0″ in this case and “1680×1050? which is my desired resolution)

#!/bin/sh xrandr –output DVI-0 –primary –mode 1680×1050

3 Save this on your desktop as ”lightdmxrandr.sh”.

chmod a+rx lightdmxrandr.sh

4 We should move the script from desktop to somewhere more appropriate
sudo mv lightdmxrandr.sh /usr/share/

5 We need to now run this in lightdm, navigate to LightDM conf folder:

cd /etc/lightdm

6 Open up the LightDM conf file

7 Now add the line below after the last line and save – this instructs LightDM to use the resolution script we just made:

display-setup-script=/usr/share/lightdmxrandr.sh

8 Now restart your system. After log into your system it is better to run a package updates it will fix issue related to panel missing in user accounts.