Jun 30, 2013

Updated from Fedora 18 to Schroedingers Cat ( FEdora 19 )

I updated from Fedora 18 to 19 with fedup

fedup --network 19 --reboot 

Updated worked without problems, but the default-boot  didn't succeed to complete.

My /var isn't on a separted lvm partition. After finding out that the default language is now english in the
ASCII-Screens, I could log in and see with journalctl -xb what problems occured.

After mkdir /var/log and a reboot, the system came back online with the Gnome-Login screen.

Jun 26, 2013

print with lpd on AIX to a printer over a CUPS installation on a Solaris 10 system

I had the need of beeing able to print on a spool printer on an AIX 6.1 system.

The installation of a SystemV LPD-Service was more ore less straight forward on the AIX
system by smitty. There was only a firewall rule necessary to allow the port 515 for the lpd service.

On a solaris 10 system there was already a cups ( Common Unix Printing System )  up and running.

CUPS has a cups-lpd backend, which is designed to work with inetd.
Therefore a entry in the /etc/inet/inetd.conf  was necessary:

printer stream tcp nowait lp /opt/local/cups/lib/cups/daemon/cups-lpd cups-lpd -o document-format=application/octet-stream

a inetconv converts the entry into an SMF-Service.

But after doing this on AIX the printer queue always went down. A tcp-Trace revealed, that the
cups-lpd sent back, that the printer queue was not accepting print jobs.

After some searching, I found a hint about the user with which the cups-lpd was started.

After setting the suer equal to that one ussed for cups itself in the SMF-Service svc:/network/printer/tcp:default
the printing was working from AIX.

svccfg -s svc:/network/printer/tcp
setprop inetd_start/user = astring: <user>
setprop inetd_start/group= astring: <group>

If the print queue on AIX is doww, smitty helps with the short path qstart

smitty qstart 

smitty -> Print Spooling -> AIX Print Spooling -> Manage Print Queues -> Start a Print Queue

Jun 18, 2013

get mysql database to log the queries to see what was requested

in my mysql instance, I have some databases running and I have some programs from which  I do not know which queries they use.

So I'd like to have a log with all queries.

The useful link is here.

log into your  database and activate the logging:

mysql> set global general_log=1;
mysql> set global log_output='table';

mysql> select * from mysql.general_log;

to show the entries.


mysql> set global general_log=0; 

to turn logging of.

If tried to delete entries from the table and dropped it, the table is not

See here how to restore the table:

USE mysql;

  `user_host` mediumtext NOT NULL,
  `thread_id` int(11) NOT NULL,
  `server_id` int(10) unsigned NOT NULL,
  `command_type` varchar(64) NOT NULL,
  `argument` mediumtext NOT NULL
 to delete entries from the table use

truncate table mysql.general_log;

Jun 10, 2013

Update a solaris 11 installation with pkg and behind a proxy

Installing solaris 11 in a KVM-Machine on Fedora 18 is no problem, if you have the iso-Image available

After rebooting and trying to install some packages and you are protected by a firewall, pkg times out.

To let the pkg command talk to a proxy for getting the packages from the IPS-Repo, you have to
set an environment variable.

https_proxy=https://<IP of proxy>:<Port>
http_proxy=http://<IP of proxy>:<Port>
export https_proxy
export http_proxy
pkg install developer/gcc-45

( source )

Jun 6, 2013

Java - JMX through firewalls and RMI debugging hints.

Currently I'm working on JMX.

The problem with the Java JMX is, that the communication is done by RMI-Calls.

The initial port is a fixed port, but the ongoing communication over RMI
uses dynamic ports and this is a killer when you are communicating through
a firewall.

Here is a hint for an Agent-Implementation, which uses a second fixed
port for the RMI communication.

This is easier for firewalls to allow 2 ports for the communication.

The communication is done by RMI-Calls, which are "garbage" when you
trace the network traffic by wireshark, tcpdump or something else.
Some parts are readable , but not all.

Here was a hint about a system property, which can be set and after this, there are outputs in the console in my case.
The system-property is:


When there also is also a NAT, the RMI-Server has the wrong server in the
response to contact. Therefore an other property sets the name, which the
RMI-Calls returns as contact:
( from here )

-Djava.rmi.server.hostname=<public/NAT address>

Jun 5, 2013

compress/uncompress of zip/gzip files without the necessary tools but python is available

This week, I read about python onliners, which are provided by some
modules ( "batteries included" as the slogan of python ).

The gzip-Module allows to decompress gzip-Archives by
python -m gzip -d <gz-File>

the zipfile module allows create, test, list and decompress of zip archives:

# python -m zipfile -h 
    zipfile.py -l zipfile.zip # Show listing of a zipfile 
    zipfile.py -t zipfile.zip # Test if a zipfile is valid 
    zipfile.py -e zipfile.zip target # Extract zipfile into target dir 
    zipfile.py -c zipfile.zip src ... # Create zipfile from sources 

The  json/tool -Module allows formating of json-Strings:

# echo '{ "json": "obj", "test": [ 1, 2, 3] }' | python -m json.tool 

    "json": "obj", 
    "test": [ 

This call allows also an input and optional output-file for the json-Data.