Advertisements

-bash: /dev/null: Permission denied

After login I received a message showing permission problem on /dev/null

-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied

On a working server, it is a character device with rw permissions

root@workinglinux:~ # ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Jul 21 15:56 /dev/null

root@linux:~ # ls -l /dev/null
-rw-r–r– 1 root root 0 Jul 25 13:11 /dev/null

Remove the file and recreate it

root@linux:~ # rm -f /dev/null
root@linux:~ # mknod -m 666 /dev/null c 1 3

root@linux:~ # ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Jul 25 13:13 /dev/null

Advertisements

Connecting to HTTPS page and receiving error (IE) This page can’t be displayed or (Firefox) Unable to Connect Securely

I have a IBM HMC (Hardware Management Console) that I needed to connect but I was receiving an error message about SSL/TSL

This page can’t be displayed

Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://172.16.2.26 again. If this error persists, it is possible that this site uses an unsupported protocol or cipher suite such as RC4 (link for the details), which is not considered secure. Please contact your site administrator.

Unable to Connect Securely

Firefox cannot guarantee the safety of your data on 172.16.2.26 because it uses SSLv3, a broken security protocol.
Advanced info: SSL_ERROR_UNSUPPORTED_VERSION

Learn more…

To solve this problem, you need to update the device you’re connecting to, since SSL v3 is not supported anymore.

Other work arounds:
Install an older version of Mozilla Firefox. Mozilla Firefox needs to be older than version 34. There is a portable version of Mozilla Firefox, Portable Edition that it is intended to be run from a pen drive. Unpack the application to your hard drive and run.
Run a virtual machine running Windows to run an older version of Internet Explorer

rpm Fatal error, run database recovery

The rpm database got corrupted

root@linux:~ # rpm -qa
rpmdb: Thread/process 17308/47583269480000 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 – (-30974)
error: cannot open Packages database in /var/lib/rpm
rpmdb: Thread/process 17308/47583269480000 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm

Make a backup copy of /var/lib/rpm

root@linux:/var/lib # cp -pr rpm rpm.original

Listing the files inside /var/lib/rpm

root@linux:/var/lib/rpm # ls -al
total 127840
drwxr-xr-x. 2 root root 4096 Jul 15 21:08 .
drwxr-xr-x. 33 root root 4096 Sep 6 03:18 ..
-rw-r–r–. 1 root root 5619712 Jul 15 20:45 Basenames
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Conflictname
-rw-r–r– 1 root root 73728 Sep 6 09:00 __db.001
-rw-r–r– 1 root root 237568 Sep 6 09:00 __db.002
-rw-r–r– 1 root root 1318912 Sep 6 09:00 __db.003
-rw-r–r– 1 root root 761856 Aug 31 14:30 __db.004
-rw-r–r–. 1 root root 3022848 Jul 15 20:45 Dirnames
-rw-r–r–. 1 root root 5558272 Jul 15 20:45 Filedigests
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Group
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Installtid
-rw-r–r–. 1 root root 40960 Jul 15 20:45 Name
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Obsoletename
-rw-r–r–. 1 root root 112074752 Jul 15 20:45 Packages
-rw-r–r–. 1 root root 2465792 Jul 15 20:45 Providename
-rw-r–r–. 1 root root 1171456 Jul 15 20:45 Provideversion
-rw-r–r–. 1 root root 12288 Jul 10 2015 Pubkeys
-rw-r–r–. 1 root root 438272 Jul 15 20:45 Requirename
-rw-r–r–. 1 root root 270336 Jul 15 20:45 Requireversion
-rw-r–r–. 1 root root 0 Jul 10 2015 .rpm.lock
-rw-r–r–. 1 root root 167936 Jul 15 20:45 Sha1header
-rw-r–r–. 1 root root 81920 Jul 15 20:45 Sigmd5
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Triggername

Removing all /var/lib/rpm/___db.XXX files

