Tuesday, 13 November 2018

macOS Mojave and Git - Borked No More

*UPDATE*

I've just saw this again on macOS 11 Big Sur : -

sw_vers

ProductName: macOS
ProductVersion: 11.0.1
BuildVersion: 20B29

I was trying to clone a repository: -

but got this: -

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Thankfully an easy solution: -

xcode-select --install ( note that's a double-hyphen )

xcode-select: note: install requested for command line developer tools

Now it's a-workin' 

Cloning into 'java-helloworld'...
remote: Enumerating objects: 121, done.
remote: Total 121 (delta 0), reused 0 (delta 0), pack-reused 121
Receiving objects: 100% (121/121), 61.47 KiB | 340.00 KiB/s, done.
Resolving deltas: 100% (46/46), done.


cd java-helloworld/

ls

CONTRIBUTING.md LICENSE README.md manifest.yml pom.xml src target

mvn clean install

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------< net.wasdev.wlp.sample:JavaHelloWorldApp >---------------
[INFO] Building Liberty Profile Sample - Servlet 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ JavaHelloWorldApp ---
[INFO] Deleting /Users/davidhay/java-helloworld/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0:enforce (default) @ JavaHelloWorldApp ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ JavaHelloWorldApp ---
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ JavaHelloWorldApp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidhay/java-helloworld/src/main/resources
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ JavaHelloWorldApp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/davidhay/java-helloworld/target/classes
[WARNING] bootstrap class path not set in conjunction with -source 1.7
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ JavaHelloWorldApp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidhay/java-helloworld/src/test/resources
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ JavaHelloWorldApp ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ JavaHelloWorldApp ---
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ JavaHelloWorldApp ---
[INFO] Packaging webapp
[INFO] Assembling webapp [JavaHelloWorldApp] in [/Users/davidhay/java-helloworld/target/JavaHelloWorldApp-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/davidhay/java-helloworld/src/main/webapp]
[INFO] Webapp assembled in [25 msecs]
[INFO] Building war: /Users/davidhay/java-helloworld/target/JavaHelloWorldApp.war
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ JavaHelloWorldApp ---
[INFO] Installing /Users/davidhay/java-helloworld/target/JavaHelloWorldApp.war to /Users/davidhay/.m2/repository/net/wasdev/wlp/sample/JavaHelloWorldApp/1.0-SNAPSHOT/JavaHelloWorldApp-1.0-SNAPSHOT.war
[INFO] Installing /Users/davidhay/java-helloworld/pom.xml to /Users/davidhay/.m2/repository/net/wasdev/wlp/sample/JavaHelloWorldApp/1.0-SNAPSHOT/JavaHelloWorldApp-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.032 s
[INFO] Finished at: 2018-11-13T16:04:07Z
[INFO] ————————————————————————————————————


mvn liberty:run-server

[INFO] Scanning for projects...
Downloading from ibm-maven-repo: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/net/wasdev/wlp/maven/plugins/liberty-maven-plugin/1.2.1/liberty-maven-plugin-1.2.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/maven/plugins/liberty-maven-plugin/1.2.1/liberty-maven-plugin-1.2.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/maven/plugins/liberty-maven-plugin/1.2.1/liberty-maven-plugin-1.2.1.pom (4.4 kB at 18 kB/s)
Downloading from ibm-maven-repo: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/net/wasdev/wlp/maven/liberty-maven/1.2.1/liberty-maven-1.2.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/maven/liberty-maven/1.2.1/liberty-maven-1.2.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/maven/liberty-maven/1.2.1/liberty-maven-1.2.1.pom (2.0 kB at 53 kB/s)
Downloading from ibm-maven-repo: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/net/wasdev/wlp/maven/plugins/liberty-maven-plugin/1.2.1/liberty-maven-plugin-1.2.1.jar
Downloading from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/maven/plugins/liberty-maven-plugin/1.2.1/liberty-maven-plugin-1.2.1.jar
Downloaded from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/maven/plugins/liberty-maven-plugin/1.2.1/liberty-maven-plugin-1.2.1.jar (109 kB at 1.3 MB/s)
[INFO] 
[INFO] --------------< net.wasdev.wlp.sample:JavaHelloWorldApp >---------------
[INFO] Building Liberty Profile Sample - Servlet 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- liberty-maven-plugin:1.2.1:run-server (default-cli) @ JavaHelloWorldApp ---
Downloading from ibm-maven-repo: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/net/wasdev/wlp/ant/wlp-anttasks/1.2.1/wlp-anttasks-1.2.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/ant/wlp-anttasks/1.2.1/wlp-anttasks-1.2.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/ant/wlp-anttasks/1.2.1/wlp-anttasks-1.2.1.pom (5.2 kB at 141 kB/s)
Downloading from ibm-maven-repo: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/net/wasdev/wlp/ant/wlp-anttasks/1.2.1/wlp-anttasks-1.2.1.jar
Downloading from ibm-maven-repo: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Downloading from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/ant/wlp-anttasks/1.2.1/wlp-anttasks-1.2.1.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (169 kB at 1.1 MB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/net/wasdev/wlp/ant/wlp-anttasks/1.2.1/wlp-anttasks-1.2.1.jar (85 kB at 513 kB/s)
[INFO] CWWKM2102I: Using installDirectory : /Users/davidhay/java-helloworld/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /Users/davidhay/java-helloworld/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Getting: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml
[INFO] To: /Users/davidhay/.m2/repository/wlp-cache/index.yml
[INFO] Getting: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/18.0.0.3/wlp-webProfile7-18.0.0.3.zip
[INFO] To: /Users/davidhay/.m2/repository/wlp-cache/18.0.0_03/wlp-webProfile7-18.0.0.3.zip
[INFO] Copying 1 file to /Users/davidhay/java-helloworld/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /Users/davidhay/java-helloworld/src/main/wlp/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO] CWWKM2001I: server.config.dir is /Users/davidhay/java-helloworld/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: server.output.dir is /Users/davidhay/java-helloworld/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: Invoke command is [/Users/davidhay/java-helloworld/target/liberty/wlp/bin/server, run, defaultServer].
[INFO] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[INFO] Launching defaultServer (WebSphere Application Server 18.0.0.3/wlp-1.0.22.cl180320180905-2337) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181-b13 (en_GB)
[INFO] [AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[INFO] [AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/18.0.0.3/lafiles/en.html
[INFO] [AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[INFO] [ERROR   ] CWWKO0221E: TCP Channel defaultHttpEndpoint initialization did not succeed.  The socket bind did not succeed for host * and port 9080.  The port might already be in use.
[INFO] [AUDIT   ] CWWKZ0001I: Application JavaHelloWorldApp started in 0.231 seconds.
[INFO] [AUDIT   ] CWWKF0012I: The server installed the following features: [servlet-3.1].
[INFO] [AUDIT   ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.

Reminder - pulling a single file from a ZIP archive

I am following this tutorial: -


which requires one to download Apache Derby from here: -


specifically the LIB distribution ( which just provides the Apache runtime in a Java JAR file, rather than the full set of binaries ).

Having downloaded the required ZIP file: -


I wanted to simply extract the derby.jar file to my WebSphere Liberty Profile environment.

I navigated to the appropriate directory on the file-system: -

cd /Users/davidhay/wlp/usr/shared/resources

and then listed the contents of the downloaded ZIP fie: -

unzip -l ~/Downloads/db-derby-10.10.2.0-lib.zip

Archive:  /Users/davidhay/Downloads/db-derby-10.10.2.0-lib.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  03-27-2014 12:21   db-derby-10.10.2.0-lib/
    39891  03-27-2014 12:21   db-derby-10.10.2.0-lib/KEYS
    11560  03-27-2014 12:21   db-derby-10.10.2.0-lib/LICENSE
     7323  03-27-2014 12:21   db-derby-10.10.2.0-lib/NOTICE
    49122  03-27-2014 12:21   db-derby-10.10.2.0-lib/RELEASE-NOTES.html
        0  03-27-2014 12:21   db-derby-10.10.2.0-lib/lib/
  2838580  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derby.jar
     1476  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derby.war
    92470  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_cs.jar
   104596  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_de_DE.jar
    98708  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_es.jar
   104718  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_fr.jar
    93172  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_hu.jar
    98556  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_it.jar
   115193  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_ja_JP.jar
   109610  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_ko_KR.jar
    91165  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_pl.jar
    88405  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_pt_BR.jar
   119017  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_ru.jar
   101533  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_zh_CN.jar
   103118  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyLocale_zh_TW.jar
   586237  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyclient.jar
   252393  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbynet.jar
     7143  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbyrun.jar
   214415  03-27-2014 12:15   db-derby-10.10.2.0-lib/lib/derbytools.jar
        0  03-27-2014 12:21   db-derby-10.10.2.0-lib/test/
  7654758  03-27-2014 12:15   db-derby-10.10.2.0-lib/test/derbyTesting.jar
    81105  03-27-2014 09:35   db-derby-10.10.2.0-lib/test/README.htm
    65261  03-27-2014 09:31   db-derby-10.10.2.0-lib/test/jakarta-oro-2.0.8.jar
---------                     -------
 13129525                     29 files


( note that I've highlighted the JAR file that I actually want )

and then extracted JUSt that JAR file: -

unzip ~/Downloads/db-derby-10.10.2.0-lib.zip "db-derby-10.10.2.0-lib/lib/derby.jar""

Note that I've specifically referenced the full path of the compressed JAR file: -

db-derby-10.10.2.0-lib/lib/derby.jar

and wrapped it in double-quotes.

However, this retains the original path, so I end up with this: -

ls -R /Users/davidhay/wlp/usr/shared/resources

db-derby-10.10.2.0-lib

/Users/davidhay/wlp/usr/shared/resources/db-derby-10.10.2.0-lib:
lib

/Users/davidhay/wlp/usr/shared/resources/db-derby-10.10.2.0-lib/lib:
derby.jar

Thankfully, the unzip command allows me to "junk" that path: -

man unzip

       -j     junk paths.  The archive's directory structure is not recreated; all files are deposited in the extraction directory (by default, the current one).

so, having cleared up the directory: -

rm -Rf /Users/davidhay/wlp/usr/shared/resources/*

I then re-ran the unzip command: -

unzip -j ~/Downloads/db-derby-10.10.2.0-lib.zip "db-derby-10.10.2.0-lib/lib/derby.jar"

Archive:  /Users/davidhay/Downloads/db-derby-10.10.2.0-lib.zip
  inflating: derby.jar             

leaving me with this: -

ls -R /Users/davidhay/wlp/usr/shared/resources

derby.jar

Nice !

Friday, 9 November 2018

How many open files ? "Too many open files"

I saw this today: -

[09/11/18 11:18:19:403 GMT] 00000176 FileDocument  E   ADMR0104E: The system is unable to read document /opt/ibm/WebSphere/AppServer/profiles/Dmgr01/config/temp/download/cells/odm892Cell01/cell.xml: java.io.IOException: Too many open files

during an IBM ODM Rules build.

This was a new RHEL 7.6 VM.

Guess what I'd forgotten ?

Yep, my ulimits etc.

<snip>
Set Ulimits etc.

vi /etc/security/limits.d/20-nproc.conf

# - nofile - max number of open files
wasadmin   soft    nofile  65536
wasadmin   hard    nofile  65536

# - nproc - max number of processes
wasadmin   soft    nproc   16384
wasadmin   hard    nproc   16384


vi /etc/security/limits.conf

* hard nofile 10240
* soft nofile 10240


vi /etc/sysctl.conf

fs.file-max = 524288
</snip>

A few vi commands and a reboot later, and we're good to go.

Thursday, 8 November 2018

Ubuntu 18.04 - Changing the hostname

So I did not realise that it's now so hard to change a hostname in Ubuntu, I've obviously been spoilt in the past.

I assumed that it was a case of: -

sudo hostname hostname.domain.com
sudo vi /etc/hostname
sudo vi /etc/hosts
sudo reboot

but, alas, no longer - it's now more like: -

sudo hostnamectl set-hostname icpboot.uk.ibm.com
sudo vi /etc/cloud/cloud.cfg
sudo vi /etc/hosts
sudo reboot

Whilst I'm on a rant n' roll, the mechanism for changing an IP address has also changed ….

Now it's more like this: -

sudo vi /etc/netplan/50-cloud-init.yaml 

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens33:
            addresses:
            - 192.168.1.200/24
            gateway4: 192.168.1.1

            nameservers:
                addresses:
                - 9.9.9.9
                - 8.8.8.8
                - 1.1.1.1
                search: []
            optional: true
    version: 2


which is nice.

Thursday, 1 November 2018

Apple TV Screensavers - On the Mac !

I've had this installed for a while, but noticed that it was a little more clunky since I had upgraded to macOS Mojave 10.14.1.

Thankfully, the oh-so-excellent author, John Coates, has updated it :-)

Aerial is a Mac screensaver based on the new Apple TV screensaver that displays the Aerial movies Apple shot over New York, San Francisco, Hawaii, China, etc. Starting with version 1.4, this also includes the new ISS videos available in tvOS 12!

Aerial is completely open source, so feel free to contribute to its development.




Docker CE on Ubuntu 18.10

That'll teach me to use the latest n' greatest Ubuntu 18.10 ( aka Cosmic ): -

sudo add-apt-repository \
>    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
>    $(lsb_release -cs) \
>    stable"


Get:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease [80.5 kB]
Hit:2 http://gb.archive.ubuntu.com/ubuntu cosmic InRelease                                                  
Get:3 http://gb.archive.ubuntu.com/ubuntu cosmic-updates InRelease [83.2 kB]                                                          
Hit:4 http://gb.archive.ubuntu.com/ubuntu cosmic-backports InRelease                                                                            
Ign:5 https://download.docker.com/linux/ubuntu cosmic InRelease          
Err:6 https://download.docker.com/linux/ubuntu cosmic Release
  404  Not Found [IP: 13.35.198.99 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.


sudo apt-get update

Get:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease [80.5 kB]
Hit:2 http://gb.archive.ubuntu.com/ubuntu cosmic InRelease                                              
Get:3 http://gb.archive.ubuntu.com/ubuntu cosmic-updates InRelease [83.2 kB]                                                          
Hit:4 http://gb.archive.ubuntu.com/ubuntu cosmic-backports InRelease                                                                              
Ign:5 https://download.docker.com/linux/ubuntu cosmic InRelease
Err:6 https://download.docker.com/linux/ubuntu cosmic Release
  404  Not Found [IP: 13.35.198.85 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.

Note that the add-apt command uses this: -

lsb_release -cs

which returns: -

cosmic

I checked this: -





which explains it - there's no stable release.

Easily hacked :-)

sudo add-apt-repository    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   bionic \
   stable"


Hit:1 http://gb.archive.ubuntu.com/ubuntu cosmic InRelease
Get:2 http://gb.archive.ubuntu.com/ubuntu cosmic-updates InRelease [83.2 kB]
Get:3 http://security.ubuntu.com/ubuntu cosmic-security InRelease [80.5 kB]
Get:4 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]                                                                         
Hit:5 http://gb.archive.ubuntu.com/ubuntu cosmic-backports InRelease           
Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [2,414 B]
Fetched 231 kB in 1s (405 kB/s)
Reading package lists... Done

which pulls the stable release from the bionic ( Ubuntu 18.04 ) release instead.

sudo apt-get update

Hit:1 http://gb.archive.ubuntu.com/ubuntu cosmic InRelease
Get:2 http://gb.archive.ubuntu.com/ubuntu cosmic-updates InRelease [83.2 kB]                              
Hit:3 http://gb.archive.ubuntu.com/ubuntu cosmic-backports InRelease                                                                                        
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease                                                                                         
Get:5 http://security.ubuntu.com/ubuntu cosmic-security InRelease [80.5 kB]
Fetched 164 kB in 1s (322 kB/s)                                
Reading package lists… Done


sudo apt-get install docker-ce

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  wmdocker
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  aufs-tools cgroupfs-mount git git-man liberror-perl pigz
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed
  aufs-tools cgroupfs-mount docker-ce git git-man liberror-perl pigz
0 to upgrade, 7 to newly install, 0 to remove and 5 not to upgrade.
Need to get 44.8 MB of archives.
After this operation, 230 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gb.archive.ubuntu.com/ubuntu cosmic/universe amd64 pigz amd64 2.4-1 [57.4 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu cosmic/universe amd64 aufs-tools amd64 1:4.9+20170918-2 [104 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu cosmic/universe amd64 cgroupfs-mount all 1.4 [6,320 B]
Get:4 http://gb.archive.ubuntu.com/ubuntu cosmic/main amd64 liberror-perl all 0.17026-1 [26.6 kB]
Get:5 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce amd64 18.06.1~ce~3-0~ubuntu [40.2 MB]
Get:6 http://gb.archive.ubuntu.com/ubuntu cosmic/main amd64 git-man all 1:2.19.1-1ubuntu1 [822 kB]
Get:7 http://gb.archive.ubuntu.com/ubuntu cosmic/main amd64 git amd64 1:2.19.1-1ubuntu1 [3,529 kB]
Fetched 44.8 MB in 42s (1,064 kB/s)                                                                                                                         
Selecting previously unselected package pigz.
(Reading database ... 133402 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../1-aufs-tools_1%3a4.9+20170918-2_amd64.deb ...
Unpacking aufs-tools (1:4.9+20170918-2) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../2-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../3-docker-ce_18.06.1~ce~3-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.06.1~ce~3-0~ubuntu) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../4-liberror-perl_0.17026-1_all.deb ...
Unpacking liberror-perl (0.17026-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../5-git-man_1%3a2.19.1-1ubuntu1_all.deb ...
Unpacking git-man (1:2.19.1-1ubuntu1) ...
Selecting previously unselected package git.
Preparing to unpack .../6-git_1%3a2.19.1-1ubuntu1_amd64.deb ...
Unpacking git (1:2.19.1-1ubuntu1) ...
Setting up aufs-tools (1:4.9+20170918-2) ...
Setting up docker-ce (18.06.1~ce~3-0~ubuntu) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Setting up git-man (1:2.19.1-1ubuntu1) ...
Setting up liberror-perl (0.17026-1) ...
Setting up cgroupfs-mount (1.4) ...
Processing triggers for libc-bin (2.28-0ubuntu1) ...
Processing triggers for systemd (239-7ubuntu10) ...
Processing triggers for man-db (2.8.4-2) ...
Setting up pigz (2.4-1) ...
Setting up git (1:2.19.1-1ubuntu1) …

sudo docker version

Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:24:51 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:23:15 2018
  OS/Arch:          linux/amd64
  Experimental:     false

I am living in the past - missing ifconfig on Ubuntu

I've just rolled a new VM comprising Ubuntu 18.10, ready to build a Docker/Jenkins/Maven/Git/Liberty PoC environment.

First thing I did was to check my IP address: -

ifconfig

Command 'ifconfig' not found, but can be installed with:

sudo apt install net-tools


Ewwwww :-(

This helped: -



so I tried that: -

ip address show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:2a:65:d1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.153.131/24 brd 192.168.153.255 scope global dynamic noprefixroute ens33
       valid_lft 1793sec preferred_lft 1793sec
    inet6 fe80::a101:3792:6392:ec9c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


I then dived back into the past: -

sudo apt install net-tools

[sudo] password for hayd: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed
  net-tools
0 to upgrade, 1 to newly install, 0 to remove and 5 not to upgrade.
Need to get 197 kB of archives.
After this operation, 811 kB of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu cosmic/main amd64 net-tools amd64 1.60+git20161116.90da8a0-2ubuntu1 [197 kB]
Fetched 197 kB in 0s (1,454 kB/s)
Selecting previously unselected package net-tools.
(Reading database ... 133345 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20161116.90da8a0-2ubuntu1_amd64.deb ...
Unpacking net-tools (1.60+git20161116.90da8a0-2ubuntu1) ...
Processing triggers for man-db (2.8.4-2) ...
Setting up net-tools (1.60+git20161116.90da8a0-2ubuntu1) ...

and now I'm back there: -

ifconfig -a

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.153.131  netmask 255.255.255.0  broadcast 192.168.153.255
        inet6 fe80::a101:3792:6392:ec9c  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:2a:65:d1  txqueuelen 1000  (Ethernet)
        RX packets 5522  bytes 6355504 (6.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2406  bytes 252125 (252.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 328  bytes 24805 (24.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 328  bytes 24805 (24.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Good to be back !!!

Note to self - Firefox and local connections

 Whilst trying to hit my NAS from Firefox on my Mac, I kept seeing errors such as:- Unable to connect Firefox can’t establish a connection t...