Category Archives: Linux

TCPAttemptFails

A customer reported receiving a lot of these errors in the logs

TCPAttemptFails – “

The number of times that TCP connections have made a direct transition to the CLOSED state from either the SYN-SENT state or the SYN-RCVD state, plus the number of times that TCP connections have made a direct transition to the LISTEN state from the SYN-RCVD state.

When you look in netstat -s you can also see this counter incrementing –

[root@host-8-149 net]# netstat -s |grep 'failed connection'
    439395 failed connection attempts
[root@host-8-149 net]# netstat -s |grep 'failed connection'
    439462 failed connection attempts
[root@host-8-149 net]# netstat -s |grep 'failed connection'
    439502 failed connection attempts

This is occurring because some process is trying to open a connection and they are getting a reset packet in response, transitioning it  to CLOSED immediately.

Using tcpdump to look for things with reset flags on the public network interface

[root@host-8-149 net]# tcpdump -ieno2 -n -v 'tcp[tcpflags] & (tcp-rst) != 0'
dropped privs to tcpdump
tcpdump: listening on eno2, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
179 packets received by filter
41 packets dropped by kernel
[root@host-8-149 net]#

No packets are showing up – so it must be local to the server.

If I look on loopback however

root@host-8-149 net]# tcpdump -ilo -n -v 'tcp[tcpflags] & (tcp-rst) != 0'
dropped privs to tcpdump
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes
16:10:03.623336 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
    127.0.0.1.9411 > 127.0.0.1.42450: Flags [R.], cksum 0xff00 (correct), seq 0, ack 2066902277, win 0, length 0
16:10:03.625842 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
    127.0.0.1.9411 > 127.0.0.1.42454: Flags [R.], cksum 0xbe62 (correct), seq 0, ack 3236259820, win 0, length 0
16:10:03.626131 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
    127.0.0.1.9411 > 127.0.0.1.42456: Flags [R.], cksum 0x01b1 (correct), seq 0, ack 3517060063, win 0, length 0
16:10:03.782660 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
    127.0.0.1.9411 > 127.0.0.1.42486: Flags [R.], cksum 0x5428 (correct), seq 0, ack 4287861592, win 0, length 0
16:10:03.880794 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
    127.0.0.1.9411 > 127.0.0.1.42504: Flags [R.], cksum 0x2ae2 (correct), seq 0, ack 2701138720, win 0, length 0

So something running on this system is trying to connect to port 9411 on this server, via loopback interface.

When I look on netstat there is nothing listening on port 9411

[root@host-8-149 proc]# netstat -anpe |grep 9411
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      0          1094116    506938/sshd: root@p 
tcp6       0      0 ::1:6010                :::*                    LISTEN      0          1094115    506938/sshd: root@p 
unix  2      [ ACC ]     STREAM     LISTENING     1094117  506938/sshd: root@p  /tmp/ssh-7RSGI64Efz/agent.506938

So – this leads me to think there is a mis-configured application on the system that is either missing a process that should be listening on port 9411, or is trying to connect to the ‘wrong’ port number.

Using systemd to start Oracle automatically on system boot

In OEL6 and earlier, you usually used the SysV init.d scripts to stop and start the Oracle database. In OEL 7 onwards while the SysV init.d scripts were retained for compatibility purposes, systemd is a more reliable method of automating system startup and shutdown.

One problem I have seen with using legacy SysV init.d scripts is that they are not always given time to execute before the all the processes are killed by the operating system. This can be seen in shutdown logs giving messages like ‘ORA-01092’

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 26 10:46:03 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

SQL> Connected.
SQL> ORA-01092: ORACLE instance terminated. Disconnection forced
SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Database instance "demo" shut down.

and in the alert log, messages about processes being killed and and a shutdown caused by a dead PMON .

Process termination requested for pid 3747 , [info = -1217573024] [request issued by pid: 1, uid: 0]
2021-01-26T10:46:02.225934+00:00
Process termination requested for pid 3769 , [info = -85996400] [request issued by pid: 1, uid: 0]
2021-01-26T10:46:03.053034+00:00
Performing implicit shutdown abort due to dead PMON
Shutting down ORACLE instance (abort) (OS id: 29499)
License high water mark = 66
USER (ospid: 29499): terminating the instance

In the manual for SysV init script compatibility, it is said that you can put header information into your legacy script to make it wait for certain things to be started before it tries to start, and to be stopped before other vital services stop (e.g. networking). I did not have any success with this – it still seemed to kill the process before the shutdown had completed.

What I did was follow the process to create a systemd script to call the standard oracle dbstart and dbshut scripts .

cd /usr/lib/systemd/system

vi a new script called oradb.service (the oradb is what the service will be called after registration, so keep this meaningful).

[Unit]
Description=Oracle Database Service
Requires=rpc-statd.service network.target local-fs.target remote-fs.target
After=syslog.target network.target nfs.service nfs-mountd.service local-fs.target rpc-statd.service remote-fs.target

[Service]
#set any limits here
LimitMEMLOCK=infinity
LimitNOFILE=65535

Type=idle
RemainAfterExit=yes
User=oracle
Group=oinstall
Restart=no
Environment=ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
ExecStart=/bin/bash -c '${ORACLE_HOME}/bin/dbstart $ORACLE_HOME'
ExecStop=/bin/bash -c '${ORACLE_HOME}/bin/dbshut $ORACLE_HOME'


[Install]
WantedBy=multi-user.target

This is a very basic script – it executes the startup as the user ‘oracle’ who is a member of group ‘oinstall’ .

The ‘Requires’ directive says what other systemd services are required to be activated along with this unit. They will be automatically started (if not already running) and if there is a failure, your unit will also not be started. can start . The ‘After’ says that this will not be started until the list of units is fully started (and also the inverse on shutdown, stopped before these units are stopped). You can see a list of services on your system using (systemctl list-units –type service) to get the precise naming. There’s lots more things you can do – see the man page for systemd.unit(5) for more details.

