MySQL: Error 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) [REVISITED]
Have you ever read my 2011 post about this error? Check this before:
After that, if you’re still getting the same error, simply try this:
$ mysql -u root -p
You’ll be prompted for root password. Type it and you’re connected to the database.
Please, share your comments below.
I noticed a lot of ORA-01652 errors while gathering some table statistics (Oracle 10g Release 2 – 10.2.0.4):
BEGIN DBMS_STATS.GATHER_TABLE_STATS('OWNER','TABLE', cascade=>true, estimate_percent=>60); END; * ERROR at line 1: ORA-01652: Unable to extend temp segment by 256 in tablespace TEMP ORA-06512: at "SYS.DBMS_STATS", line 13437 ORA-06512: at "SYS.DBMS_STATS", line 13457 ORA-06512: at line 1
When I’m trying to resize the tempfile I get an ORA-00376 error:
SQL> alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G; alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G * ERROR at line 1: ORA-00376: file 202 cannot be read at this time ORA-01110: datafile 202: '/app/oracle/oradata/temp01.dbf'
I checked the file on the filesystem and it exists and has the correct permissions:
$ ls -lrth /app/oracle/oradata/temp01.dbf -rw-r----- 1 oracle dba 15G 17 nov 02:01 /app/oracle/oradata/temp01.dbf
After bouncing the database, I try to alter again the tempfile and now I get an ORA-01516:
SQL> alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G; alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G * ERROR at line 1: ORA-01516: nonexistent log file, datafile, or tempfile '/app/oracle/oradata/temp01.dbf'
But the file is there as I checked before. With this new ORA-01516 error I checked the status of the tempfile and the error was there:
SQL> select tablespace_name , status from dba_tablespaces where tablespace_name = 'TEMP'; TABLESPACE_NAME STATUS ------------------------------ --------- TEMP ONLINE SQL> select name ,status from v$tempfile where name like '%temp%'; NAME STATUS ---------------------------------------------------------------------- /app/oracle/oradata/temp01.dbf OFFLINE
The tempfile is offline. This is because our server ran out of space this morning, as you can see in the alert log:
Errors in file /app/oracle/admin/db1/udump/db11_ora_18815.trc: ORA-01114:IO error writing block to file 202 (block # 1218066) ORA-27072: I/O error Linux-x86_64 Error: 28: No space left on device Additional information: 4 Additional information: 1218066 Additional information: -1
After freeing disk space, I try to bring back the datafile online:
SQL> alter database datafile '/app/oracle/oradata/temp01.dbf' online; alter database datafile '/app/oracle/oradata/temp01.dbf' online * ERROR at line 1: ORA-01516: nonexistent log file, datafile or tempfile '/app/oracle/oradata/temp01.dbf'
I neither can take the TEMP tablespace offline:
SQL> alter tablespace temp offline; alter tablespace temp offline * ERROR at line 1: ORA-03217: invalid option for alter of TEMPORARY TABLESPACE
The solution is to recreate the tempfile:
- First, delete the existing tempfile from the database
- Remove the file from the filesystem (rm)
- Create a new tempfile.
SQL> alter database tempfile '/app/oracle/oradata/temp01.dbf' drop; Database modified. SQL> !ls -lrt /app/oracle/oradata/temp01.dbf -rw-r----- 1 oracle dba 15728644096 17 nov 02:01 /app/oracle/oradata/temp01.dbf SQL> !rm /app/oracle/oradata/temp01.dbf SQL> alter tablespace temp add tempfile '/app/oracle/oradata/temp01.dbf' size 15000M; Tablespace modified. SQL> select name, status from v$tempfile; NAME STATUS ---------------------------------------- ------- /app/oracle/oradata/temp01.dbf ONLINE <pre>
Now the tablespace is online and everithing returns to normal.
Any questions? Please feel free to comment below.
The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.
Here’s an excerpt:
The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 85,000 times in 2014. If it were an exhibit at the Louvre Museum, it would take about 4 days for that many people to see it.
I’ve upgraded my box to a fresh Gnome Ubuntu 14.10 install. After installing some packages, and rebooting several times, I faced an error when rebooting and I cannot start the system.
I tryed the recovery option, but my system was unable to start in graphics mode, I can only get into a sudo console.
I was pretty sure that is a package recently installed that crashed my system. So I entered in a sudo console in recovery mode.
This console mounts the / filesystem in read-only mode. I needed to update the packages installed, so I also need a network connection in recovery mode. Here’s how I get it done:
mount -o remount, rw / ifconfig eth0 up dhclient eth0
First command is to mount the / filesystem in read write option (obviously). The second command raises up the ethernet device, and the third one sets an IP to the eth0 device using DHCP.
Then, I was able to recover my system with a dist-upgrade:
Do you have the same problem? Please, leave your comments below.
A few days ago I received a message in the update manager saying that New hardware support is available.
Your current Hardware Enablement Stack (HWE) is going out of support
on 2014-08-07. After this date security updates for critical parts (kernel
and graphics stack) of your system will no longer be available.
For more information, please see:
But when I try to install, I get an error regarding unmet dependencies.
I tried to update with command-line, as pointed in http://wiki.ubuntu.com/1204_HWE_EOL:
miquel@l3-ubuntu-12:~$ hwe-support-status --verbose Your current Hardware Enablement Stack (HWE) is going out of support on 2014-08-07. After this date security updates for critical parts (kernel and graphics stack) of your system will no longer be available. For more information, please see: http://wiki.ubuntu.com/1204_HWE_EOL To upgrade to a supported (or longer supported) configuration: * Upgrade from Ubuntu 12.04 LTS to Ubuntu 14.04 LTS by running: sudo do-release-upgrade OR * Install a newer HWE version by running: sudo apt-get install linux-generic-lts-trusty libgl1-mesa-glx-lts-trusty xserver-xorg-lts-trusty linux-image-generic-lts-trusty and reboot your system.
As my hardware is very old, I decided to install a new HWE version, rather than upgrading to 14.04 LTS, but I’m getting this errors:
$ sudo apt-get install linux-generic-lts-trusty libgl1-mesa-glx-lts-trusty xserver-xorg-lts-trusty linux-image-generic-lts-trusty Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libgl1-mesa-glx-lts-trusty : Depends: libglapi-mesa-lts-trusty (= 10.1.3-0ubuntu0.1~precise1) but it is not going to be installed Recommends: libgl1-mesa-dri-lts-trusty (>= 7.2) but it is not going to be installed xserver-xorg-lts-trusty : Recommends: libgl1-mesa-dri-lts-trusty but it is not going to be installed Recommends: xserver-xorg-input-all-lts-trusty but it is not going to be installed Recommends: xserver-xorg-video-all-lts-trusty but it is not going to be installed Recommends: x11-xserver-utils-lts-trusty but it is not going to be installed Conflicts: libglapi-mesa:i386 (>= 0~) E: Unable to correct problems, you have held broken packages. miquel@l3-ubuntu-12:~$ lsb_release -d Description: Ubuntu 12.04.4 LTS miquel@l3-ubuntu-12:~$ uname -a Linux l3-ubuntu-12 3.5.0-54-generic #81~precise1-Ubuntu SMP Tue Jul 15 04:02:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
As posted in http://wiki.ubuntu.com/1204_HWE_EOL:
End-of-life (EOL) for 12.04, 12.04.1, and 12.04.5 HWE is April 2017 but for the other HWE stacks it is roughly when 14.04.1 is released: Aug 8, 2014.
After googling for a while, I found this post in Ubuntu forums: http://ubuntuforums.org/showthread.php?t=2234693. It’s seems safe to stay with the old HWE stack if you are not planning to use new hardware. Security fixes for the kernel will still be released.
So, until the update procedure is being more mature, I will stay with the old HWE stack.
Thanks to @Michael.Ford comment, I managed to install the new HWE stack following his instructions. I needed a dist-upgrade to finish the installation process.
$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get dist-upgrade $ sudo apt-get install linux-generic-lts-trusty linux-image-generic-lts-trusty
I was on 3.5.x kernel and now I’m on 3.13.x kernel, and I’m on 12.04.5 LTS release:
$ uname -a Linux l3-ubuntu-12 3.13.0-33-generic #58~precise1-Ubuntu SMP Wed Jul 30 21:46:30 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"
And now the output of hwe-support-status is different:
$ hwe-support-status --verbose Your current Hardware Enablement Stack (HWE) is no longer supported since 2014-08-07. Security updates for critical parts (kernel and graphics stack) of your system are no longer available. For more information, please see: http://wiki.ubuntu.com/1204_HWE_EOL There is a graphics stack installed on this system. An upgrade to a supported (or longer supported) configuration will become available on 2014-07-16 and can be invoked by running 'update-manager' in the Dash.
Thanks again to @Michael.Ford. What’s your opinion about the HWE end of support on Ubuntu 12.04? Have you decided to update to 14.04 LTS? Feel free to comment below.
I’m trying to configure an incoming email service for receiving issues via email in a Redmine server for a company.
The company uses Lotus Notes and for security reasons, I cannot read email using POP3 or IMAP, only with notes client or notes iWeb. I need an account (email@example.com) but the company does not generate generic accounts. I neither can use a Gmail account, because they use an authenticated proxy and it’s not possible to check the gmail account (neither I can check another user’s account in the same company). Crazy!
I don’t need to send mails from this account. At least I can use their SMTP server to send the redmine’s mails.
The solution is to create a local mail transfer agent (I’ll use Postfix) in the server where redmine is installed, create a local mail account (firstname.lastname@example.org), and then redirect all the mail from the user account that administers the redmine to this local account. A bit convoluted, I know, but I have no other choice.
Postfix is a well known Mail Transfer Agent (MTA), and it’s an alternative to the also widely used Sendmail MTA. We’ll use also Courier IMAP and Courier POP3 to retrieve emails. If you want a more detailed explanation, have a look at this Ubuntu HowTo:
In this post I will focus only on the installation and configuration process. This is a schema of our final result (taken from the Ubuntu HowTo):
The first step is to install postfix:
$ sudo apt-get install postfix
You’ll be prompted for your server type. Choose “Internet site”:
And then enter your domain name (example.org, or in my case l3-ubuntu-12.com):
Once installed, edit the /etc/postfix/main.cf file and add this lines at the end of the file:
inet_protocols = ipv4 home_mailbox = Maildir/
We are telling postfix to use IPv4 protocol, and that the folder where the mail will be saved (home/username/Maildir). Extract from the Ubuntu HowTo:
Maildir is a format for an e-mail spool that does not require file locking to maintain message integrity because the messages are kept in separate files with unique names. A Maildir is a directory (often named Maildir) with three subdirectories named tmp, new, and cur. The subdirectories should all reside on the same filesystem.
Another reason to use Maildir format is that Courier IMAP/POP3 servers only work with Maildir format of mailboxes.
Restart postfix to get the new configuration:
$ sudo service postfix restart * Stopping Postfix Mail Transport Agent postfix [ OK ] * Starting Postfix Mail Transport Agent postfix [ OK ]
Install Courer POP3 and Courier IMAP
To retrieve the emails from our MailBox, we’ll to install Courier POP3 and Courier IMAP:
$ sudo apt-get install courier-pop
When prompted for creating web-based administration directories, answer No:
Then install Courier IMAP:
$ sudo apt-get install courier-imap
To make some tests sending emails, we need a mail client. Bsd-mailx is a simple command-line mail client:
$ sudo apt-get install bsd-mailx
Install Mozilla Thunderbird
Finally, to make the final tests, we’ll install Mozilla Thunderbird. If you haven’t already installed, just type:
$ sudo apt-get install thunderbird
Testing the installation
First of all, test your mail server:
$ telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 l3-ubuntu-12 ESMTP Postfix (Ubuntu) quit 221 2.0.0 Bye Connection closed by foreign host.
Lets create some users to test our mail server. Answer the questions to create the users:
$ sudo adduser user1 $ sudo adduser user2
Now change to user1 and send an email to user2:
- To send a mail to user2, type mail user2
- Write the subject of the email and press [Enter]
- Write the body of the email and press [Enter]
- To send the mail, write a dot (.) and press [Enter]
$ su user1 Password: user1@l3-ubuntu-12:/home/user1$ mail user2 Subject: test mail from user1 This is a test mail from user1 . EOT
Now check if the email has arrived to user2. To avoid the “Cannot open display” message:
$ su user2 Contrasenya: user2@l3-ubuntu-12:/home/user2$ thunderbird No protocol specified No protocol specified No protocol specified No protocol specified Error: cannot open display: :0
switch to user2 with sux. Sux is a wrapper around su to transfer your X credentials, thus you can open Thunderbird with user2 (install with sudo apt-get install sux):
$ sux user2 Password: xauth: file /home/user2/.Xauthority does not exist user2@l3-ubuntu-12:/home/user2$ thunderbird
Open Thunderbird and create a new account:
Press Skip this and use my existing email:
Enter the user2 account settings:
Press Continue. If you get this error:
Thunderbird failed to find the settings for your email account
Then restart postfix and try again:
$ sudo service postfix restart
Now the configuration must be retrieved. I choose the POP3 configuration for my email account:
And press Done. You get this warning screen because we are not using encryption (maybe in a later post, for the purpose of testing the email it’s enough with this). Check I understand the risks and press Done.
If you try to send a message you’ll get this error:
You have to get the local certificate and confirm the security exception to send mails:
And now just pray for this to work in the foo company!
Do you liked this HowTo? PLease leave your comments below.
As you may know, UbuntuOne file services will be shutting down as of 1st of June (http://blog.canonical.com/2014/04/02/shutting-down-ubuntu-one-file-services/).
You can download now all the files loggin in to your account. This welcome screen is displayed:
And you can download all your stuff in. Just get the downloader for your OS, uncompress it and execute the u1_downloader. You’ll be prompted for your username/password and then the download begins:
$ ./u1_downloader U1 email: ubuntuoneusername U1 password: ubuntuonepassword Total: 2164761533 bytes [...]
Hurry up, you only have until 31 July 2014. After that date, all remaining content will be deleted!
Please, leave your comments below.