July 29th, 2014 | Tags: , , , ,

This can happen on other Linux distributions, however in this case I found it on Voyage Linux, which is a Linux distribution for embedded hardware.

The Error

Here we are dealing with an annoyance whenever you use apt-get or aptitude.

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 1.)
debconf: falling back to frontend: Readline

The Fix

Simply install dialog, which is the package it is not finding.  This will no longer need the failback to readline.

# apt-get install dialog

Once the dialog package has been installed the issue will no longer occur on subsequent runs of apt-get or aptitude.

July 28th, 2014 | Tags: , , , ,

Voyage Linux is an embedded linux distribution.  I use it on some ALIX boards I have lying around, it is very stripped down, and as such there are a few annoyances which we have to fix.

The Error

This issue happens when attempting to install/upgrade packages using apt-get or aptitude.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

The Fix

We simply need to set the locales to use en_US.UTF-8 or whichever locale is correct for your situation.

# locale-gen --purge en_US.UTF-8
# echo "LANG=en_US.UTF-8" >> /etc/default/locale
# update-locale

Now subsequent runs of apt-get or aptitude will no longer generate the error.

July 9th, 2014 | Tags: , ,

Today we are going to go through the process of splitting a zpool.  This is not something that you will do often, but when you do it, you must be very precise and do it properly.

Create Our Test Zpool

First we will create a ZFS to hold our disk images.

# zfs create rpool/testdisks

Next we will create the disk images.

# mkfile 1g /rpool/testdisks/disk0
# mkfile 1g /rpool/testdisks/disk1
# mkfile 1g /rpool/testdisks/disk2
# mkfile 1g /rpool/testdisks/disk3

Finally we will create our zpool, which in this case is tank.

# zpool create tank mirror /rpool/testdisks/disk0 /rpool/testdisks/disk1

Examine Our Zpool

Lets take a look at our zpool.

# zpool status

pool: tank
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/rpool/testdisks/disk0 ONLINE 0 0 0
/rpool/testdisks/disk1 ONLINE 0 0 0

Lets also check the guid, this is the identifier of the zpool, this must be unique on the system.

# zpool get guid tank
NAME PROPERTY VALUE SOURCE
tank guid 1170921204903719619 -

Expand Our Zpool

This step isn’t required, however I feel it is more illustrative of what we are doing if we have a larger pool.

# zpool add tank mirror /rpool/testdisks/disk2 /rpool/testdisks/disk3

Review the differences in the pool, since adding additional disks, notice we still have redundancy.

# zpool status tank
pool: tank
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/rpool/testdisks/disk0 ONLINE 0 0 0
/rpool/testdisks/disk1 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
/rpool/testdisks/disk2 ONLINE 0 0 0
/rpool/testdisks/disk3 ONLINE 0 0 0

errors: No known data errors

Split the Zpool

Now we will split the pool.

# zpool split tank tank2 /rpool/testdisks/disk1 /rpool/testdisks/disk3

Import the Second Zpool

Since we used the split command we are able to import the second pool as it now has a different guid.

# zpool import -d /rpool/testdisks/
pool: tank2
id: 2770700438906871327
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

tank2 ONLINE
/rpool/testdisks/disk1 ONLINE
/rpool/testdisks/disk3 ONLINE
# zpool import -d /rpool/testdisks/ tank2

Compare the Guids of the Zpools

Lets confirm that the GUIDs are in fact different.

# zpool get guid tank
NAME PROPERTY VALUE SOURCE
tank guid 1170921204903719619 -
# # zpool get guid tank2
NAME PROPERTY VALUE SOURCE
tank2 guid 2770700438906871327 -

There you go those are definitely different.

July 8th, 2014 | Tags: , ,

I ran into a painful issue on Fedora 20 with SQL Developer.  Basically every time it was launched via the shortcut it would go through loading, and then disappear.

Manual Invocation of SQL Developer

When launching it via the script itself it gives us a little more information.

$ /opt/sqldeveloper/sqldeveloper.sh

Oracle SQL Developer
Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.

&nbsp;

LOAD TIME : 279#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000038a1e64910, pid=12726, tid=140449865832192
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x00000038a1e64910
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/sqldeveloper/sqldeveloper/bin/hs_err_pid12726.log
[thread 140449881597696 also had an error]
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
/opt/sqldeveloper/sqldeveloper/bin/../../ide/bin/launcher.sh: line 611: 12726 Aborted (core dumped) ${JAVA} "${APP_VM_OPTS[@]}" ${APP_ENV_VARS} -classpath ${APP_CLASSPATH} ${APP_MAIN_CLASS} "${APP_APP_OPTS[@]}"