Ok, now you have a script, you need to reload the daemon to get it to read the file

# systemctl daemon-reload

Then enable your new script and test it by starting and stopping.

# systemctl enable oradb.service
# systemctl start oradb.service
# systemctl stop oradb.service

You can review the status of your startup process using the systemctl status command

# systemctl status oradb.service -l

● oradb.service - Oracle Database Service
Loaded: loaded (/usr/lib/systemd/system/oradb.service; enabled; vendor preset: disabled)
Active: active (exited) since Wed 2021-06-09 11:42:05 BST; 2h 47min ago
Main PID: 1213 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/oradb.service
├─ 2164 /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
├─ 3589 ora_pmon_demo
├─ 3591 ora_clmn_demo
├─ 3594 ora_psp0_demo
├─ 3624 ora_vktm_demo
├─ 3628 ora_gen0_demo
├─ 3630 ora_mman_demo
├─ 3635 ora_gen1_demo
├─ 3638 ora_diag_demo
├─ 3640 ora_ofsd_demo
├─ 3644 ora_dbrm_demo
├─ 3646 ora_vkrm_demo
├─ 3648 ora_svcb_demo
├─ 3650 ora_pman_demo
├─ 3653 ora_dia0_demo
├─ 3655 ora_dbw0_demo
├─ 3657 ora_lgwr_demo
├─ 3659 ora_ckpt_demo
├─ 3662 ora_lg00_demo
├─ 3664 ora_smon_demo
├─ 3666 ora_lg01_demo
├─ 3668 ora_smco_demo
├─ 3671 ora_w000_demo
├─ 3673 ora_reco_demo
├─ 3675 ora_w001_demo
├─ 3677 ora_lreg_demo
├─ 3680 ora_pxmn_demo
├─ 3684 ora_mmon_demo
├─ 3686 ora_mmnl_demo
├─ 3689 ora_d000_demo
├─ 3691 ora_s000_demo
├─ 3693 ora_tmon_demo
├─ 3740 ora_tt00_demo
├─ 3742 ora_tt01_demo
├─ 3744 ora_tt02_demo
├─ 3749 ora_w002_demo
├─ 3751 ora_aqpc_demo
├─ 3756 ora_p000_demo
├─ 3758 ora_p001_demo
├─ 3760 ora_p002_demo
├─ 3762 ora_p003_demo
├─ 3764 ora_p004_demo
├─ 3766 ora_p005_demo
├─ 3768 ora_p006_demo
├─ 3770 ora_p007_demo
├─ 3936 ora_w003_demo
├─ 3938 ora_cjq0_demo
├─ 4049 ora_w004_demo
├─ 4057 ora_qm02_demo
├─ 4063 ora_q003_demo
├─ 4069 ora_q006_demo
├─ 4109 ora_q00l_demo
├─ 4824 ora_w005_demo
├─ 4829 ora_w006_demo
├─ 4833 ora_w007_demo
├─11118 ora_m000_demo
├─11176 ora_m001_demo
├─11729 ora_m004_demo
└─14018 ora_m003_demo

Jun 09 11:42:05 host-9-13.osc.uk.oracle.com systemd[1]: Started Oracle Database Service.
Jun 09 11:42:09 host-9-13.osc.uk.oracle.com bash[1213]: Processing Database instance "demo": log file /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/log/startup.log

Filesystem is full… but du doesn’t add up.

The usual cause for this is that someone when tidying up has deleted the file while it is still held open by a process.

On linux you can find out which processes are holding files open by using lsof to display open files. In my case the problem was on /u01 so I’m filtering it based on this

lsof |grep "/u01" |grep deleted

You will get a list of deleted open files, and the owner, and process

oracle_50 50583 grid 4w REG 249,4 95135 2367471 /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_50583.trc (deleted)
oracle_50 50583 grid 39w REG 249,4 21324 2367472 /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_50583.trm (deleted)
asm_asmb_ 50586 grid 49w REG 249,4 652050432 2367473 /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_asmb_50586.trc (deleted)
asm_asmb_ 50586 grid 50w REG 249,4 146615472 2367474 /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_asmb_50586.trm (deleted)
apx_vdbg_ 56844 grid 45w REG 249,4 59047903232 2367673 /u01/app/grid/diag/apx/+apx/+APX1/trace/+APX1_vdbg_56844.trc (deleted)
apx_vdbg_ 56844 grid 46w REG 249,4 8151411204 2367674 /u01/app/grid/diag/apx/+apx/+APX1/trace/+APX1_vdbg_56844.trm (deleted)
apx_vubg_ 56866 grid 47w REG 249,4 411582464 2367688 /u01/app/grid/diag/apx/+apx/+APX1/trace/+APX1_vubg_56866.trc (deleted)

To release this diskspace then you need to get the offending process to close its files. The safest way to do this is stop the program in question.

You can close a file descriptor using gdb, but I’m not sure this is a good way to go – I imagine this could cause problems

e.g

gdb -p <PID>
p close(<file descriptor>)
quit

The PID is the 2nd field in the lsof output, and the file descriptor is the 4th field. There is a letter at the end of the file descriptor id, and this indicates that it is open for writing (w) read (r) or read and write (u)

Changing Exadata Cell access parameters

One challenge is with Exadata cells in a lab environment is that they are secure! This means that it has long lock out times in the event of an incorrect login and tough lock settings. You can manually change these.. but every time you update your cell there is a chance they will be reset.

A more permanent way is to use /opt/oracle.cellos/host_access_control on each storage cell. https://docs.oracle.com/cd/E58626_01/html/E58630/z40036a01393423.html#scrolltoc

For example, if you want to drop the lock time in the event of a failed login from 10 minutes to a more manageable 60 seconds  you would issue the command

/opt/oracle.cellos/host_access_control pam-auth --lock=60

You can combine multiple pam-auth commands on the same line.. e.g. if I also want to say that the cell only remembers one previous password I could say