root@linux:/var/lib/rpm # rm -f /var/lib/rpm/__*

Listing the files again

root@linux:/var/lib/rpm # ls -la
total 125720
drwxr-xr-x. 2 root root 4096 Sep 6 09:07 .
drwxr-xr-x. 34 root root 4096 Sep 6 09:07 ..
-rw-r–r–. 1 root root 5619712 Jul 15 20:45 Basenames
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Conflictname
-rw-r–r–. 1 root root 3022848 Jul 15 20:45 Dirnames
-rw-r–r–. 1 root root 5558272 Jul 15 20:45 Filedigests
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Group
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Installtid
-rw-r–r–. 1 root root 40960 Jul 15 20:45 Name
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Obsoletename
-rw-r–r–. 1 root root 112074752 Jul 15 20:45 Packages
-rw-r–r–. 1 root root 2465792 Jul 15 20:45 Providename
-rw-r–r–. 1 root root 1171456 Jul 15 20:45 Provideversion
-rw-r–r–. 1 root root 12288 Jul 10 2015 Pubkeys
-rw-r–r–. 1 root root 438272 Jul 15 20:45 Requirename
-rw-r–r–. 1 root root 270336 Jul 15 20:45 Requireversion
-rw-r–r–. 1 root root 0 Jul 10 2015 .rpm.lock
-rw-r–r–. 1 root root 167936 Jul 15 20:45 Sha1header
-rw-r–r–. 1 root root 81920 Jul 15 20:45 Sigmd5
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Triggername

Rebuilding database indices from installed package headers

rpm {–initdb|–rebuilddb} [-v] [–dbpath DIRECTORY] [–root DIRECTORY]

Use –initdb to create a new database if one doesn’t already exist (existing database is not overwritten), use –rebuilddb to rebuild the
database indices from the installed package headers.

root@linux:/var/lib/rpm # rpm –rebuilddb

rpm doesn’t return any errors.

root@linux:/var/lib/rpm # rpm -qa | wc -l
927

Installing Linux on Oracle Virtualbox – Connecting with Putty terminal emulator

Login as root and run ip address list to discover the IP address that the server got. In my case it is 192.168.56.101

Download Putty. Insert IP address and click on Open button

Login with an username and password.

Installing Linux on Oracle Virtualbox – CentOS 6

First perform these steps – Installing Linux on Oracle Virtualbox – Basic Setup

Insert the media for CentOS 6 then start the virtual machine

Choose Install or upgrade an existing system

Skip media test

Click Next

Choose a language

Choose your keyboard

Choose basic storage. The other option is to use SAN LUN devices

Yes, discard any data

Set a hostname and then click Configure Network

Edit both network interfaces

Click on Connect Automatically

Choose nearest city to calculate the time

Set root password

Replace existing system

Write changes to disk

Install a minimal server. You can install additional software later

Then reboot

Continue to Installing Linux on Oracle Virtualbox – Connecting with Putty terminal emulator

Installing Linux on Oracle Virtualbox – Basic Setup

Create a new virtual machine. I’m calling mine CentOS 6 Base

Set how much memory you would like. I’m setting mine with 1GB of RAM

Creating a new hard drive

Choose VDI (VirtualBox Disk Image)

Dynamically allocated

CentOS 6 Base is the name and I set to 20GB

Checking Virtual Machine Properties. Network section, Adapter 1 set to NAT

Adapter 2 set to Host-only adapter

If you are behind a corporate proxy, go to File, Preferences, and set Proxy to your proxy and port

Continue to Installing Linux on Oracle Virtualbox – CentOS 6

Shrinking ext4 filesystem

I’m creating a new volume group with 3 10GB disks

root@linux:~ # pvcreate /dev/sdc
Physical volume “/dev/sdc” successfully created
root@linux:~ # pvcreate /dev/sdd
Physical volume “/dev/sdd” successfully created
root@linux:~ # pvcreate /dev/sde
Physical volume “/dev/sde” successfully created

