Dietrich Schroff

Subscribe to Dietrich Schroff feed
Dietrich Schroff
Updated: 2 weeks 1 day ago

Java 10 released: java with some enhancements for running inside docker

Thu, 2018-03-22 16:03
After the release of Java 9 in october 2017 with its new features
Oracle released Java 10:
 A short summary of the new feature can be found
or you can take a look a the release notes:

My favourites are:
  • JEP 307 Parallel Full GC for G1  Improves G1 worst-case latencies by making the full GC parallel. The G1 garbage collector is designed to avoid full collections, but when the concurrent collections can't reclaim memory fast enough a fall back full GC will occur. The old implementation of the full GC for G1 used a single threaded mark-sweep-compact algorithm. With JEP 307 the full GC has been parallelized and now use the same amount of parallel worker threads as the young and mixed collections.
and the docker enhancements:
  • JDK-8146115 Improve docker container detection and resource configuration usage
The JVM has been modified to be aware that it is running in a Docker container and will extract container specific configuration information instead of querying the operating system. The information being extracted is the number of CPUs and total memory that have been allocated to the container. The total number of CPUs available to the Java process is calculated from any specified cpu sets, cpu shares or cpu quotas. This support is only available on Linux-based platforms. This new support is enabled by default and can be disabled in the command line with the JVM option:
In addition, this change adds a JVM option that provides the ability to specify the number of CPUs that the JVM will use:
This count overrides any other automatic CPU detection logic in the JVM.
  • JDK-8186248 Allow more flexibility in selecting Heap % of available RAM
Three new JVM options have been added to allow Docker container users to gain more fine grained control over the amount of system memory that will be used for the Java Heap:
These options replace the deprecated Fraction forms (-XX:InitialRAMFraction, -XX:MaxRAMFraction, and -XX:MinRAMFraction).
  • JDK-8179498 attach in Linux should be relative to /proc/pid/root and namespace aware
This bug fix corrects the attach mechanism when trying to attach from a host process to a Java process that is running in a Docker container.

Oracle VM Server x86: Discovering a server/node + setting up a repository, server pool and networking