/opt/oracle.cellos/host_access_control pam-auth --lock=60 --remember=1

 

There are a lot of options for this tool – you can set the system back to secure defaults, or make it even more secure, such as locking an account after a single failed login!

Installing Enterprise Manager agent on Oracle Linux 6.7 SPARC

I have access to an EM13 Enterprise Manager server, and I am going to add my Oracle Linux 6.7 SPARC to this system for monitoring.

First – check that you have the latest plugins and agents installed for the platform.

Screenshot-Self Update: Agent Software - Oracle Enterprise Manager - Mozilla Firefox

Next, on the hosts, create a user to ‘own’ the agent software

[root@host-8-160 ~]# groupadd -g 10001 oinstall
[root@host-8-160 ~]# useradd -g oinstall -s /bin/bash -d /home/agent13 -m agent13
[root@host-8-160 ~]# passwd agent13
Changing password for user agent13.

Create a directory structure for the software

[root@host-8-160 ~]# mkdir -p /u01/app
[root@host-8-160 ~]# chgrp -R oinstall /u01
[root@host-8-160 ~]# chmod g+rwx /u01

Now, back in Enterprise Manager go.. Setup -> Add Target -> Add Target Manually -> Install Agent on Host.

Enter the fully qualified domain name of your host, and the correct Platform

Screenshot-Add Host Targets : Host and Platform - Mozilla Firefox

 

Enter the installation location

Enter the credentials for agent13 and root user and hit next.

Then you can hit deploy agent.

 

Post install configuration/Worries

 

The agent installed successfully – but the host target is not being marked as available.

Looking at the output of emctl status agent I have 2 concerns.

[agent13@host-8-160 bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.2.0.0.0
OMS Version : 13.2.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/agent13/ngc13/agent_inst
Agent Log Directory : /u01/app/agent13/ngc13/agent_inst/sysman/log
Agent Binaries : /u01/app/agent13/ngc13/agent_13.2.0.0.0
Core JAR Location : /u01/app/agent13/ngc13/agent_13.2.0.0.0/jlib
Agent Process ID : 20636
Parent Process ID : 20497
Agent URL : https://host-8-160.blah.com:3876/emd/main/
Local Agent URL in NAT : https://host-8-160.blah.com:3876/emd/main/
Repository URL : https://ngc13c.blah.com:4901/empbs/upload
Started at : 2017-06-13 10:52:26
Started by user : agent13
Operating System : Linux version 4.1.12-94.3.4.el6uek.sparc64 (sparcv9)
Number of Targets : (none)
Last Reload : (none)
Last successful upload : (none)
Last attempted upload : (none)
Total Megabytes of XML files uploaded so far : 0
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 98.09%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2017-06-13 10:57:31
Last successful heartbeat to OMS : 2017-06-13 10:57:31
Next scheduled heartbeat to OMS : 2017-06-13 10:58:31

 

There are no targets, and there has not been a successful upload.

[agent13@host-8-160 bin]$ ./emctl pingOMS
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD pingOMS completed successfully

[agent13@host-8-160 bin]$ ./emctl upload agent
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

If I look in my targets.xml it is pretty empty

[agent13@host-8-160 ngc13]$ cat ./agent_inst/sysman/emd/targets.xml
<Targets AGENT_TOKEN="67DBE4C8ECBA03FA5DC991893B75619C55C9B1CEACAA6ED68074AB9C65CFF973"/>

[agent13@host-8-160 bin]$ ./emctl config agent listtargets
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
[agent13@host-8-160 bin]$

On the enterprise manager server I had errors similar to this

 
Metric evaluation error start - Unable to connect to the agent at https://host-8-161.blah.com:3876/emd/main/ [No route to host]

Tried putting that URL into my browser… cannot connect to it.

Firewall! DOH! Of course!

Temporarily disabled the iptables firewall

[root@host-8-161 /]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]

Now I can connect to the agent address in my browser.

 

So.. the choice is disable the firewall, or alter the rules. As I’m in a lab, I’m going straight to disabling the firewall.

[root@host-8-161 /]# chkconfig iptables off

Now, try to get the agent to generate the internal target list (host, ORACLE_HOME)

[agent13@host-8-161 bin]$ ./emctl config agent listtargets
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.

[agent13@host-8-161 bin]$ ./emctl config agent addinternaltargets
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
2017-06-13 12:00:37,234 [main] WARN oracle.sysman.gcagent.comm.agent.http.SSLInit - User requested cipher suite SSL_RSA_WITH_RC4_128_MD5, which is not supported for SSLContext TLSv1.2
2017-06-13 12:00:37,242 [main] WARN oracle.sysman.gcagent.comm.agent.http.SSLInit - User requested cipher suite SSL_RSA_WITH_RC4_128_SHA, which is not supported for SSLContext TLSv1.2

[agent13@host-8-161 bin]$ ./emctl config agent listtargets
Oracle Enterprise Manager Cloud Control 13c Release 2 
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.

Now when I look at my targets.xml it has entries

[agent13@host-8-161 agent_inst]$ cat ./sysman/emd/targets.xml
<Targets AGENT_TOKEN="6A415CAF76EC952756AE3BC675B0080ADAEE066B3F9B10B1B4A6410870130843">
 <Target TYPE="host" NAME="host-8-161.blah.com" DISPLAY_NAME="host-8-161.osc.uk.oracle.com" EMD_URL="https://host-8-161.blah.com:3876/emd/main/" TIMEZONE_REGION="" IDENTIFIER="TARGET_GUID=51D4595ED5982DE8E0539011038AD7DB"/>
 <Target TYPE="oracle_emd" NAME="host-8-161.blah.com:3876" DISPLAY_NAME="host-8-161.blah.com:3876" EMD_URL="https://host-8-161.blah.com:3876/emd/main/" TIMEZONE_REGION="" IDENTIFIER="TARGET_GUID=0958C84AFB17CE4D3F9FB85C81250615"/>
 <Target TYPE="oracle_home" NAME="agent13c1_1_host-8-161.blah.com_1639" DISPLAY_NAME="agent13c1_1_host-8-161.blah.com_1639" EMD_URL="https://host-8-161.blah.com:3876/emd/main/" TIMEZONE_REGION="" IDENTIFIER="TARGET_GUID=C13E4BCE40F4509C3FC788A3C08EED68">
 <Property NAME="HOME_TYPE" VALUE="O"/>
 <Property NAME="INVENTORY" VALUE="/u01/app/oraInventory"/>
 <Property NAME="INSTALL_LOCATION" VALUE="/u01/app/agent13/ngc13/agent_13.2.0.0.0"/>
 </Target>