I also noticed, that while executing as root it worked.  However that clearly isn’t the “solution”

Fixing the Problem

Here we need to remove the GNOME_DESKTOP_SESSION_ID as part of the script.

$ cat /opt/sqldeveloper/sqldeveloper.sh
#!/bin/bash
unset -v GNOME_DESKTOP_SESSION_ID
cd "`dirname $0`"/sqldeveloper/bin && bash sqldeveloper $*

Once this was completed, SQL Developer launched clean for me.

July 7th, 2014 | Tags: , , ,

Today we are going to go through the process of installing MySQL Server Community Edition on Fedora 20.  You could of course simply use MariaDB, but this will focus on the Community Edition.

Install the MySQL Repository

We will need to install the MySQL Community Repository, the MySQL project hosts an RPM file with the repository.  First lets look at the repositories that I have already.

# yum repolist
Loaded plugins: langpacks, refresh-packagekit
repo id repo name status
adobe-flashplayer Adobe Flash Player - x86_64 2
fedora/20/x86_64 Fedora 20 - x86_64 38,597
google-chrome Google Chrome - x86_64 3
oracle-virtualbox/20/x86_64 Oracle VirtualBox - x86_64 10
rpmfusion-free/20/x86_64 RPM Fusion for Fedora 20 - Free 468
rpmfusion-free-updates/20/x86_64 RPM Fusion for Fedora 20 - Free - Updates 464
rpmfusion-nonfree/20/x86_64 RPM Fusion for Fedora 20 - Nonfree 203
rpmfusion-nonfree-updates/20/x86_64 RPM Fusion for Fedora 20 - Nonfree - Updates 299
updates/20/x86_64 Fedora 20 - x86_64 - Updates 17,616
repolist: 57,662

Now lets install the release file.  Keep in mind, you can do a separate wget or curl to download the file, or you can use the command as I have.  As of the time of this writing there are also repositories for Fedora 18 and 19 and Enterprise Linux 5, 6 and 7 (beta).  Though the only procedures I have validated are the Fedora 20, they should all work the same.

# yum localinstall http://dev.mysql.com/get/mysql-community-release-fc20-5.noarch.rpm

Now lets compare our new repositories to our old and we will see it has added 3 repositories, mysql56-community, mysql-tools-community and mysql-connectors-community

# yum repolist
Loaded plugins: langpacks, refresh-packagekit
repo id repo name status
adobe-flashplayer Adobe Flash Player - x86_64 2
fedora/20/x86_64 Fedora 20 - x86_64 38,597
google-chrome Google Chrome - x86_64 3
mysql-connectors-community/20/x86_64 MySQL Connectors Community 14
mysql-tools-community/20/x86_64 MySQL Tools Community 8
mysql56-community/20/x86_64 MySQL 5.6 Community Server 57
oracle-virtualbox/20/x86_64 Oracle VirtualBox - x86_64 10
rpmfusion-free/20/x86_64 RPM Fusion for Fedora 20 - Free 468
rpmfusion-free-updates/20/x86_64 RPM Fusion for Fedora 20 - Free - Updates 464
rpmfusion-nonfree/20/x86_64 RPM Fusion for Fedora 20 - Nonfree 203
rpmfusion-nonfree-updates/20/x86_64 RPM Fusion for Fedora 20 - Nonfree - Updates 299
updates/20/x86_64 Fedora 20 - x86_64 - Updates 17,616
repolist: 57,741

Install MySQL Server Community

Now that we have the repository we can use yum list to determine what version is available.

# yum list mysql-community-server
Loaded plugins: langpacks, refresh-packagekit
Available Packages
mysql-community-server.x86_64 5.6.19-1.fc20 mysql56-community

Then we can do a yum install to actually perform the install.

# yum install mysql-community-server

Enable the MySQL Server Software

Now we will set the mysqld service to start on reboot.

# systemctl enable mysqld
ln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/mysql.service'
ln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/multi-user.target.wants/mysqld.service'

Now manually start the mysqld service.  For a development environment, I also added bind-address=127.0.0.1 to /etc/my.cnf under the [mysqld] section.

# service mysqld start
Redirecting to /bin/systemctl start mysqld.service

Install MySQL Workbench Community

Now that we have the repository enabled we can also install additional software such as MySQL Workbench.

# yum install mysql-workbench
Page 1 of 2812345...1020...Last »
TOP