root@linux:~ # vgcreate appvg /dev/sdc /dev/sdd /dev/sde
Volume group “appvg” successfully created

root@linux:~ # vgs appvg
VG #PV #LV #SN Attr VSize VFree
appvg 3 0 0 wz–n- 29.99g 29.99g

Creating a new 25GB logical volume

root@linux:~ # lvcreate -L 25g -n applv appvg
Logical volume “applv” created.

Creating a filesystem

root@linux:~ # mkfs -t ext4 /dev/appvg/applv
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1638400 inodes, 6553600 blocks
327680 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
200 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

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

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

Mounting the filesystem

root@linux:~ # mkdir /app

root@linux:~ # mount /dev/appvg/applv /app

root@linux:~ # df -hP /app
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/appvg-applv 25G 44M 24G 1% /app

I will remove the disk /dev/sde from the volume group. 25GB logical volume will shrink to 20GB.

Checking which disks the logical volume is using

root@linux:~ # lvdisplay -m /dev/mapper/appvg-applv
— Logical volume —
LV Path /dev/appvg/applv
LV Name applv
VG Name appvg
LV UUID 9tofzm-1zBU-DfbM-nmws-lqj7-QULb-U4Reqh
LV Write Access read/write
LV Creation host, time centos6.setaoffice.com, 2017-06-29 16:53:18 -0300
LV Status available
# open 1
LV Size 25.00 GiB
Current LE 6400
Segments 3
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:6

— Segments —
Logical extents 0 to 2558:
Type linear
Physical volume /dev/sdc
Physical extents 0 to 2558

Logical extents 2559 to 5117:
Type linear
Physical volume /dev/sdd
Physical extents 0 to 2558

Logical extents 5118 to 6399:
Type linear
Physical volume /dev/sde
Physical extents 0 to 1281

Checking Total PE to calculate logical volume

root@linux:~ # pvdisplay /dev/sdc
— Physical volume —
PV Name /dev/sdc
VG Name appvg
PV Size 10.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID ZnR27c-LPaE-0ZQa-t0Hc-yWLf-v06d-et7fb5

root@linux:~ # pvdisplay /dev/sdd
— Physical volume —
PV Name /dev/sdd
VG Name appvg
PV Size 10.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID OZY6w8-fUq6-wbPE-ILcr-LwOP-AeaS-j2qd9E

Resizing logical volume

root@linux:~ # lvresize -l 5118 -r /dev/appvg/applv
fsck from util-linux-ng 2.17.2
/dev/mapper/appvg-applv: 11/1638400 files (0.0% non-contiguous), 146849/6553600 blocks
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/appvg-applv to 5240832 (4k) blocks.
The filesystem on /dev/mapper/appvg-applv is now 5240832 blocks long.

Size of logical volume appvg/applv changed from 25.00 GiB (6400 extents) to 19.99 GiB (5118 extents).
Logical volume applv successfully resized.

Checking which disks the logical volume is using

root@linux:~ # lvdisplay -m /dev/mapper/appvg-applv
— Logical volume —
LV Path /dev/appvg/applv
LV Name applv
VG Name appvg
LV UUID 9tofzm-1zBU-DfbM-nmws-lqj7-QULb-U4Reqh
LV Write Access read/write
LV Creation host, time centos6.setaoffice.com, 2017-06-29 16:53:18 -0300
LV Status available
# open 0
LV Size 19.99 GiB
Current LE 5118
Segments 2
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:6

— Segments —
Logical extents 0 to 2558:
Type linear
Physical volume /dev/sdc
Physical extents 0 to 2558

Logical extents 2559 to 5117:
Type linear
Physical volume /dev/sdd
Physical extents 0 to 2558

Removing disk from volume group and label from physical volume

root@linux:~ # vgreduce appvg /dev/sde
Removed “/dev/sde” from volume group “appvg”