</Targets>

When I look at the hosts in Enterprise Manager they are now marked as up.

 

linux

Thoughts and other questions..

The agent13 user on the primary domain has automatically been given the permission to run read only ldm commands (similar to the privileges that need to be manually applied to the user on Solaris).

Unlike on other platforms (e.g. SuperCluster) the hierachy of LDOMs does not seem to be recorded.

Installing and configuring DTRACE on Oracle Linux SPARC

DTRACE is one of the killer features of Solaris, and allows you to programmatically monitor system statistics and diagnose performance issues.  See https://github.com/opendtrace/toolkit for toolkit scripts so you do not have to write your own.

Dtrace is not shipped with the install media. You need to manually download the rpms from

http://www.oracle.com/technetwork/server-storage/linux/downloads/linux-dtrace-2800968.html

 

 

Dtrace is very kernel version dependent. Do not yum update your kernel without checking that dtrace is available for that release or you will have problems!

You can use yum to install the rpms

[root@host-8-161 sfw]# yum localinstall dtrace*
Loaded plugins: downloadonly, ulninfo
Setting up Local Package Process
Examining dtrace-utils-0.6.0-3.el6.sparc64.rpm: dtrace-utils-0.6.0-3.el6.sparc64
Marking dtrace-utils-0.6.0-3.el6.sparc64.rpm to be installed
Examining dtrace-utils-devel-0.6.0-3.el6.sparc64.rpm: dtrace-utils-devel-0.6.0-3.el6.sparc64
Marking dtrace-utils-devel-0.6.0-3.el6.sparc64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package dtrace-utils.sparc64 0:0.6.0-3.el6 will be installed
---> Package dtrace-utils-devel.sparc64 0:0.6.0-3.el6 will be installed
--> Processing Dependency: libdtrace-ctf-devel > 0.4.0 for package: dtrace-utils-devel-0.6.0-3.el6.sparc64
--> Running transaction check
---> Package libdtrace-ctf-devel.sparc64 0:0.5.0-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 dtrace-utils sparc64 0.6.0-3.el6 /dtrace-utils-0.6.0-3.el6.sparc64 766 k
 dtrace-utils-devel
 sparc64 0.6.0-3.el6 /dtrace-utils-devel-0.6.0-3.el6.sparc64 77 k
Installing for dependencies:
 libdtrace-ctf-devel
 sparc64 0.5.0-3.el6 public_ol6_latest 15 k

Transaction Summary
================================================================================
Install 2 Packages (+1 Dependent package)

Total size: 857 k
Total download size: 15 k
Installed size: 877 k
Is this ok [y/N]: y
Downloading Packages:
libdtrace-ctf-devel-0.5.0-3.el6.sparc64.rpm | 15 kB 00:00 
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Public key for libdtrace-ctf-devel-0.5.0-3.el6.sparc64.rpm is not installed
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Importing GPG key 0xEC551F03:
 Userid : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03
 Package : 6:oraclelinux-release-6Server-7.0.8.sparc64 (@anaconda-OracleLinuxServer-201705232044.sparc64/6.7)
 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : dtrace-utils-0.6.0-3.el6.sparc64 1/3 
 Installing : libdtrace-ctf-devel-0.5.0-3.el6.sparc64 2/3 
 Installing : dtrace-utils-devel-0.6.0-3.el6.sparc64 3/3 
 Verifying : dtrace-utils-devel-0.6.0-3.el6.sparc64 1/3 
 Verifying : libdtrace-ctf-devel-0.5.0-3.el6.sparc64 2/3 
 Verifying : dtrace-utils-0.6.0-3.el6.sparc64 3/3

Installed:
 dtrace-utils.sparc64 0:0.6.0-3.el6 dtrace-utils-devel.sparc64 0:0.6.0-3.el6

Dependency Installed:
 libdtrace-ctf-devel.sparc64 0:0.5.0-3.el6

Complete!

 

 

At this point when you run dtrace it doesn’t show anything useful and has no probes available.

[root@host-8-160 sfw]# dtrace -l
dtrace: module license 'CDDL' taints kernel.
Disabling lock debugging due to kernel taint
 ID PROVIDER MODULE FUNCTION NAME
 1  dtrace                   BEGIN
 2  dtrace                   END
 3  dtrace                   ERROR

 

You need to manually load the kernel modules for the probes and providers you want to use.  There is a list of providers in the the Oracle Linux Dtrace Tutorial manual and the Oracle Linux Dtrace Guide

A summary of what is available at the time of writing (June 2017) is below.

Provider Kernel Module Description
dtrace dtrace Provides probes that relate to DTrace itself, such as BEGIN, ERROR, and END. You can use these probes to initialize DTrace’s state before tracing begins, process its state after tracing has completed, and handle unexpected execution errors in other probes.
fasttrap fasttrap Supports user-space tracing of DTrace-enabled applications.
io sdt Provides probes that relate to data input and output. The io provider enables quick exploration of behavior observed through I/O monitoring tools such as iostat.
proc sdt Provides probes for monitoring process creation and termination, LWP creation and termination, execution of new programs, and signal handling.
profile profile Provides probes associated with an interrupt that fires at a fixed, specified time interval. These probes are associated with the asynchronous interrupt event rather than with any particular point of execution. You can use these probes to sample some aspect of a system’s state.
sched sdt Provides probes related to CPU scheduling. Because CPUs are the one resource that all threads must consume, the sched provider is very useful for understanding systemic behavior.
syscall systrace Provides probes at the entry to and return from every system call. Because system calls are the primary interface between user-level applications and the operating system kernel, these probes can offer you an insight into the interaction between applications and the system.

You can manually load the probes

[root@host-8-160 log]# modprobe -a dtrace profile systrace sdt dt_test fasttrap

However, you may want to write  startup script to automatically load the probes at boot time if the dtrace device exists.

[root@host-8-160 sfw]# cat /etc/sysconfig/modules/dtrace.modules
 

#!/bin/sh
if [ ! -c /dev/dtrace/dtrace ] ; then
         exec /sbin/modprobe -a dtrace profile systrace sdt dt_test
 fi

[root@host-8-160 sfw]# chmod 755 /etc/sysconfig/modules/dtrace.modules

 

Once the module has been loaded into the kernel, you can list all probes using

[root@host-8-160 sfw]# dtrace -l

or for just a single provider

[root@host-8-160 etc]# dtrace -l -P io
 ID  PROVIDER MODULE    FUNCTION NAME
 266 io       vmlinux   end_bio_bh_io_sync done
 267 io       vmlinux   _submit_bh start
 269 io       vmlinux   __wait_on_buffer wait-start
 270 io       vmlinux   __wait_on_buffer wait-done


You may also want to look at the information in the manual about setting the permissions on the dtrace helper device to allow code that runs as a user other than root to be recorded.

Scribbled notes on installing the Oracle database on Oracle Linux 6.7 SPARC

I had a very short time to play with my Oracle Linux SPARC box before I handed it to my customers, so I only had a very quick attempt to install the Oracle RDBMS and start a database. I did only a very basic install using database storage on filesystem, and allowed the installer to create the DB. So these notes are even more scrappy than usual.

While not yet a certified platform, you can download the Oracle Database 12.1.0.2 for Oracle Linux 6.7 SPARC images on e-delivery. There is not a publicly available install document, so I’m going to follow the install guide for Linux

Preparing for the Install

https://docs.oracle.com/database/121/LADBI/olinrpm.htm#LADBI7477

I couldn’t find the pre-installation rpm for Linux-SPARC on ULN. So I am going to have to follow the documentation and hope I have all the packages.

Verify openssh is installed

[root@host-8-161 yum.repos.d]# rpm -qa |grep ssh
 openssh-clients-5.3p1-117.el6.sparc64
 openssh-5.3p1-117.el6.sparc64
 openssh-server-5.3p1-117.el6.sparc64
 libssh2-1.4.2-2.el6_7.1.sparc64

Check that the required packages are installed.

https://docs.oracle.com/database/121/LADBI/pre_install.htm#LADBI7534

I added the following packages..

  • compat-libcap1
  • compat-libstdc++-33

On the installation media the is an additional rpm to install cvuqdisk-1.0.9-1.rpm – but this requires an oracle user….

So.. lets create my user and groups for now

[root@host-8-161 rpm]# groupadd -g 1001 oinstall
 [root@host-8-161 rpm]# groupadd -g 1002 dba
 [root@host-8-161 rpm]# useradd -g dba -G oinstall -s /bin/bash -d /home/oracle/ oracle
 [root@host-8-161 rpm]# passwd oracle

Now retry installing the package

[root@host-8-161 rpm]# rpm -i cvuqdisk-1.0.9-1.rpm

Using default group oinstall to install package

Create directories

[root@host-8-161 rpm]# mkdir /u01
[root@host-8-161 rpm]# mkdir -p /u01/app/oracle
[root@host-8-161 rpm]# chown -R oracle:dba /u01

 

Set the Oracle user resource limits

[root@host-8-161 rpm]# cat /etc/security/limits.conf

# End of file
 oracle soft nofile 1024
 oracle hard nofile 65536
 oracle soft nproc 2047
 oracle hard nproc 16384
 oracle soft stack 10240
 oracle hard stack 10240
 oracle soft memlock 3145728
 oracle hard memlock 3145728

 

  • Set the display and try running runinstaller
  • .. fails with PRVF-0002 Unable to retrieve local node name
  • Added the hostname and IP to the local /etc/hosts and the install continued.
  • Pre-installation checks give warning about kernel parameters and swap size… but it does offer me a fixit script for the kernel parameters. Need to ensure that these changes to parameters are added to /etc/sysctl.conf
  • Ran the fixit, and still some parameters giving a warning – semms etc – I guess these would need a reboot. So the kernel parameters will need reviewing

Things I might want to consider adding to the /etc/sysctl.conf (stolen from another system)


kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65536
kernel.shmmni = 4096
kernel.shmmax = 229916494233
kernel.shmall = 28065978

 

After the install completed, the database started ok.

 

 

 

 

Creating LDOMs on Oracle Linux 6.7 SPARC

Lots of things to work out in advance

  1. What disks are available for use by my LDOM? I have a couple of disks, but I’m going to try creating the LDOM virtual disks on logical volumes hosted on the disk /dev/sdc
  2. What networking can I use? This is fairly simple, I only have 1 active network connection on eth0 so this will have to be virtualised
  3. How much resource is in the server, and how much can I give to my guest domain? You can see the total resource available in ldm ls.  I know I have 2 x SPARC M7 CPU, each with 32 cores, and 8 threads per core.
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
primary active -ndcv- UART 512 958G 0.0% 0.0% 4h 40m

Use GNU-Parted to partition the disk

Sorry this part was written retrospectively – I had multiple problems with the creating of the device to host the LDOM operating system. This manifested itself as

  1. No stability of boot device. If I gave my LDOM an entire disk to use as a boot device, it would get a boot sector installed in the expected place. On power on/poweroff of the server, the Grub boot loader did use the OS image for the guest LDOM to boot the primary LDOM. I got round this by giving the guest LDOMs slices on a disk.
  2. Not very stable device tree. If you use the /dev/sdX type names to refer to devices in your LDOM definition,  this device  name can change on reboot. So use something more stable like the WWN of the device.

You can see which disks are available using lsscsi

[root@host-8-160 ~]# lsscsi
[0:0:0:0] disk HITACHI H109060SESUN600G A690 /dev/sda 
[0:0:1:0] disk HGST HSCAC2DA4SUN400G A29A /dev/sdb 
[0:0:2:0] disk HGST H101812SFSUN1.2T A770 /dev/sdc 
[0:0:3:0] disk HGST H101812SFSUN1.2T A770 /dev/sdd 
[1:0:0:0] disk HGST HSCAC2DA4SUN400G A122 /dev/sde 
[1:0:1:0] disk HGST HSCAC2DA4SUN400G A122 /dev/sdf 
[8:0:0:0] cd/dvd SUN Remote ISO CDROM 1.01 /dev/sr0 
[9:0:0:0] cd/dvd TEAC DV-W28S-B AT11 /dev/sr1 
[10:0:0:0] disk MICRON eUSB DISK 1112 /dev/sdg

I am going to use one of the 1.2 TB disks as the boot device for the guest LDOM.

I used GNU Parted to label the disk with 2 partitions. The tool works in both GB/MB (1000 bytes to a kb) and GiB/MiB (1024 bytes to a KiB)

parted /dev/sdc

(parted) p
Model: HGST H101812SFSUN1.2T (scsi)
Disk /dev/sdc: 1200GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 1049kB 537GB 537GB ext3 host854
 2 537GB 1075GB 538GB host161

(parted) quit

I created filesystems on the partitions – I don’t think this required, but sometimes OS installers are unhappy if the disk is completely blank.

 

 

[root@host-8-160 ~]# mkfs -t ext4 -L host8161 /dev/sdc2
mke2fs 1.43-WIP (20-Jun-2013)
Filesystem label=host8161
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32833536 inodes, 131334144 blocks
6566707 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
4008 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
 102400000

Allocating group tables: done 
Writing inode tables: done 
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

 

[root@host-8-160 ~]# parted /dev/sdc
GNU Parted 2.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p 
Model: HGST H101812SFSUN1.2T (scsi)
Disk /dev/sdc: 1200GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 1049kB 537GB 537GB ext4 host854
 2 537GB 1075GB 538GB ext4 host161

 

As I had problems with device tree stability, I looked for a more stable naming method. Under the /dev/disk/ directory there are more stable naming interfaces that refer to characteristics that do not change, such as wwn. This is under the /dev/disk/by-id

 

[root@host-8-160 by-id]# ls -l wwn-0x5000cca02d021474-part1
lrwxrwxrwx. 1 root root 10 Jun 12 16:19 wwn-0x5000cca02d021474-part1 -> ../../sdc1
[root@host-8-160 by-id]# ls -l wwn-0x5000cca02d021474-part2
lrwxrwxrwx. 1 root root 10 Jun 12 16:19 wwn-0x5000cca02d021474-part2 -> ../../sdc2

 

 

Add the default services

Enable bridge control – there is a bunch of stuff in the release notes about the difference in virtual switch architecture for ldoms in linux.

http://docs.oracle.com/cd/E37670_01/E86243/html/ConfigureServicesControlDomain.html

The process is to change a file as follows

 

# sed -i '/SUBSYSTEM/ s/^#//' /etc/udev/rules.d/99-vsw.rules

and reboot.

You will not be able to see anything in the output from brctl show until the domain is bound.

Create the Virtual Consoles, Virtual Network Switch and Virtual disk Service

[root@host-8-160 ~]# ldm add-vcc port-range=5000-5100 primary-vcc0 primary
LDom primary does not support dynamic reconfiguration of IO devices
Initiating a delayed reconfiguration operation on the primary domain.
All configuration changes for other domains are disabled until the primary
domain reboots, at which time the new configuration for the primary domain
will also take effect.
[root@host-8-160 ~]# ldm add-vds primary-vds0 primary
------------------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
------------------------------------------------------------------------------

[root@host-8-160 ~]# ldm add-vsw net-dev=eth0 primary-vsw0 primary
------------------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.


[root@host-8-160 ~]# ldm list-services
VCC
 NAME LDOM PORT-RANGE
 primary-vcc0 primary 5000-5100

VSW
 NAME LDOM MACADDRESS NET-DEV DVID|PVID|VIDs
 ---- ---- ---------- ------- --------------
 primary-vsw0 primary 00:14:4f:fb:cd:dc eth0 1|1|--

VDS
 NAME LDOM VOLUME OPTIONS MPGROUP DEVICE
 primary-vds0 primary

Reconfigure primary to free resources for the guest domain

I am going to assign 96 cores to the primary domain and 100GB memory.

[root@host-8-160 ~]# ldm set-vcpu 96 primary
------------------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
------------------------------------------------------------------------------

------------------------------------------------------------------------------

[root@host-8-160 ~]# ldm set-memory 100G primary
------------------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
------------------------------------------------------------------------------

Now reboot to activate the new configuration.

Create the Guest

This guest will have fully virtual I/O.

Create a virtual device to act as the DVD to allow the OS to be booted.

[root@host-8-160 ~]# ldm add-vdsdev /sfw/OL-201705232017-R6-U7-sparc-dvd.iso iso_vol@primary-vds0

Not all ldm commands have been implemented on Linux, so you cannot do some things such as add vcpu by core.. e.g

[root@host-8-160 ~]# ldm add-vcpu --core 16 host-8-161

Usage:
 ldm add-vcpu <number> <ldom>

My domain will be called host-8-161 to match the planned unix hostname.