Thu, 2018-03-22 15:32
Let's put the things together:
The Oracle VM Manager has to discover the node. Inside the web GUI (https://yourhost:7002/ovm/console)  clickt on the right icon:

Then give your password and the ip(s):

And then you can see the node details (if the connections does not fail):

The next step is to create a repository. To achieve this, you have to add a additional hdd on the oracle VM server/node, without mounting this on the server/node.
Then disover the local storage:
After "rescan phyiscal disks" it is possible to create a repository:

Still something missing: a server pool:

 Attention: Uncheck the "Clustered Server Pool" option:

And last but not least: networking...

Check, that your network is available for "Virtual Machine"

 Next posting i will show the creation of a virtual machine...

AVM: Powerline Repeater / Fritz Repeater

Sat, 2018-03-17 15:16
Last weekend my Powerline Adpater 546E broke. I tried some restarts but after 1-5 minutes the WLAN went down and the adapter got really hot.

Perhaps the missing mesh functionality was due to a hardware problem which caused this total failure.

Never mind. I ordered a Fritz Box Repeater 1160 and followed the instructions from AVM:
Note: If your repeater is already connected to your FritzBox and you perform the firmware update >6.90, then you have to do the integration via WPS once again (enable WPS on your FritzBox, then press WPS button on the repeater).

After that everything was like expected:

Docker-CE on Ubuntu 17.10 (Artful Aardvark) (2)

Sat, 2018-03-10 03:42
Three months ago i installed docker on my ubuntu 17.10. At those days there was no straight forward howto on

Now the installation is listed on

The installation manual can be found here.

root@zerberus:~# apt-get install apt-transport-https ca-certificates curl   software-properties-common
root@zerberus:~# curl -fsSL | sudo apt-key add -
root@zerberus:~# apt-key fingerprint 0EBFCD88  pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
  uid        [ unbekannt ] Docker Release (CE deb)
sub   rsa4096 2017-02-22 [S]
root@zerberus:~# add-apt-repository \
>    "deb [arch=amd64] \
>    $(lsb_release -cs) \
>    stable"
root@zerberus:~# apt update

root@zerberus:~# apt install docker-ceAnd then a check:
root@zerberus:~# docker versionClient:
 Version:    17.12.0-ce
 API version:    1.35
 Go version:    go1.9.2
 Git commit:    c97c6d6
 Built:    Wed Dec 27 20:11:14 2017
 OS/Arch:    linux/amd64

  Version:    17.12.0-ce
  API version:    1.35 (minimum version 1.12)
  Go version:    go1.9.2
  Git commit:    c97c6d6
  Built:    Wed Dec 27 20:09:47 2017
  OS/Arch:    linux/amd64
  Experimental:    false

Oracle VM x86: Installing Oracle VM Manager (getting the installation media)

Thu, 2018-03-08 15:12
If you search for "oracle vm manager" on Oracle Edelivery you will get the following:
Downloading "Oracle VM Manager with Oracle Linux" will lead to two files with *.img. These files are no cd/dvd images. But you can find a solution here:

mount -t auto -o loop,offset=$((63*512)) System.img /mnt/System
But this leads to some files with oc4j containers. 

So DO NOT search for "Oracle VM Manager". Use as search string only "VM Manager" and here we go:

Use the "Oracle VM Manager 3.4.4" at the bottom of the page...
(The installation can be found in this posting)

Oracle VM x86: Installing Oracle VM Manager

Thu, 2018-03-08 13:21
First check the hardware requirements:

After downloading the right image (please do not laugh, this is really a problem), inside a Oracle Linux the following steps have to be done:

mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-onlyand
# ls /mnt/
components       oracle-validated.params  sample.yml  ovmm-installer.bsx        TRANS.TBLFirst try:
[root@localhost ~]# /mnt/
Missing required package, Oracle VM Manager requires 'iptables-services' to be installed, you can use 'yum install iptables-services' to install it.Ok:
[root@localhost ~]# yum install iptables-servicesAnd here we go:
# /mnt/
Removed symlink /etc/systemd/system/
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/iptables.service.
Adding group 'oinstall' with gid '54321' ...
Adding group 'dba'
Adding user 'oracle' with user id '54321', initial login group 'dba', supplementary group 'oinstall' and  home directory '/home/oracle' ...
Changing ownership of '/home/oracle' to oracle:dba
Creating user 'oracle' succeeded ...
For security reasons, no default password was set for user 'oracle'. If you wish to login as the 'oracle' user, you will need to set a password for this account.
Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
oracle    soft    nofile        8192
oracle    hard    nofile        65536
oracle    soft    nproc        2048
oracle    hard    nproc        16384
oracle    soft    stack        10240
oracle    hard    stack        32768
oracle    soft    core        unlimited
oracle    hard    core        unlimited
Setting  user 'oracle' OS limits for Oracle VM Manager ...
Altered file /etc/security/limits.conf
Original file backed up at /etc/security/limits.conf.orabackup
Verifying & setting of user limits succeeded ...
Creating mountpoint '/u01' ...
Modifying iptables for OVM
Adding rules to enable access to:
     7002  : Oracle VM Manager https
       123 : NTP
     10000 : Oracle VM Manager CLI Tool
Redirecting to /bin/systemctl status iptables.service
Redirecting to /bin/systemctl status iptables.service
Redirecting to /bin/systemctl restart iptables.service
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
Redirecting to /bin/systemctl restart iptables.service
Rules added.Before starting the "" i had to install the following packages:
yum install zip unzip net-tools perl-Data-DumperBut then:
[root@localhost ~]# /mnt/

Oracle VM Manager Release 3.4.4 Installer

Oracle VM Manager Installer log file:

Please select an installation type:
   1: Install
   2: Upgrade
   3: Uninstall
   4: Help

   Select Number (1-4): 1

Verifying installation prerequisites ...

And ready for login:

Oracle database 18c: Installation via RPM

Sat, 2018-03-03 13:21
After the release of 18c i did a short dive into the "guide to new features" announced on

 And take a look, what can be found in "Database Overall -> Install, config, and patch":

RPM-based Database Installation
RPM-based Database Installation (RDI) enables an RPM-based installation of the Oracle Database software. Using the rpm-ivh command, an RPM-based database installation performs the preinstallation validations, extracts the packaged software, reassigns the ownership of the extracted software to the preconfigured user and groups, maintains the Oracle inventory, and executes all the root operations required to complete the Oracle Database software installation.
RPM-based Database Installation enables you to leverage an RPM framework to easily deploy Oracle Database.
A kind of rpm installation was introduced for the installation of grid infrastructure in 12.2 (oracle documentation): Image based installation
So no worries, you have to start the after rpm -i. But let's see, how you have to specify the Oracle_Home in this rpm-process.

Oracle VM x86: Installation walkthrough / step by step for a node/server

Wed, 2018-02-28 13:11
Last week i tried to setup Oracle VM. For all who are interested, here a short walkthrough.
First the VirtualBox Setup: The VM which should contain the Oracle VM server:

Let's boot:

Next reboot:

 And here we go:

Ubuntu Kernel: Adding a new menuentry as default before menuentry 'Ubuntu' (grub)

Sun, 2018-02-25 15:27
After the problem with s2disk/hibernate on my Ubuntu 17.10 i wanted to change the grub boot menu:
I wanted to add my new default kernel at the beginning  - before the 'Ubuntu' menuentry.

Adding the menuentry inside /boot/grub/grub.cfg does not work, because after the first kernel update the command update-grub will overwrite all changes.

Easiest way:
Go to /etc/grub.d/ and move

mv 40_custom 09_customInside 09_custom add your new menuentry (just copy the one you want from /boot/grub/grub.cfg):
root@zerberus:/etc/grub.d# cat 09_custom
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
        menuentry 'Ubuntu, mit Linux 4.13.0-17-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-17-generic-advanced-40d34826-4f8a-aefc' {
                gfxmode $linux_gfx_mode
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt5'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  40d34826-4f8a-aefc-d422f755d339
                  search --no-floppy --fs-uuid --set=root 40d34826-4f8a-aefc                fi
                echo    'Linux 4.13.0-17-generic wird geladen …'
                linux   /boot/vmlinuz-4.13.0-17-generic root=UUID=40d34826-4f8a-aefc ro  noplymouth resume=UUID=709f3f5a-5e73-b42d-b93915cea971
                echo    'Initiale Ramdisk wird geladen …'
                initrd  /boot/initrd.img-4.13.0-17-generic
 And then run update-grub once again and you are done....

Oracle Database 18c released! Image-based Installation?

Tue, 2018-02-20 14:19
Today i discovered on --> database:

The downloads-page looks like the last weeks - 12c is the default...

... but the documentations tab lists 18c: shows the following:

So the "cloud first" strategy is still in place (by the way: is this something like "america first"?).

The installation procedure looks strange:
Starting with Oracle Database 18c, installation and configuration of Oracle Database software is simplified with image-based installation.
To install Oracle Database, create the new Oracle home, extract the image file into the newly-created Oracle home, and run the setup wizard to register the Oracle Database product.
Using image-based installation, you can install and upgrade Oracle Database for single-instance and cluster configurations.
Oracle shows up this:
 But there is no 18c on OTN for download...

Firefox tab crashes by loading on ubuntu 16.04

Sun, 2018-02-18 10:21
On a ubuntu 16.04 system firefox crashes by loading

 The only way to fix this was going to "about:config":

On this page search for "webgl.disabled" and change the value from false
to true:

After that, loads without any problem...

Docker-Machine: how to create a docker vm on a remote virtualbox server

Sun, 2018-02-11 01:37
After doing some first steps with docker, i wanted to test docker-swarm. Because of the limited resources of my notebook, i was looking for a Linux with a minimal footprint. In the context of setting up VMs for docker-swarm i found a log of articles about doing that with the tool docker-machine.
It sounds like this tool can create VMs just with one command. (here the documentation).

So let's give it a try:
(You have to install docker-machine first, but you do not need to install docker itself)
~$ docker-machine create --driver virtualbox test
Creating CA: /home/schroff/.docker/machine/certs/ca.pem
Creating client certificate: /home/schroff/.docker/machine/certs/cert.pem
Running pre-create checks...
(test) Image cache directory does not exist, creating it at /home/schroff/.docker/machine/cache...
(test) No default Boot2Docker ISO found locally, downloading the latest release...
(test) Latest release for is v17.11.0-ce
(test) Downloading /home/schroff/.docker/machine/cache/boot2docker.iso from
(test) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(test) Copying /home/schroff/.docker/machine/cache/boot2docker.iso to /home/schroff/.docker/machine/machines/test/boot2docker.iso...
(test) Creating VirtualBox VM...
(test) Creating SSH key...
(test) Starting the VM...
(test) Check network to re-create if needed...
(test) Found a new host-only adapter: "vboxnet0"
(test) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env testWow.
After this command inside my virtualbox a new machine shows up with 1GB RAM, 20 GB HDD (dynamic allocated), 2 network adapters (1x NAT, 1x host only).

But it is not possible to create VMs on a remote Virtualbox server. The CLI does not allow to give a remote server IP:

But for some other environments it is possible to deploy VMs on a remote site:

--vmwarevsphere-vcenter: IP/hostname for vCenter (or ESXi if connecting directly to a single host)If your preferred virtualization engine supports remote servers, you can check here:

Nevertheless docker-machine is an excellent tool. If you are interested in creating a swarm, read this tutorial.
The homepage of the OS boot2docker can be found here.

Talking about Microservices: A journey to Docker / Snap / CoreOS / Unbuntu Core / Docker-Swarm

Wed, 2018-02-07 13:11
A few months ago (13th august 2017) i started my personal journey into this new hype called microservices:

I thought the best way for me to get in touch was to begin with CoreOS. Within 2 weeks i got some first impressions:

But after these steps i realized, that next step on this road is kubernetes. It is clear that cluster scheduler like kubernetes can not be run on a single machine - so i tried to get another access to microservices: Snap and UbuntuCore:
In november 2017 it was clear, that both UbuntuCore and CoreOS are some building blocks for microservices, but i was not really on the right track.
Back to kubernetes? Kubernetes relies on containers. So i started with docker:
Nearly 3 months later i still did not get in touch with kubernetes - but i think docker swarm is a cluster scheduler, too. And it is really easy to run.

What will i do next? Some tests to failure/failover/failback scenarios. 

    Ubuntu 17.10: s2disk/hibernate broken with kernel 4.13.0-32

    Sat, 2018-02-03 14:22
    Last week my notebook refused to startup after s2disk/hibernate. The resume process started up to 100% and then the screen went black and everything stopped...

    First idea: Something disappeared inside the grub configuration.

    But this was okay.

    After nearly one hour my last try was booting an old kernel. And with
    schroff@zerberus:/boot$ uname -a
    Linux zerberus 4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linuxs2disk and resume worked again...

    Bash: How to trim/truncate variables / get substrings

    Sat, 2018-01-27 12:53
    In a comment to one of the most useless commands postings was shown how to use the rev command to get the last component of  the path out of a log file:
    cat log | grep pattern | rev | cut -d '/' -f 1 | revIf you only have one variable filled with a path, you can get the last component very easy:
    schroff@zerberus:~$ myvar=/ab/cd/ef/gh
    schroff@zerberus:~$ echo ${myvar##*\/}

    ## removes the longest matching string for the pattern "*\/" from the beginning (the slash has to be escaped with a backslash).

    schroff@zerberus:~$ echo ${myvar#*\/}
    ab/cd/ef/gh# removes the shortest matching pattern. Here only the starting "/"

    % and %% removes everything from the end up to the pattern:
    schroff@zerberus:~$ echo ${myvar%\/*}
    schroff@zerberus:~$ echo ${myvar%%\/*}Here the content of the bash manpage:
    Remove matching prefix pattern.  The word is expanded to produce a pattern just
    as in pathname expansion.  If the pattern matches the beginning of the value of
    parameter,  then the result of the expansion is the expanded value of parameter
    with the shortest matching pattern (the ``#'' case)  or  the  longest  matching
    pattern (the ``##'' case) deleted.  If parameter is @ or *, the pattern removal
    operation is applied to each positional parameter in turn, and the expansion is
    the resultant list.  If parameter is an array variable subscripted with @ or *,
    the pattern removal operation is applied to each member of the array  in  turn,
    and the expansion is the resultant list.

    Remove matching suffix pattern.  The word is expanded to produce a pattern just
    as in pathname expansion.  If the pattern matches a  trailing  portion  of  the
    expanded  value  of parameter, then the result of the expansion is the expanded
    value of parameter with the shortest matching pattern (the ``%'' case)  or  the
    longest  matching  pattern  (the ``%%'' case) deleted.  If parameter is @ or *,
    the pattern removal operation is applied to each positional parameter in  turn,
    and  the  expansion  is  the resultant list.  If parameter is an array variable
    subscripted with @ or *, the pattern removal operation is applied to each  mem‐
    ber of the array in turn, and the expansion is the resultant list.

    Java 9: JDK without subfolder JRE

    Thu, 2018-01-25 15:09
    In older JDK releases the directory structure was:
    libWith JEP 220 the jre folder was removed.

    A JDK image no longer contains a jre subdirectory, as noted above. Existing code that assumes the existence of that directory might not work correctly.But this does not mean that there is no JRE any more. You can still download the JRE. There are some minor changes to the JRE like:
    The bin directory in a JRE image contains a few commands that were previously found only in JDK images, namely appletvieweridlj,jrunscript, and jstatd. As with the previous item, these changes are a consequence of the way in which components that contain both APIs and tools were modularized.For both version the files rt.jar, tools.jar and dt.jar are removed:
    JDK and JRE images no longer contain the files lib/rt.jar,lib/tools.jarlib/dt.jar, and other internal JAR files, as noted above. Existing code that assumes the existence of these files might not work correctly.But this should not be a problem:
    Class and resource files previously found in lib/dt.jar and visible only when that file was added to the class path are now visible via the bootstrap class loader and present in both the JRE and the JDK. Everyone who delivers Java applications should read  JEP 220 and check, what has to be changed...

    Oracle SOA Suite 12c: Configuring the SOA Suite Weblogic Server

    Mon, 2018-01-22 14:45
     i had to run the
    ./config.shinside the home/oracle/Oracle/Middleware/Oracle_Home/oracle_common/common/bin

    And then after a
    ./startWeblogic.shinside /bin in the directory, which was configured in the first screenshot of the, i can open the console:

    Oracle SOA Suite: Installing the Fusion Middleware SOA Suite

    Sun, 2018-01-21 14:30
    After the installation of the Fusion Middleware Infrastructur the next step is to install the SOA Suite software.

    The software can be found here:

    The first try failed with this error:

    java -d64 -jar fmw_12.
    Launcher-Logdatei ist /tmp/OraInstall2017-10-07_11-47-20PM/launcher2017-10-07_11-47-20PM.log.
    Nicht genügend freier Speicherplatz in /tmp/orcl3797124329273264119.tmp, um das Installationsprogramm zu extrahieren. Aktuell 2796 MB. Erforderlich 3532 MB.Ok. Some cleanups inside /tmp and then:

    Next step: Run the to create a SOA Suite Server....

    Docker-CE: How to modify containers with overlays / How to add directories to a standard docker image

    Sun, 2018-01-14 13:01
    After some experiments with docker i wanted to run a tomcat with my own configuration (e.g. memory settings, ports, ...).

    My first idea was: Download tomcat, configure everything and then build an image.
    BUT: After i learned how to use the -v (--volume) flag for adding some file via the docker command to an image i was wondering, wether creating a new image with only the additional files on top of standard tomcat docker image.

    So first step is to take a look at all local images:
    # docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    friendlyhello       latest              976ee2bb47bf        3 days ago          148MB
    tomcat              latest              11df4b40749f        8 days ago          558MB
    I can use tomcat:latest. (if it is not there just pull it: docker pull tomcat)
    Next step is to create a directory and add all the directories which you want to override.
    For my example:
    mkdir conftomcat
    cd conftomcat
    mkdir binInto the bin directory i put all the files from the tomcat standard container:
    # ls bin
    bootstrap.jar  catalina-tasks.xml  commons-daemon-native.tar.gz    commons-daemon.jar             tomcat-juli.jar
    Inside the i added -Xmx384M.
    In conftomcat i created the following Dockerfile:
    FROM tomcat:latest
    WORKDIR /usr/local/tomcat/bin
    ADD status /usr/local/tomcat/webapps/mystatus
    ADD bin /usr/local/tomcat/bin
    ENTRYPOINT [ "/usr/local/tomcat/bin/" ]
    CMD [ "run"]And as you can see i added my index.jsp which is inside status (s. this posting).
    Ok. Let's see, if my plan works:
    #docker build  -t  mytomcat .ending build context to Docker daemon  375.8kB
    Step 1/6 : FROM tomcat:latest
     ---> 11df4b40749f
    Step 2/6 : WORKDIR /usr/local/tomcat/bin
     ---> Using cache
     ---> 5696a9ab99cb
    Step 3/6 : ADD status /usr/local/tomcat/webapps/mystatus
     ---> 1bceea5af515
    Step 4/6 : ADD bin /usr/local/tomcat/bin
     ---> e8d3a386a7f0
    Step 5/6 : ENTRYPOINT [ "/usr/local/tomcat/bin/" ]
     ---> Running in a04038032bb7
    Removing intermediate container a04038032bb7
     ---> 4c8fda05df18
    Step 6/6 : CMD [ "run"]
     ---> Running in cce378648e7a
    Removing intermediate container cce378648e7a
     ---> 72ecfe2aa4a7
    Successfully built 72ecfe2aa4a7
    Successfully tagged mytomcat:latest
    and then start:
    docker run -p 4001:8080 mytomcat Let's check the memory settings:
    $ ps aux|grep java
    root      2313 20.7  8.0 2418472 81236 ?       Ssl  19:51   0:02 /docker-java-home/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx394M -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat org.apache.catalina.startup.Bootstrap start
    Yes - changed to 384M.
    And check the jsp:

    As you can see, i have the standard tomcat running with an override inside the configuration to 384M. So it should be easy to add certificates, WARs, ... to such a standard container.