root@linux:~ # pvremove /dev/sde
Labels on physical volume “/dev/sde” successfully wiped

Checking serial number of Oracle SPARC T5-8

Connect to ILOM

emerson@linux:~ $ ssh root@172.23.99.70
Password:

Oracle(R) Integrated Lights Out Manager

Version 3.2.5.6.b r103360

Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.

Warning: HTTPS certificate is set to factory default.

Hostname: ssccn1-sp

-> show /System

/System
Targets:
Open_Problems (1)
CPU_Modules
Processors
Memory
Power
Cooling
Storage
Networking
PCI_Devices
Firmware
Log

Properties:
health = Service Required
health_details = PM0 (Processor Module 0) is faulty. Type ‘show /System/Open_Problems’ for details.
open_problems_count = 1
type = Rack Mount
model = SuperCluster T5-8
qpart_id = Q9527
part_number = SuperCluster T5-8
serial_number = AK00300268
component_model = SPARC T5-8
component_part_number = 7087535
component_serial_number = SP00386386
system_identifier = Oracle SuperCluster T5-8 SP00386386
system_fw_version = Sun System Firmware 9.5.1.b 2015/10/01 16:33
primary_operating_system = Oracle Solaris 11.3 SPARC
primary_operating_system_detail = –
host_primary_mac_address = 00:10:e0:76:92:de
ilom_address = 172.23.99.70
ilom_mac_address = 00:10:E0:76:92:E7
locator_indicator = Off
power_state = On
actual_power_consumption = 3958 watts
action = (none)

Commands:
cd
reset
set
show
start
stop

Another way is to locate the manufacturing sticker on the front of the server or on the sticker on the side of the server

Red Hat Linux guest on VMware: Bringing up interface eth0: vmxnet3 device eth0 does not seem to be present, delaying initialization

I had a problem where I after a Red Hat Linux guest running on VMware was showing the following message on start up

Bringing up interface eth0: vmxnet3 device eth0 does not seem to be present, delaying initialization

To solve this problem, remove VMware Tools and reinstall it

UXMON: slave eno49 of bonding device bond0 in Red Hat Enterprise Linux 7

ATTENTION, RMC LEVEL 1 AGENT: This ticket will be automatically worked by the Automation Bus. Pls. ensure your Ticket List/View includes the “Assignee” column, monitor this ticket until the user “ABOPERATOR” is no longer assigned, BEFORE you start work on this ticket.
Node : linux.setaoffice.com
Node Type : Intel/AMD x64(HTTPS)
Severity : major
OM Server Time: 2017-03-07 09:50:03
Message : UXMON: slave eno49 of bonding device bond0
Msg Group : OS
Application : bondmon
Object : bond
Event Type :
not_found

Instance Name :
not_found

Instruction : The ‘cat /sys/class/net/bondX/slave_ethY/operstate’ command shows detail

Please check /var/opt/OV/log/OpC/bond_mon.log for more details

Running UXMONbroker we see that there are some files that don’t exist

root@linux:~ # /var/opt/OV/bin/instrumentation/UXMONbroker -check bondmon
Mon Mar 13 15:47:35 2017 : INFO : UXMONbondmon is running now, pid=17458
cat: /sys/class/net/bond0/slave_eno49/operstate: No such file or directory
Mon Mar 13 15:47:35 2017 : Major: slave eno49 of bonding device bond0
cat: /sys/class/net/bond0/slave_eno50/operstate: No such file or directory
Mon Mar 13 15:47:35 2017 : Major: slave eno50 of bonding device bond0
mv: ‘/dev/null’ and ‘/dev/null’ are the same file
Mon Mar 13 15:47:35 2017 : INFO : UXMONbondmon end, pid=17458

