Posts Tagged ‘issue’
Friday, June 20th, 2014
I recently migrated MySQL database server from host A to host B (remotesystemadministration.com), because I wanted to have the mysql database server on a separate machine (have separation of server running services and have a dedicated mysql server).
MySQL server host (running on localhost previously was set from my mysql config – my.cnf to listen and serve connections on localhost with
bind-address = 127.0.0.1
). MySQL is used by a Tomcat running Java application on localhost and my task was to set the Tomcat to use the MySQL database remotely to MySQL host B (new remote hostname where MySQL is moved is remotesystemadminsitration.com and is running on IP 83.228.93.76).
Migration from MySQL Db server 1 (host A) to MySQL Db server 2 (host B) is done by binary copying the mysql database directory which in this case is (as it is a Debian server installed MySQL), the standard directory where mysql stores its database data is /var/lib/mysql ( datadir = /var/lib/mysql in /etc/mysql/my.cnf)
Binary copying of data from MySQL db (host A) to MySQL Db (host B) is done with rsync
After migrating and trying to login on migrated mysql database on remotesystemadministration.net with mysql cli client:
remotesysadmin:~$ mysql -u root -p
I got following error:
ERROR 1045 (28000): Access denied for user 'root'@'remotesystemadministration.com' (using password: YES)
To fix the issue I had to login remotely from old migration server mysql (host A) cli:
mysql:~$ mysql -u root -p -h remotesystemadministration.com
and run SQL commands:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'remotesystemadministration.com' WITH GRANT OPTION;
GRANT USAGE ON *.* TO 'root'@'remotesystemadministration.com' IDENTIFIED BY 'secret-mysql-pass';
FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.03 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Another way to solve the problem is to add the root user to be able to connect from any host (Enable MySQL root access from all host), to do so issue:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Note: In newer version of MySQL, flush privileges could be omitted.
Another approach if you want to substitute access from localhost for all users and enable all users to be able to authenticate to mysql remotely is to execute SQL Query:
UPDATE USER SET host='%' WHERE host='localhost';
Allowing all users to be able to connect from anywhere on the internet is a very bad security practice anyways, if you already have a tight firewall setup and you can only access the server via specific remote IP addresses allowing MySQL access from all hosts / ips should be ok.
Tags: com, config, copying, ERROR, issue, Java, lib, localhost, migration, mysql database, mysql database server, net, remotesystemadministration, root, running, task, var
Posted in MySQL, Programming, System Administration | No Comments »
Wednesday, July 2nd, 2014
If you get a MySQL error like:
Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
This most likely means your PHP / Java whatever programming language application connecting to MySQL is failing to authenticate with the application created (existing) or that the application is trying too many connections to MySQL in a rate where MySQL server can't serve all the requests.
Some common errors for Too many Connection errors are:
- Networking Problem
- Server itself could be down
- Authentication Problems
- Maximum Connection Errors allowed.
The value of the max_connection_errors system variable determines how many successive interrupted connection requests are permitted to myqsl server.
Well anyways if you get the:
Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
You can consider this a sure sign application connections to MySQLis logging a lot of error connections, for some reason.
This error could also appear on very busy websites where high amount of separete connections are used – I've seen the error occur on PHP websites whether mysql_pconnect(); is selected in favour of the prooved working mysql_connect();
The first thing to do before changing / increasing default set of max connection errors is to check how many max connection errors are set within MySQL?
For that connect with MySQL CLI and issue:
mysql> SHOW VARIABLES LIKE '%error%';
+——————–+————————————————————-+
| Variable_name | Value |
+——————–+————————————————————-+
| error_count | 0 |
| log_error | /var/log/mysql//mysqld.log |
| max_connect_errors | 10000 |
| max_error_count | 64 |
| slave_skip_errors | OFF |
+——————–+————————————————————-+
A very useful mysql cli command in debugging max connection errors reached problem is
mysql> SHOW PROCESSLIST;
To solve the error, try to tune in /etc/my.cnf, /etc/mysql/my.cnf or wherever my.cnf is located:
[mysqld]
max_connect_errors variable
and
wait_timeout var. Some reasonable variable size would be:
max_connect_errors = 100000
wait_timeout = 60
If such (anyways) high values is still not high enough you can raise mysql config connection timeout
to
max_connect_errors = 100000000
Also if you want to try raise max_connect_errors var without making it permanenty (i.e. remember var setting after MySQL service restart), set it from MySQL cli with:
SET GLOBAL max_connect_errors
If you want to keep the set default max_connection_errors and fix it temporary, you can try to follow the error
Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
suggestion and issue in root console:
mysqladmin flush-hosts
Same could also be done from MySQL Cli with cmd:
FLUSH HOSTS;
Tags: application, cnf, config, connection, connection timeout, default, fix, issue, lot, mysqladmin, programming language, reason, setting, size, suggestion, system
Posted in Everyday Life, MySQL, System Administration, Various | 3 Comments »
Wednesday, August 13th, 2014
I had to fix recently another Windows XP infected with plenty of malicious malware. I've used tips from http://malwaretips.com/blogs/ and launch all suggested tools to cleanup the PC. Some few thousands of infections were cleaned and the PC started working much better than earlier, however still there was one weird issue on the Windows XP desktop there was an .exe file hanging with 0 bytes size and whenever I tried to delete the file either from GUI or command line with (del command) it refused to delete with error:
The process cannot access the file because it is being used by another process.
Well the message clearly shows, the file can't be deleted because some program was using it however I couldn't see any program that has locked the .exe file. I've checked that in (Windows Task Manager) run from
Start -> Run:
taskmgr
I've done a quick search online to see, whether someone has fixed the issues, and saw many threads talking about the issue suggesting that the issue got solved Windows XP OS re-install, as this was not an option for me because the PC's reinstall would be at least a 2 day time work, plus it contains some programs which will probably be hard to freshly install, because they're no longed supported.
Finally I've seen in this thread suggestion to try to kill Windows Explorer after you have opened windows with windows cmd.exe because this will prevent the .exe file being locked by Windows Explorer and will allow it to be deleted with del command. This actually worked. I've launched
Start -> Run
taskmgr
and
cmd.exe
Found explorer.exe process and killed it, this makes the whole desktop (icons, start menu etc. disappear) – as Windows Explorer is main managing Windows app. Then using Alt+Tab to switch to Command Prompt window deleted it with:
del Process_that_cannot_be_killed.exe
And finally succesfully deleted it 🙂
Tags: Cannot Delete, Desktop, desktop icons, exe, file, issue, online, Pc, process, threads, windows explorer, Windows Task Manager
Posted in Everyday Life, System Administration, Various, Windows | No Comments »
Monday, October 27th, 2014
Recently, I've upgraded to latest as of time of writting WordPress 4.0. The upgrade went fine however after upgrade even though I've upgraded also the CKEdit for WordPress, Visual Editor stopped working. To solve the issue, my logical guess was to try to disable CKEditor:
(Plugins -> Ckeditor for WordPress (Deactivate)
However even after disabling, default WP Visual Editor continued to be not showing properly – e.g. the Publish / Save Draft / Preview buttons pane as well as the usual format text menu buttons (set text to Italic, Bold, Underline Text, Create New Paragraph etc.) was completely missing and it was impossible to write anything in the text edit box like you see in below screenshot:
I've red a lot on the internet about the issue and it seem a lot of people end up with the WordPress broken Visual Editor issue after upgrading to WP 3.9 and to WordPress 4.0. A lot of people did came to a fix, by simply disabling all WP plugins and enabling them one by one, however as I have about 50 WordPress plugins enabled in my WP blog disabling every plugins and re-enabling was too time consuming as I had to first write down all the plugins enabled and then re-enable them one by one by hand (after re-installing the wordpress version) testing after each whether the editor works or not ..
Therefore I skipped that fix and looked for another one. Other suggestions was to:
Edit wp-includes/css/editor.min.css and include at the end of file:
.mce-stack-layout{margin-top:20px}.wp-editor-container textarea.wp-editor-area{margin-top:67px;}
I've tried that one but for me this didn't work out ..
There were some people reporting certain plugins causing the visual editor issues such reported were:
- NextScripts: Social Networks Auto-Poster
- Google Sitemaps – Append UTW Tags
- Google XML Sitemaps
- TinyMCE Advanced (some suggested replacing TinyMCE and related scripts)
- JS & CSS Script Optimizer … etc.
There were some suggestions also that the issues with Editor could be caused by the Used Blog Theme. It is true I'm using very Old WordPress theme, however as I like it so much I didn't wanted to change that one ..
Others suggested as a fix adding to site's wp-config.php:
define('CONCATENATE_SCRIPTS', false);
Unfortunately this doesn't work either.
Finally I've found the fix myself, the solution is as simple as disabling WordPress Visual Editor:
To disable WP Visual Editor:
1. Go to Upper screen right corner, after logged in to wp-admin (A drop down menu) with Edit My Profile will appear::
2. From Profile screen to appear select Disable the visual editor when writing scroll down to the bottom of page and click on Update Profile button to save new settings:
That's all now the Post / Edit of an Article will work again with text buttons only.
Tags: Editor Post, fine, fix, How to, issue, lot, menu buttons, php, time, upgrade, Wordpress Visual Editor, working, wp
Posted in Everyday Life, Various, Web and CMS, Wordpress | No Comments »
Wednesday, May 25th, 2011 I have a pirate version of Windows XP Pro 2 installer CD which does automatically turn on Windows Genuine Advantage
This is kind of annoying as the computer gets really slow and the hard disk drive activite gets intensive as well as an annoying popup message that the Windows XP copy is not genuine does appear periodically
In order to get rid of the message I had to do the following steps:
1. Get into Windows Safe Mode without Networking
As most of the people knows this is achieved by pressing F8 keyboard key right before the Windows bootup screen appears.
After in Safe mode it’s necessery to,
2. Run Windows Command Line (cmd.exe)
To do so follow, the menus:
Windows (Start Menu) -> Run -> cmd.exe
3. In the command prompt window issue the commands:
C:Documents and SettingsUser> cd WindowsSystem32
C:WindowsSystem32> taskkill -IM wgatray.exe
C:WindowsSystem32> del wgatray.exe
C:WindowsSystem32> move wgalogon.dll wgalogon.dll.old
C:WindowsSystem32> del wgalogon.dll.old
Something to mention is you have to be really quick, with deleting wgalogon.dll, cause wgatray.exe is scheduled to run every 1 / 2 seconds 🙂 It is a bit of situation of type “be quick or be dead” as Maiden used to sing 🙂
A Windows system restart and Hooray the Windows Genuine message is gone 🙂
Tags: activite, Advantage, c documents, command, Computer, Disk, documents and settings, drive, exec, hard disk drive, issue, keyboard, kind, menu, menus, necessery, Networking, oldA, oldC, order, pirate version, popup, popup message, Start, taskkill, User, version, wgalogon, wgatray, windows command, windows safe mode, windows system, windows xp, windows xp copy, windows xp sp2
Posted in Windows | 2 Comments »
Monday, July 4th, 2011 On a couple of occasions, I’ve had the issue of loosing / forgetting a MySQL password at other times I had to login to servers which contained MySQL servers with a password I don’t know.
In any of this occasions I was required to restore the ROOT access to the mysql server.
Sadly recoving a mysql lost root password is not really possible in a easy way, thus in most cases the only option one have is to stop the mysql server and run it again in a special skip-grant-tables mode, which runs the server in a sort of passwordless safe mode and makes it accessible without admin password through mysql cli .
To Omit the password check the skip-grant-table option instructs the MySQL server not to check in mysql.user while any request to connect with mysql client to the server is made.
Therefore one can login to the mysql server passwordless and reset the current (lost) password to another one.
Thease can be achived in the following four easy steps:
1. Stop the MySQL server
mysql:~# /etc/init.d/mysqld stop
2. Run the mysql server with the –skip-grant-tables option
mysql:~# mysqld_safe --skip-grant-tables &
3. Login to the mysql and change current mysql root password
mysql:~# mysq -u root
mysql> UPDATE user SET password=PASSWORD('yournewpassword')
WHERE user='root';
mysql> FLUSH privileges;
4. Stop and Start the Mysql server again
mysql:~# killall -9 mysqld_safe
mysql:~# /etc/init.d/mysqld start
..
Now the new mysql password will be identical to the yournewpassword . Cheers 😉
Tags: amp, Cheers, cli, client, couple, FLUSH, issue, killall, login, Mode, mysq, mysql password, mysql servers, mysqld, occasions, password, password check, Privileges, request, root, root password, safe mode, safemysql, server root, servermysql, Set, sort, Stop, thease, update, way, WHERE
Posted in Linux, MySQL, System Administration | No Comments »
Wednesday, April 27th, 2011 As you can read in my few previous posts I have just installed a new Ubuntu 10.10 on a Toshiba Satellite L40 notebook.
Most of the things which are necessery for a fully working Linux desktop are already installed and the machine works fine, however I just noticed there is an issue with the default torrent gnome client and transmission unable to download files from torrent trackers.
Few minutes of playing with the transmission’s settings has revealed what was causing my torrent download problems.
It seems on Ubuntu 10.10 (probably on other Ubuntus and Debians) by default the transmission bittorrent client is trying to use for torrent download connections an incoming port 53636 number.
As the computer is behind a firewall and does not have a real IP address seeders cannot properly connect to the notebook port 53636 and hence the transmission bittorrent client could not initialize any torrent downloads.
Fixing up the issue is rather easy to fix it I had to change the settings in transmission from the menus:
Edit -> Settings -> Network
You need to select the options:
- Pick a random port on startup
- Use UPnP or NAT-PMP to redirect connections
Next I had to restart transmission and my torrent downloads started 😉
Tags: bittorrent, client, Computer, connectionsNext, Desktop, download, few minutes, fine, firewall, Gnome, gnome client, incoming port, Initialize, ip address, issue, Linux, maverick, menus, NAT-PMP, necessery, notebook, port, random port, redirect, Satellite, torrent download, torrent tracker, torrent trackers, toshiba, toshiba satellite, tracker, Ubuntu, Ubuntus, UPnP
Posted in Linux, Linux and FreeBSD Desktop | 4 Comments »
Wednesday, August 17th, 2011 One server recently installed with Qmail + Vpopmail and Squirrelmail had just been reported to me that the webmail is failing to properly login existent users on the server via the IMAP protocol.
I’ve checked on port 143 to see if couriertpcd process is properly listening with netstat -tlnp as well as used telnet to check if I can normally connect with telnet to the imap port and it seemed there is no issue with IMAP
Further on I checked /var/log/mail.log and there I found the following error message popping up:
Aug 17 08:56:27 mail-serv imapd: LOGIN FAILED, user=hipo@mail-serv.com, ip=[::ffff:127.0.0.1]
Aug 17 08:56:27 mail-serv imapd: authentication error: Connection refused
Aug 17 08:56:29 mail-serv imapd: Connection, ip=[::ffff:127.0.0.1]
Aug 17 08:56:29 mail-serv imapd: authdaemon: s_connect() failed: Connection refused
Aug 17 08:56:29 mail-serv imapd: [Hint: perhaps authdaemond is not running?]
The error was shown each time I do get a failure in Squirrelmail in my browser to connect to IMAP with the error:
ERROR: Connection dropped by IMAP server.
As the log revealed the courier-authdaemond was not up and running on the system. I thus launched it :
qmail:~# /usr/local/sbin/authdaemond stop
qmail:~# /usr/local/sbin/authdaemond start
qmail:~# /etc/init.d/imap start
I’ve later on figured out the strange, was caused because of a server reboot, during boot process authdaemond did not properly load up, therefore to prevent future problems like this one, I’ve put authdaemond and /etc/init.d/imap scripts to load up via /etc/rc.local :
qmail:~# echo '/usr/local/sbin/authdaemond stop' >> /etc/rc.local
qmail:~# echo '/usr/local/sbin/authdaemond start' >> /etc/rc.local
qmail:~# echo '/etc/init.d/imap start' >> /etc/rc.local
Tags: authdaemon, authentication error, boot, boot process, browser, com, connection, connection ip, ERROR, error error, error message, failure, ffff, imap port, imap protocol, IMAPFurther, issue, localqmail, login, mail, mail log, nbsp, port, port 143, Protocol, Qmail, Reboot, sbin, scripts, squirrelmail, startI, startqmail, Stop, time, usr, var, vpopmail
Posted in Linux, Qmail, System Administration | No Comments »
Sunday, February 26th, 2012 In my last article, I've explained How to create PNG, JPG, GIF pictures from one single PDF document
Convertion of PDF to images is useful, however as PNG and JPEG graphic formats are raster graphics the image quality gets crappy if the picture is zoomed to lets say 300%.
This means convertion to PNG / GIF etc. is not a good practice especially if image quality is targetted.
I myself am not a quality freak but it was interesting to find out if it is possible to convert the PDF pages to SVG (Scalable Vector Graphics) graphics format.
Converting PDF to SVG is very easy as for GNU / Linux there is a command line tool called pdf2svg
pdf2svg's official page is here
The traditional source way compile and install is described on the homepage. For Debian users pdf2svg has already existing a deb package.
To install pdf2svg on Debian use:
debian:~# apt-get install --yes pdf2svg
...
Once installed usage of pdf2svg to convert PDF to multiple SVG files is analogous to imagemagick's convert .
To convert the 44 pages Projects.pdf to multiple SVG pages – (each PDF page to a separate SVG file) issue:
debian:~/project-pdf-to-images$ for i in $(seq 1 44); do \
pdf2svg Projects.pdf Projects-$i.SVG $i; \
done
This little loop tells each page number from the 44 PDF document to be stored in separate SVG vector graphics file:
debian:~/project-pdf-to-images$ ls -1 *.svg|wc -l
44
For BSD users and in particular FreeBSD ones png2svg has a bsd port in:
/usr/ports/graphics/pdf2svg
Installing on BSD is possible directly via the port and convertion of PDF to SVG on FreeBSD, should be working in the same manner. The only requirement is that bash shell is used for the above little bash loop, as by default FreeBSD runs the csh.
On FreeBSD launch /usr/local/bin/bash, before following the Linux instructions if you're not already in bash.
Now the output SVG files are perfect for editting with Inkscape or Scribus and the picture quality is way superior to old rasterized (JPEG, PNG) images
Tags: Auto, bash shell, bsd users, command line tool, Convert, Converting, convertion, crappy, deb, deb package, debian project, debian users, document, documentConvertion, Draft, editting, format, freak, GIF, gnu linux, graphic formats, Graphics, graphics format, graphics graphics, homepage, Image, image quality, ImageMagick, inkscape, issue, JPG, jpg gif, line, Linux, nbsp, number, package, page, pdf document, picture, png, png images, Projects, raster graphics, rasterized, Scalable, scalable vector graphics, Scribus, Shell, svg file, svg files, tool, traditional source, use, vector, way
Posted in Linux, Linux and FreeBSD Desktop, System Administration | No Comments »
Wednesday, December 22nd, 2010 My blog’s index has suddenly started redirecting to my last post. That was rather strange, since I haven’t done anything special, all I did before the problem occured was a change in wordpress wp-admin to my latest post.
There in I changed the post Visibility from Public to Private
Right after this my blog’s home started redirecting to the blog post where the changes was made.
This was really strange, so I reverted back the changes in Post’s Publish Visibility to the default setting.
Though the change the redirect to the latest post by accessing my www.pc-freak.net/blog/ was still there.
I tried completely wiping out the post by sending it to Trash and issuing the same post again, but now things became even worser.
Accessing my blog was opening 404 not found error message . Everything seemed fine in wordpress admin and therefore I suspected the redirect is being applied from info read in my wordpress database in MySQL.
A bit of investigation prooved my guess was correct, for some reason a record was made to the MySQL blog database in table wp_redirection_items.
The incorrect redirection wihtin the database looked like so:
| 4 | /blog/ | 0 | 2 | 0 | 0000-00-00 00:00:00 | 2 | enabled | url | 301 | /blog/how-to-change-from-default-main-menu-to-other-text-in-joomla/ | url | NULL |
Removing the incorrect redirect was kind of easy and came to simply issuing:
mysql> delete from wp_redirection_items where id='3';
Query OK, 1 row affected (0.00 sec)
This fixed the redirection issue and opening my blog main page started correctly opening the main page again! 🙂
Tags: blog, change, error message, everything, fine, freak, guess, home, How to fix wordpress blog sudden redirection to present post problem, info, investigation, issue, kind, null, page, private right, Public, Publish, Query, read, reason, redirect, redirection, visibility, wihtin, worser, www
Posted in Joomla, Various | 3 Comments »