[root@host-8-160 ~]# ldm add-domain host-8-161
[root@host-8-160 ~]# ldm add-vcpu 96 host-8-161
[root@host-8-160 ~]# ldm add-memory 100G host-8-161
[root@host-8-160 ~]# ldm add-vnet linkprop=phys-state vnet1 primary-vsw0 host-8-161
[root@host-8-160 ~]# ldm add-vdsdev /dev/disk/by-id/wwn-0x5000cca02d021474-part2 boot-8-161@primary-vds0
[root@host-8-160 ~]# ldm add-vdisk boot-8-161 boot-8-161@primary-vds0 host-8-161

I am also going to add the dvd device to allow the OS to be booted from here

[root@host-8-160 ~]# ldm add-vdisk vdisk_iso iso_vol@primary-vds0 host-8-161

Now bind the domain.

[root@host-8-160 ~]# ldm bind host-8-161
At this point you will be able to see output in the brctl show command
[root@host-8-160 ~]# brctl show
bridge name   bridge id              STP enabled  interfaces
              vsw0 8000.0010e08a4806 no           eth0
                                                  vif0.0

Start the domain

[root@host-8-160 ~]# ldm start host-8-161
LDom host-8-161 started

Connect to the console. This is different than on Solaris SPARC in that you use the ldmconsole command. To exit from this you use <ctrl>q

[root@host-8-160 ~]# ldmconsole host-8-161

{0} ok banner

SPARC T7-2, No Keyboard
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.40.5, 256.0000 GB memory installed, Serial #83519177.
Ethernet address 0:14:4f:fa:66:c9, Host ID: 84fa66c9.


Booting and installing the Guest

Now we have the Open Boot Prom (OBP) ‘ok’ prompt which is familiar to people who work on SPARC Solaris.

We can see what device aliases have been created

{0} ok devalias
vdisk_iso       /virtual-devices@100/channel-devices@200/disk@1
boot-8-161      /virtual-devices@100/channel-devices@200/disk@0
vnet1           /virtual-devices@100/channel-devices@200/network@0
net             /virtual-devices@100/channel-devices@200/network@0
disk            /virtual-devices@100/channel-devices@200/disk@0
virtual-console /virtual-devices/console@1
name            aliases

 

I can now boot from my virtual iso device and install Linux

{0} ok boot vdisk_iso - install

After that the install is similar to the process documented in Installing Oracle Linux for SPARC on a T7-2

You will need to manually configure the networking and hostname, yum updates and install dtrace if required.

Check the name assigned to the virtualised network interface

[root@localhost ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
 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: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
 link/ether 00:14:4f:fb:91:5d brd ff:ff:ff:ff:ff:ff

Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 and set the correct parameters for your environment.

[root@host-8-161 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:14:4F:FB:91:5D
TYPE=Ethernet
UUID=eb521b4c-7e70-4963-af78-550163d2b214
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=1.2.3.161
PREFIX=22
GATEWAY=1.2.3.1
DNS1=1.2.34.4
DNS2=1.2.34.5
DOMAIN=blah.com
[root@host-8-161 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=host-8-161.blah.com

 

Troubleshooting communication problems with the service processor

I couldn’t contact the service processor to save the spconfig

[root@host-8-160 ~]# ldm ls-spconfig
The requested operation could not be performed because the communication
channel between the LDoms Manager and the system controller is down.
The ILOM interconnect may be disabled or down.

[root@host-8-160 ~]# ip addr show usb0
Device "usb0" does not exist.

 

My current settings

-> show /SP/network/interconnect hostmanaged

/SP/network/interconnect
 Properties:
 hostmanaged = true

-> show /SP/network/interconnect state

/SP/network/interconnect
 Properties:
 state = disabled

 

 

It should be..

-> show /SP/network/interconnect hostmanaged

/SP/network/interconnect
 Properties:
 hostmanaged = false

-> show /SP/network/interconnect state

/SP/network/interconnect
 Properties:
 state = enabled

After changing this – the usb0 network device should be available in the operating system.

[root@host-8-160 ~]# ip addr show usb0
10: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
 link/ether 02:21:28:57:47:17 brd ff:ff:ff:ff:ff:ff

Hmm… still not quite right. It doesn’t have a network address assigned.

Try resetting the SP… no difference

rebooted the OS..

 

Success.

[root@host-8-160 ~]# ip addr show usb0
8: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
 link/ether 02:21:28:57:47:17 brd ff:ff:ff:ff:ff:ff
 inet 169.254.182.77/24 brd 169.254.182.255 scope global usb0
 valid_lft forever preferred_lft forever
 inet6 fe80::21:28ff:fe57:4717/64 scope link 
 valid_lft forever preferred_lft forever
[root@host-8-160 ~]# ldm ls-spconfig

Installing Oracle Linux for SPARC on a T7-2

Preparation

Booting from the install media

We do not have Oracle Linux integrated with our standard install server so I am going to do this via CDROM redirection.

I have copied the ISO image to a NFS shared directory on my network, now I have to setup the redirection so the server will boot from this.

Make sure the ILOM timeout is set to at least 2 hours

-> show /SP/cli timeout

/SP/cli
 Properties:
 timeout = 0

 

The timeout is expressed in minutes – if it is set to 0 then the session will never timeout.

Make sure the KVMS services are enabled in the ILOM

-> show /SP/services/kvms/ servicestate

/SP/services/kvms
 Properties:
 servicestate = enabled

Set the host_storage_device to remote, and set the remote location to your NFS server

-> cd /SP/services/kvms/host_storage_device
/SP/services/kvms/host_storage_device

-> set mode=remote
Set 'mode' to 'remote'

-> cd remote
/SP/services/kvms/host_storage_device/remote

-> set server_uri=nfs://1.3.4.78:/Factory/OL-201705232017-R6-U7-sparc-dvd.iso
Set 'server_URI' to 'nfs://1.3.4.78:/Factory/OL-201705232017-R6-U7-sparc-dvd.iso'

Verify that the status is operational – if not check that your uri is correctly set

-> show /SP/services/kvms/host_storage_device status

/SP/services/kvms/host_storage_device
 Properties:
 status = operational

 

 

Set the system to not autoboot the existing solaris OS

-> set /HOST/bootmode script="setenv auto-boot? false"

Now start the system and login to the console to monitor

-> start /SYS
Are you sure you want to start /SYS (y/n)? y
Starting /SYS

-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y

 

At the ok prompt

{0} ok boot rcdrom - install
Boot device: /pci@308/pci@1/usb@0/hub@1/storage@1/disk@0 File and args: - install

 

GNU GRUB version 2.02~beta3

+----------------------------------------------------------------------------+
 |*Install linux using text mode (use DHCP) | 
 | Install linux using VNC (graphical) mode (use DHCP) |
 | Rescue mode (use DHCP) |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | | 
 +----------------------------------------------------------------------------+

Use the ^ and v keys to select which entry is highlighted. 
 Press enter to boot the selected OS, `e' to edit the commands 
 before booting or `c' for a command-line.

At this point you can select to test your install media – I said no at this point

I selected the install language of English

On the next screen I received an error

Error processing drive: ↑ │ 
 │ ▮ │ 
 │ platform-f03527f8-pci-0009:01:00.0-usb-0:1.3:1.0-scsi-0:0:0:0 ▒ │ 
 │ 1936MB ▒ │ 
 │ MICRON eUSB DISK ▒ │ 
 │ ▒ │ 
 │ This device may need to be reinitialized. ▒ │ 
 │ ▒ │ 
 │ REINITIALIZING WILL CAUSE ALL DATA TO BE LOST! ▒ │ 
 │ ▒ │ 
 │ This action may also be applied to all other disks needing ▒ │ 
 │ reinitialization. ↓ │ 
 │

the eUSB disk is used for the failback miniroot – I tried ‘ignore’ on this

On the next device which is the internal disk I selected ‘re-initialize’

Then I selected the correct timezone ‘Europe/London’

I entered a root password.

On the next screen I selected one disk out of the available devices and allowed it to completely re-initialize.

After that, the install completed in approximately 30 minutes.

Configure Networking

You cannot currently use nm-tool to configure the networking on  Oracle Linux 6 Update 7 (SPARC) as it can conflict with the ldomsmanager packages.

So – manually edit the /etc/sysconfig/network-scripts/ifcfg-eth0 and set the parameters to match your environment.

 

DEVICE=eth0
HWADDR=00:10:E0:8A:48:06
TYPE=Ethernet
UUID=57dfbae6-1cbc-4d25-8f9c-081238563128
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=1.2.3.160
PREFIX=22
GATEWAY=1.2.3.1
DNS1=1.2.3.4
DNS2=1.2.3.5
DOMAIN=blah.com

Restart the network stack.

 

 

[root@localhost network-scripts]# service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: pps pps0: new PPS source ptp0
ixgbe 0001:01:00.0: registered PHC device on eth0
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Determining if ip address 138.3.8.160 is already in use for device eth0...
[ OK ]
[root@localhost network-scripts]# ixgbe 0001:01:00.0 eth0: NIC Link is Up 10 Gbps, Flow Control: None
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

So now I have networking, but still no hostname set… so now I need to edit /etc/sysconfig/network and change the hostname. This will not be picked up until reboot..

[root@host-8-160 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=host-8-160.blah.com

 

Yum configuration

Next up.. get yum configured. I’m bound to need more packages so being able to get hold of the latest will be important.

I am going to connect to Oracle’s public yum servers, and my computer can access the internet via a proxy. So all I need to do is tell yum which proxy to use

edit /etc/yum.conf and add the proxy information

proxy=http://1.3.3.194:80

 

Verify that there is a file listing the repositories to use in /etc/yum.repos.d (this should be automatically configured at install)

ls -l /etc/yum.repos.d
total 4
-rw-r--r--. 1 root root 486 Jun 7 16:54 public-yum-ol6.repo

[root@host-8-160 yum.repos.d]# cat /etc/yum.repos.d/public-yum-ol6.repo 
[public_ol6_latest]
name=Oracle Linux $releasever Latest ( SPARC64 )
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/sparc64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1




[public_ol6_software_collections]
name=Software Collection Library release 1.2 packages for Oracle Linux 6 (SPARC64)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/SoftwareCollections/sparc64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

ok.. now I can install additional packages as required.

[root@host-8-160 yum.repos.d]# which wget
/usr/bin/which: no wget in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@host-8-160 yum.repos.d]# yum install wget
Loaded plugins: downloadonly, ulninfo
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wget.sparc64 0:1.12-5.el6_6.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

<snip>

Post install configuration / Issues from the release notes

In the release notes it says that to upgrade the OFED packages you need to remove them and re-install, also to get a new yum repo file.

 

 

 

 

 

 

Installing Cisco AnyConnect VPN on Ubuntu 16.04

I was struggling setting up a new VPN to connect to my servers at the office as vpnsetup.sh was failing

# ./vpnsetup.sh 
Installing Cisco AnyConnect Secure Mobility Client...
Extracting installation files to /tmp/vpn.0Zgby3/vpninst625702875.tgz...
Unarchiving installation files to /tmp/vpn.0Zgby3...
Starting Cisco AnyConnect Secure Mobility Client Agent...
Failed to start vpnagentd.service: Unit vpnagentd.service not found.

I found a bunch of articles on the internet saying that this was due to missing libraries so started with the first batch of recommendations…

# apt install -y lib32z1 lib32ncurses5

This still didn’t work.

So I tried the next one, which was to also install the network-manager-openconnect package and reload the daemons

# apt install network-manager-openconnect

# systemctl daemon-reload

Success!

# ./vpnsetup.sh 
Installing Cisco AnyConnect Secure Mobility Client...
Removing previous installation...
mv: cannot stat '/opt/cisco/vpn/*.log': No such file or directory
Extracting installation files to /tmp/vpn.yUyv15/vpninst922924093.tgz...
Unarchiving installation files to /tmp/vpn.yUyv15...
Starting Cisco AnyConnect Secure Mobility Client Agent...
Warning: vpnagentd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Done!