root@linux:~ # ls -l /sys/class/net/bond0/
total 0
-r–r–r– 1 root root 4096 Mar 2 13:35 addr_assign_type
-r–r–r– 1 root root 4096 Mar 7 17:38 address
-r–r–r– 1 root root 4096 Mar 7 17:38 addr_len
drwxr-xr-x 2 root root 0 Mar 2 13:35 bonding
-r–r–r– 1 root root 4096 Mar 7 17:38 broadcast
-rw-r–r– 1 root root 4096 Mar 7 17:38 carrier
-r–r–r– 1 root root 4096 Mar 7 17:38 carrier_changes
-r–r–r– 1 root root 4096 Mar 2 13:35 dev_id
-r–r–r– 1 root root 4096 Mar 7 17:38 dev_port
-r–r–r– 1 root root 4096 Mar 7 17:38 dormant
-r–r–r– 1 root root 4096 Mar 7 17:38 duplex
-rw-r–r– 1 root root 4096 Mar 7 17:38 flags
-rw-r–r– 1 root root 4096 Mar 7 17:38 gro_flush_timeout
-rw-r–r– 1 root root 4096 Mar 7 17:38 ifalias
-r–r–r– 1 root root 4096 Mar 2 13:35 ifindex
-r–r–r– 1 root root 4096 Mar 2 13:35 iflink
-r–r–r– 1 root root 4096 Mar 7 17:38 link_mode
lrwxrwxrwx 1 root root 0 Mar 7 17:38 lower_eno49 -> ../../../pci0000:00/0000:00:02.0/0000:06:00.0/net/eno49
lrwxrwxrwx 1 root root 0 Mar 7 17:38 lower_eno50 -> ../../../pci0000:00/0000:00:02.0/0000:06:00.1/net/eno50
-rw-r–r– 1 root root 4096 Mar 7 17:38 mtu
-rw-r–r– 1 root root 4096 Mar 7 17:38 netdev_group
-r–r–r– 1 root root 4096 Mar 7 17:38 operstate
-r–r–r– 1 root root 4096 Mar 2 13:35 phys_port_id
drwxr-xr-x 2 root root 0 Mar 2 13:41 power
drwxr-xr-x 34 root root 0 Mar 2 13:35 queues
-r–r–r– 1 root root 4096 Mar 7 17:38 speed
drwxr-xr-x 2 root root 0 Mar 2 13:41 statistics
lrwxrwxrwx 1 root root 0 Mar 2 13:35 subsystem -> ../../../../class/net
-rw-r–r– 1 root root 4096 Mar 7 17:38 tx_queue_len
-r–r–r– 1 root root 4096 Mar 2 13:35 type
-rw-r–r– 1 root root 4096 Mar 2 13:35 uevent

This is a Red Hat Enterprise Linux 7. Current HPOM have a bug that is querying the wrong file

root@linux:~ # cat /etc/*release
NAME=”Red Hat Enterprise Linux Server”
VERSION=”7.3 (Maipo)”
ID=”rhel”
ID_LIKE=”fedora”
VERSION_ID=”7.3″
PRETTY_NAME=”Red Hat Enterprise Linux”
ANSI_COLOR=”0;31″
CPE_NAME=”cpe:/o:redhat:enterprise_linux:7.3:GA:server”
HOME_URL=”https://www.redhat.com/”
BUG_REPORT_URL=”https://bugzilla.redhat.com/”

REDHAT_BUGZILLA_PRODUCT=”Red Hat Enterprise Linux 7″
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT=”Red Hat Enterprise Linux”
REDHAT_SUPPORT_PRODUCT_VERSION=”7.3″
Red Hat Enterprise Linux Server release 7.3 (Maipo)
Red Hat Enterprise Linux Server release 7.3 (Maipo)

Copy the bond_mon.cfg configuration file and disable this module

cp -p /var/opt/OV/bin/instrumentation/bond_mon.cfg /var/opt/OV/conf/OpC
vi /var/opt/OV/conf/OpC/bond_mon.cfg
disable = yes

root@linux:~ # /var/opt/OV/bin/instrumentation/UXMONbroker -check bondmon
root@linux:~ #

%d bloggers like this: