Pages

Saturday, November 26, 2016

Juniper Firewall SRX240H Crashed with Error 'nearing maxproc limit by uid 0,please see tuning(7) and login.conf(5)'

One of Juniper Firewall SRX240H had a serious crash. Manual reboot/shutdown did not work. To reset it, I would have to do a hard reset / power cycle device.

It would allow to log in from console, but you wont be able to see any configuration.

Here is outputs from this crashed Juniper SRX240H console:




{secondary:node0}
jonny@fw-1> show interfaces terse
Interface Admin Link Proto Local Remote
fxp0 up up
fxp0.0 up up inet 10.9.1.11/24
fxp1 up up
fxp1.0 up up inet 129.16.0.1/2
tnp 0x1100001
fxp2 up up
fxp2.0 up up tnp 0x1100001
gre up up
ipip up up
lo0 up up
lo0.16384 up up inet 127.0.0.1 --> 0/0
lo0.16385 up up inet 10.0.0.1 --> 0/0
10.0.0.16 --> 0/0
128.0.0.1 --> 0/0
128.0.0.4 --> 0/0
128.0.1.16 --> 0/0
lo0.32768 up up
lsi up up
mtun up up
pimd up up
pime up up
tap up up

{secondary:node0}
jonny@fw-1> show configuration
nearing maxproc limit by uid 0, please see tuning(7) and login.conf(5).
Process with Most Children- 0:swapper - Children - 60
Process with Most Children- 1:init - Children - 82
nearing maxproc limit by uid 0, please see tuning(7) and login.conf(5).
Process with Most Children- 1:init - Children - 82
nearing maxproc limit by uid 0, please see tuning(7) and login.conf(5).
Process with Most Children- 1:init - Children - 82
init died (signal 4, exit 0)
panic: Going nowhere without my init!
cpuid = 0
KDB: stack backtrace:
0x4afb64+0x20 (0x6,0,0x3f7eef10,0x4bef40) ra 0x4afb2c sz 0
0x4afaf0+0x3c (0x6,0,0x3f7eef10,0x4bef40) ra 0x4ae444 sz 32
0x4ae3c0+0x84 (0x6,0,0x3f7eef10,0x4bef40) ra 0x4453d4 sz 56
0x445360+0x74 (0x6,0,0x3f7eef10,0x4bef40) ra 0x445450 sz 40
0x445360+0xf0 (0x6,0,0x3f7eef10,0x4bef40) ra 0x44659c sz 40
0x446514+0x88 (0x6,0,0x3f7eef10,0x4bef40) ra 0x446cb8 sz 64
0x446c84+0x34 (0x6,0,0x3f7eef10,0x4bef40) ra 0x4b0724 sz 32
0x4b06e4+0x40 (0x6,0,0x3f7eef10,0x4bef40) ra 0x4b09e8 sz 40
0x4b0908+0xe0 (0x6,0,0x3f7eef10,0x4bef40) ra 0x4929d4 sz 32
0x492950+0x84 (0x6,0,0x3f7eef10,0x4bef40) ra 0x48d9d4 sz 48
0x48d8a8+0x12c (0x6,0,0x3f7eef10,0x4bef40) ra 0x4039e4 sz 3512
0x4039a8+0x3c (0x6,0x4d2608,0x3f7f0060,0x4bef40) ra 0x403e80 sz 40
0x403da0+0xe0 (0x6,0x4d2608,0x3f7f0060,0x4bef40) ra 0x3ffeefe0 sz 32
VA 0x3ffdefdc: not in user area or heuristics failed
_start+0xbfeeef00 (0x6,0x4d2608,0x3f7f0060,0x4bef40) ra 0 sz 0
pid 1, process: init
Uptime: 13m56s
Cannot dump. No dump device defined.
Ignoring watchdog timeout during boot/reboot
Ignoring watchdog timeout during boot/reboot
Ignoring watchdog timeout during boot/reboot
Ignoring watchdog timeout during boot/reboot
panic: Hardware watchdog timeout
cpuid = 0
Uptime: 16m19s
Cannot dump. No dump device defined.


NMI Exception on core:0
Watchdog status, core 0: 0xfffe6bffffb
FPA INT Summery: 0x0
Err EPC: 0x807c6d58
Trapframe Register Dump:
zero: 0000000000000000 at: fffffffffffffffe v0: 0000000000000001 v1: 000000000000000e
a0: 00000000000003e8 a1: 0000000000000001 a2: 00000000ffff8010 a3: 0000000010000010
t0: 00000000508008e1 t1: 0000000000000000 t2: 0000000004200029 t3: 0000000010000588
ta0: 0000000002000000 ta1: 0000000000000004 ta2: ffffffffc1cc3640 ta3: 0000000000000001
t8: 0000000023c34600 t9: 0000000008507580 s0: 000000000004f823 s1: 0000000038247ad4
s2: 00000000000927c0 s3: ffffffffc1cd0680 s4: ffffffff80c20000 s5: ffffffffd66a6ee8
s6: fffffffffffffffe s7: ffffffff80ae2d9c k0: 1a00000080c099e8 k1: 808042a80000000a
gp: ffffffff80c197b0 sp: ffffffffd66a6e78 s8: 0000000000000000 ra: ffffffff807c6d60
sr: 0000000050c808e5 mullo: 0000000005a0d200 mulhi: 0000000009600000
pc: ffffffff80a40bd8 cause: 0000000040008400 badvaddr: ffffffffc1d1a4d8
ErrPC: 0000000000000840
Current ticks/softticks 920517/824600, curproc [1] init
Core0: CacheErr(I/D: current: 0x7f7f0000000000/0x1130)

PCPU dump:
cpuid = 0
curthread = 0xc1ce0420: pid 1 "init"
ipis = 0x0
cpuid = 1
curthread = 0xc1ce5210: pid 21 "idle: cpu1"
ipis = 0x0
cpuid = 2
curthread = 0xc1ce5000: pid 20 "idle: cpu2"
ipis = 0x0
cpuid = 3
curthread = 0xc1ce1c60: pid 19 "idle: cpu3"
ipis = 0x0
cpuid = 4
curthread = none
ipis = 0x0
cpuid = 5
curthread = none
ipis = 0x0
cpuid = 6
curthread = none
ipis = 0x0
cpuid = 7
curthread = none
ipis = 0x0
cpuid = 8
curthread = none
ipis = 0x0
cpuid = 9
curthread = none
ipis = 0x0
cpuid = 10
curthread = none
ipis = 0x0
cpuid = 11
curthread = none
ipis = 0x0
Memory dump of 1024 words starting at 0x80000000
0x80000000: 082905e3 401a4000 00000000 800580e4
0x80000010: 80058148 800767f4 aaaaaaaa aaaaaaaa
0x80000020: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000030: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000040: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000050: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000060: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000070: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000080: 082905e3 401a4000 00000000 aaaaaaaa
0x80000090: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800000a0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800000b0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800000c0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800000d0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800000e0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800000f0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000100: 3c1b80d5 277bae68 7c1a003b 001ad0c0
0x80000110: 035bd821 403ad801 ff7a0000 401a6000
0x80000120: 335a0002 17400005 00000000 3c1a80a4
0x80000130: 275a2af0 03400008 00000000 3c1a807e
0x80000140: 275a70b0 03400008 00000000 1000ffff
0x80000150: 00000000 42000018 aaaaaaaa aaaaaaaa
0x80000160: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000170: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000180: 401a6000 401b6800 335a0010 001ad0c0
0x80000190: 337b007c 037ad825 3c1a80c0 275a5130
0x800001a0: 035bd021 8f5a0000 00000000 03400008
0x800001b0: 00000000 aaaaaaaa aaaaaaaa aaaaaaaa
0x800001c0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800001d0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800001e0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800001f0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000200: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000210: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000220: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000230: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000240: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000250: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000260: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000270: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000280: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000290: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800002a0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800002b0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800002c0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800002d0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800002e0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800002f0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000300: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000310: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000320: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000330: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000340: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000350: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000360: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000370: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000380: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x80000390: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800003a0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800003b0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800003c0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800003d0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800003e0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
0x800003f0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
Stack trace:
DELAY+0x4c (0x3e8,0x1,0xffff8010,0x10000010) ra 0x80118764 sz 32
xpt_polled_action+0x64 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x8011c93c sz 48
dashutdown+0xa0 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x8023ac58 sz 664
boot+0xd48 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x8023b910 sz 64
panic+0x8a8 (0x3e8,0x80d44dc8,0xffff8010,0x508008e1) ra 0x807df914 sz 72
panic_on_watchdog_timeout+0x78 (0x3e8,0x80d44dc8,0xffff8010,0x508008e1) ra 0x80804e2c sz 32
re_srxsme_watchdog_intr+0x158 (0x3e8,0x80d44dc8,0xffff8010,0x508008e1) ra 0x807b5068 sz 24
mips_handle_this_interrupt+0x8c (0x3e8,0x80d44dc8,0xffff8010,0x508008e1) ra 0x807b50fc sz 40
mips_handle_interrupts+0x60 (0x3e8,0x80d44dc8,0xffff8010,0x508008e1) ra 0x807b5528 sz 48
mips_interrupt+0x22c (0x3e8,0x80d44dc8,0xffff8010,0x508008e1) ra 0x80a420c4 sz 32
MipsKernIntr+0x140 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x807c6d60 sz 368
DELAY+0x54 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x80118764 sz 32
xpt_polled_action+0x64 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x8011c93c sz 48
dashutdown+0xa0 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x8023ac58 sz 664
boot+0xd48 (0x3e8,0x1,0xffff8010,0x10000010) ra 0x8023b910 sz 64
panic+0x8a8 (0x3e8,0x1,0xffff8010,0x3) ra 0x801f9930 sz 72
exit1+0x3dc (0x3e8,0x1,0xffff8010,0x3) ra 0x80245bf8 sz 80
sigexit+0x1814 (0x3e8,0x1,0xffff8010,0x3) ra 0x807c8aa8 sz 496
sendsig+0x51c (0x3e8,0x1,0xffff8010,0x3) ra 0x80246268 sz 528
sigexit+0x1e84 (0x3e8,0x1,0xffff8010,0x3) ra 0x4d2a84 sz 496
PC 0x4d2a84: not in kernel
uart_z8530_class+0x4d2a84 (0x3e8,0x1,0xffff8010,0x3) ra 0 sz 0
pid 1, process: init
Resetting the system now...
cpu_reset: Stopping other CPUs
timeout stopping cpus


U-Boot 1.1.6-JNPR-2.4 (Build time: Aug 31 2012 - 12:15:03)

SRX_240_HIGHMEM board revision major:2, minor:56, serial #: ACKF8991
OCTEON CN5230R-SCP pass 2.0, Core clock: 600 MHz, DDR clock: 333 MHz (666 Mhz data rate)
DRAM: 1024 MB
Starting Memory POST...
Checking datalines... OK
Checking address lines... OK
Checking 512K memory for U-Boot... OK.
Running U-Boot CRC Test... OK.
Flash: 4 MB
USB: scanning bus for devices...
Root Hub 0: 4 USB Device(s) found
Root Hub 1: 1 USB Device(s) found
scanning bus for storage devices... 2 Storage Device(s) found
Clearing DRAM........ done
BIST check passed.
1:00:00.0 Vendor/Device ID = 0x811210b5
1:01:07.0 Vendor/Device ID = 0xc72414e4
Boot Media: nand-flash usb
Net: octeth0
POST Passed
Press SPACE to abort autoboot in 1 seconds
ELF file is 32 bit
Loading .text @ 0x8f000078 (246924 bytes)
Loading .rodata @ 0x8f03c504 (13944 bytes)
Loading .rodata.str1.4 @ 0x8f03fb7c (16776 bytes)
Loading set_Xcommand_set @ 0x8f043d04 (100 bytes)
Loading .rodata.cst4 @ 0x8f043d68 (20 bytes)
Loading .data @ 0x8f044000 (5608 bytes)
Loading .data.rel.ro @ 0x8f0455e8 (120 bytes)
Loading .data.rel @ 0x8f045660 (136 bytes)
Clearing .bss @ 0x8f0456e8 (11656 bytes)
## Starting application at 0x8f000078 ...
Consoles: U-Boot console
Found compatible API, ver. 2.4

FreeBSD/MIPS U-Boot bootstrap loader, Revision 2.4
(builder@evenath.juniper.net, Fri Aug 31 12:18:02 UTC 2012)
Memory: 1024MB
[0]Booting from nand-flash slice 2
Un-Protected 1 sectors
writing to flash...
Protected 1 sectors
Loading /boot/defaults/loader.conf
/kernel data=0xb16d5c+0x134b2c syms=[0x4+0x8bbd0+0x4+0xcadc3]


Hit [Enter] to boot immediately, or space bar for command prompt.
Booting [/kernel]...
Kernel entry at 0x801000e0 ...
init regular console
Primary ICache: Sets 64 Size 128 Asso 4
Primary DCache: Sets 1 Size 128 Asso 64
Secondary DCache: Sets 512 Size 128 Asso 8
GDB: debug ports: uart
GDB: current port: uart
KDB: debugger backends: ddb gdb
KDB: current backend: ddb
kld_map_v: 0x8ff80000, kld_map_p: 0x0
Copyright (c) 1996-2016, Juniper Networks, Inc.
All rights reserved.
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
JUNOS 12.1X46-D55.3 #0: 2016-07-08 18:46:54 UTC
builder@quoarth.juniper.net:/volume/build/junos/12.1/service/12.1X46-D55.3/obj-octeon/junos/bsd/kernels/JSRXNLE/kernel
JUNOS 12.1X46-D55.3 #0: 2016-07-08 18:46:54 UTC
builder@quoarth.juniper.net:/volume/build/junos/12.1/service/12.1X46-D55.3/obj-octeon/junos/bsd/kernels/JSRXNLE/kernel
real memory = 1073741824 (1024MB)
avail memory = 509661184 (486MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
Security policy loaded: JUNOS MAC/pcap (mac_pcap)
Security policy loaded: JUNOS MAC/runasnonroot (mac_runasnonroot)
netisr_init: !debug_mpsafenet, forcing maxthreads from 4 to 1
cpu0 on motherboard
: CAVIUM's OCTEON 52XX CPU Rev. 0.8 with no FPU implemented
L1 Cache: I size 32kb(128 line), D size 8kb(128 line), sixty four way.
L2 Cache: Size 512kb, 8 way
obio0 on motherboard
uart0: <Octeon-16550 channel 0> on obio0
uart0: console (9600,n,8,1)
twsi0 on obio0
dwc0: <Synopsis DWC OTG Controller Driver> on obio0
usb0: <USB Bus for DWC OTG Controller> on dwc0
usb0: USB revision 2.0
uhub0: vendor 0x0000 DWC OTG root hub, class 9/0, rev 2.00/1.00, addr 1
uhub0: 1 port with 1 removable, self powered
uhub1: vendor 0x0409 product 0x005a, class 9/0, rev 2.00/1.00, addr 2
uhub1: single transaction translator
uhub1: 3 ports with 2 removable, self powered
umass0: STMicroelectronics ST72682 High Speed Mode, rev 2.00/2.10, addr 3
umass1: Kingston DataTraveler G3, rev 2.00/1.00, addr 4
dwc1: <Synopsis DWC OTG Controller Driver> on obio0
usb1: <USB Bus for DWC OTG Controller> on dwc1
usb1: USB revision 2.0
uhub2: vendor 0x0000 DWC OTG root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 1 port with 1 removable, self powered
cpld0 on obio0
pcib1: <Cavium on-chip PCIe HOST bridge> on obio0
Disabling Octeon big bar support
PCIe: Waiting for port 0 to finish reset
PCIe: Port 0 link active, 2 lanes
PCIe: Waiting for port 1 to finish reset
PCIe: Port 1 link active, 1 lanes
pcib1: Initialized controller
pci0: <PCI bus> on pcib1
pcib2: <PCI-PCI bridge> irq 0 at device 0.0 on pci0
pci1: <PCI bus> on pcib2
pci1: <serial bus, USB> at device 2.0 (no driver attached)
pci1: <serial bus, USB> at device 2.1 (no driver attached)
pci1: <network> at device 7.0 (no driver attached)
pcib0: <Cavium on-chip PCIe HOST bridge> on obio0
pci2: <PCI bus> on pcib0
pci2: <processor> at device 0.0 (no driver attached)
gblmem0 on obio0
octpkt0: <Octeon RGMII> on obio0
cfi0: <AMD/Fujitsu - 4MB> on obio0
Timecounter "mips" frequency 600000000 Hz quality 0
###PCB Group initialized for udppcbgroup
###PCB Group initialized for tcppcbgroup
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <Kingston DataTraveler G3 1.00> Removable Direct Access SCSI-0 device
da1: 40.000MB/s transfers
da1: 7639MB (15644912 512 byte sectors: 255H 63S/T 973C)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <ST ST72682 2.10> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 1000MB (2048000 512 byte sectors: 64H 32S/T 1000C)
Trying to mount root from ufs:/dev/da0s2a
WARNING: / was not properly dismounted
MFSINIT: Initialising MFSROOT
WARNING: / was not properly dismounted
Process-1 beginning MFSROOT initialization...
Creating MFSROOT...
/dev/md0: 20.0MB (40956 sectors) block size 16384, fragment size 2048
using 4 cylinder groups of 5.00MB, 320 blks, 640 inodes.
super-block backups (for fsck -b #) at:
32, 10272, 20512, 30752
Populating MFSROOT...
Creating symlinks...
Setting up mounts...
Continuing boot from MFSROOT...
Attaching /cf/packages/junos via /dev/mdctl...
Mounted junos package on /dev/md1...
N
WARNING: R/W mount of /cf/var denied. Filesystem is not clean - run fsck
mount/dev/bo0s3f : Operation not permitted
chflags: /var/packages/*: No such file or directory
umount: /dev/bo0s3f: unknown file system
Media check on da0
Automatic reboot in progress...
** /dev/da0s2a (NO WRITE)
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
500 files, 78381 used, 71657 free (17 frags, 8955 blocks, 0.0% fragmentation)
mount reload of '/' failed: Operation not supported

Verified junos signed by PackageProductionEc_2016 method ECDSA
Verified jboot signed by PackageProductionEc_2016 method ECDSA
Verified junos-12.1X46-D55.3-domestic signed by PackageProductionEc_2016 method ECDSA
Checking integrity of BSD labels:
s1: Passed
s2: Passed
s3: Passed
s4: Passed
** /dev/bo0s3e
** Last Mounted on /config
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
17 files, 52 used, 12386 free (26 frags, 1545 blocks, 0.2% fragmentation)

***** FILE SYSTEM MARKED CLEAN *****
** /dev/bo0s3f
** Last Mounted on /cf/var
** Phase 1 - Check Blocks and Sizes
PARTIALLY TRUNCATED INODE I=141
SALVAGE? yes

** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=22702 OWNER=0 MODE=100660
SIZE=245770 MTIME=Nov 21 16:32 2016
CLEAR? yes

UNREF FILE I=22715 OWNER=0 MODE=100660
SIZE=262144 MTIME=Nov 21 16:32 2016
CLEAR? yes

** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? yes

SUMMARY INFORMATION BAD
SALVAGE? yes

BLK(S) MISSING IN BIT MAPS
SALVAGE? yes

2251 files, 109315 used, 66003 free (379 frags, 8203 blocks, 0.2% fragmentation)

***** FILE SYSTEM MARKED CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****
Checking integrity of licenses:
JUNOS476910.lic: Passed
JUNOS476950.lic: Passed
JUNOS638415.lic: Passed
JUNOS649298.lic: Passed
JUNOS859875.lic: No recovery data
Checking integrity of configuration:
rescue.conf.gz: Passed
cd: can't cd to /etc/db/pkg
Loading configuration ...
Time and ticks drifted too much, resetting synchronization...
IDP policy daemon: [edit security idp idp-policy Space-IPS-Policy rulebase-ips rule 1 match]
IDP policy daemon: 'attacks'
IDP policy daemon: Please install the Signature Database
IDP policy daemon:
mgd: error: configuration check-out failed
Warning: Commit failed, activating partial configuration.
Warning: Edit the router configuration to fix these errors.
Setting initial options: .
Starting optional daemons: usbd.
Doing initial network setup:.
Initial interface configuration:
additional daemons: eventd.
Additional routing options:kern.module_path: /boot//kernel;/boot/modules -> /boot/modules;/modules/ifpfe_drv;/modules;
kld netpfe drv: ifpfed_dialer ipsec kld.
Doing additional network setup:.
Starting final network daemons:.
setting ldconfig path: /usr/lib /opt/lib
ldconfig: warning: /opt/lib: No such file or directory
starting standard daemons: cron.
Initial rc.mips initialization:.
Local package initialization:.
starting local daemons:set cores for group access
.
kern.securelevel: -1 -> 1
Creating JAIL MFS partition...
JAIL MFS partition created
boot.upgrade.uboot="0xBFC00000"
boot.upgrade.loader="0xBFE00000"
Boot media /dev/da0 has dual root support
ERROR: cannot mount /dev/da0s2a
** /dev/da0s1a
FILE SYSTEM CLEAN; SKIPPING CHECKS
clean, 71145 free (89 frags, 8882 blocks, 0.1% fragmentation)
Mon Nov 21 16:39:14 UTC 2016

fw-1 (ttyu0)

login: jonny
Password:

--- JUNOS 12.1X46-D55.3 built 2016-07-08 18:46:54 UTC
could not open user interface connection: management daemon not responding
Retry connection attempts ? [yes,no] (yes)
CLI Output END

After system crashed, it will do a reboot by itself, but it will get back into Bad_Page_Fault error then reboot itself again.


BAD_PAGE_FAULT: pid 1 (init), uid 0: pc 0x48d8dc got a write fault at 0x3f7ee3d0
Trapframe Register Dump:
zero: 0000000000000000 at: 0000000000000001 v0: 000000000051d748 v1: 000000000051d730
a0: 0000000000000000 a1: 00000000004cb298 a2: 000000003f7ef19c a3: 00000000004bef40
t0: 0000000000000009 t1: 0000000000000000 t2: 0000000000000004 t3: 0000000000000000
ta0: 0000000001ab2600 ta1: 0000000000000009 ta2: 0000000000000020 ta3: 000000000056f042
t8: 000000000056f034 t9: 000000000048d8a8 s0: 0000000000000006 s1: 00000000004d2a84
s2: 000000000000096f s3: 000000003f7f0268 s4: 0000000000000000 s5: 000000003f7f02ec
s6: 0000000000000019 s7: 0000000000000009 k0: 0000000000000000 k1: 0000000000000000
gp: 0000000000544f80 sp: 000000003f7ee3b8 s8: 0000000000564a80 ra: 00000000004039e4
sr: 0000000050808cf3 mullo: 0000000066666667 mulhi: 0000000000000000
pc: 000000000048d8dc cause: 000000000000000c badvaddr: 000000003f7ee3d0
Page table info for pc address 0x48d8dc: pte = 0x4032b45a
Dumping 4 words starting at pc address 0x48d8dc:
afbc0018 00808021 00a09821 2402fc00
cpuid = 0
BAD_PAGE_FAULT: pid 1 (init), uid 0: pc 0x48d8dc got a write fault at 0x3f7ee3d0
Trapframe Register Dump:
zero: 0000000000000000 at: 0000000000000001 v0: 000000000051d748 v1: 000000000051d730
a0: 0000000000000000 a1: 00000000004cb298 a2: 000000003f7ef19c a3: 00000000004bef40
t0: 0000000000000009 t1: 0000000000000000 t2: 0000000000000004 t3: 0000000000000000
ta0: 0000000001ab2600 ta1: 0000000000000009 ta2: 0000000000000020 ta3: 000000000056f042
t8: 000000000056f034 t9: 000000000048d8a8 s0: 0000000000000006 s1: 00000000004d2a84
s2: 000000000000096f s3: 000000003f7f0268 s4: 0000000000000000 s5: 000000003f7f02ec
s6: 0000000000000019 s7: 0000000000000009 k0: 0000000000000000 k1: 0000000000000000
gp: 0000000000544f80 sp: 000000003f7ee3b8 s8: 0000000000564a80 ra: 00000000004039e4
sr: 0000000050808cf3 mullo: 0000000066666667 mulhi: 0000000000000000
pc: 000000000048d8dc cause: 000000000000000c badvaddr: 000000003f7ee3d0
Page table info for pc address 0x48d8dc: pte = 0x4032b45a
Dumping 4 words starting at pc address 0x48d8dc:
afbc0018 00808021 00a09821 2402fc00
cpuid = 0



From another cluster member which is working normal, you will see some cluster status. 

{primary:node1}
admin@fw-2>
show chassis cluster status
Monitor Failure codes:
CS Cold Sync monitoring FL Fabric Connection monitoring
GR GRES monitoring HW Hardware monitoring
IF Interface monitoring IP IP monitoring
LB Loopback monitoring MB Mbuf monitoring
NH Nexthop monitoring NP NPC monitoring
SP SPU monitoring SM Schedule monitoring

Cluster ID: 1
Node Priority Status Preempt Manual Monitor-failures

Redundancy group: 0 , Failover count: 1
node0 200 secondary no no None
node1 100 primary no no None

Redundancy group: 1 , Failover count: 1
node0 0 hold yes no IF CS
node1 0 primary yes no CS

{primary:node1}
admin@fw-2>




After show it to JTAC, it was RMA-ed.





Saturday, November 19, 2016

Add “Related Links” Widgets for Your Websites and Blogs

The related posts are picked from your existing posts which has similar contents/labels/categories/tags. Some online services provide free widgets to show those related stories from your blog archive.It can under your post , or show at bottom of pages. Here are some popular websites to provide this free widget.
1. Addthis
AddThis is a social sharing tool that appears on a lot of websites. It is often displayed as a "share" button that expands to show a vast array of sharing options. Add this quickly allowed webmasters to add sharing features to their websites that fit well with the design and layout and didn't cost a ton of custom coding. The email updates from Addthis whenever there is a traffic spike on a certain page on the site or there is spike on sharing.
Addthis provides: .
  • Share Buttons
  • Follow Buttons
  • Related Posts
  • List Building
  • Link Promotion






2. Linkwithin

LinkWithin is a blog widget that appears under each post, linking to related stories from your blog archive.


The widget is free. It takes a minute to get the widget up and running on blog, no signup required!

3. Limk

Limk provides smarter content recommendations and interested in making your website visitors stay longer, and consume more of your content.


Limk is also only one I found it is working well on Weebly.com platform. Example link. You will also be able to get report how well your links have been clicked.
Limk Dashboard



4. Engageya
Engageya's Advantages:

  • Native contextual ad unit generates high traction rates and increased user engagement.
  • Technology is compatible with all languages and devices.
  • As your new advertising channel, it is an incremental revenue stream.





Reference:





Monday, November 14, 2016

Use Godaddy Domain with Openshift Apps

I have been using Openshift  to host my WordPress website www.51sec.org for a while. Domain 51sec.org was registered at GoDaddy and I was struggled with plain domain or naked domain 51sec.org not corrected pointing to my openshift App, although www.51sec.org is always working fine. Eventually after googled from Internet, I understood why and made it working . There are two different solutions, one is to use cloudflare domain services which is using flatten domain feature to achieve it. Another way is to configure Godaddy domain properly with forwarding option. Here are all steps for Godaddy configuration.


1. Openshift APP Alias Configuration

Open you openshift APP. Add www.51sec.org as your only Alias for this app.



Many people messed around this step since they think they thought plain or naked domain 51sec.org should be added too.




There are two types of error if you failed to keep only one alias www.51sec.org here when you try to use plain / naked domain to access your Openshift Apps.

  • Browsers will tell you your website page isn't working.

It has redirected you too many times. Chrome or Firefox will suggest you to try to clearing your cookies. But basically that is not the cause. Usually it caused by defined your plain / naked domain as alias in your Openshift app.



  • Browsers will open https://<plain/naked domain>/app instead of your real website.

Basically Openshift will redirect you to an not existed page https://<plain/naked domain>/app. It usually caused by DNS cache on your name service provider. You will need to wait around one hour to see if issue has been resolved.



2. GoDaddy Configuration

Log into GoDaddy account and go to GoDaddy Domain Manager dashboard You will only need to add one cname type record.

CNAME Host: WWW
Points to: 51sec-johnyan.rhcould.com
TTL: keep default value

That is enough.


Some domain provider allow you to add naked domain or allow A type record forward to a URL. But GoDaddy will not. To make my plain / naked domain 51sec.org to point to www.51sec.org, I will enable forwarding feature as shown below:

This Forwarding feature is in the same page as Domain Manager page. You just need to pull down to the bottom to see this option.

Forward to: www.51sec.org
Forward Type: Permannent (301)
Settings: Forward Only
Check Update my nameservers and DNS settings to support this change.

After above two steps, your Openshit App should start to support plain / naked domain access. It may take a while to take effect , but it will work. I found before it takes effect, your plain / naked domain might still direct to https://<plain/naked domain>/app page.

References:



Create a Sitemap Page or Table of Contents Page for Blogger

There are a couple ways to do it but many codes were using a .js file stored on google drive which is not working since early of 2016.

I have moved some .js code file to GITHUB and here are some valid links and screenshots for my blog http://91sec.blogspot.com.

1. Tabbed Sitemap Page

Demo page is here.




<div id="tabbed-toc">
<span class="loading">Loading 91sec.blogspot.com sitemap, please wait for a moment...</span></div>
<br />
<script type="text/javascript">
var tabbedTOC = {
blogUrl: "http://91sec.blogspot.com", // Enter your blog URL
containerId: "tabbed-toc", // Container ID
activeTab: 1, // The default active tab index (default: the first tab)
showDates: false, // `true` to show the post date
showSummaries: false, // `true` to show the posts summaries
numChars: 200, // Number of summary chars
showThumbnails: false, // `true` to show the posts thumbnails (Not recommended)
thumbSize: 40, // Default thumbnail size
noThumb: "", // A "no thumbnail" URL
monthNames: [ // Array of month names
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
newTabLink: true, // Open link in new window. `false` to open in same window
maxResults: 99999, // Maximum post results
preload: 0, // Load the feed after 0 seconds (option => time in milliseconds || "onload")
sortAlphabetically: true, // `false` to sort posts by published date
showNew: 7, // `false` to hide the "New!" mark in most recent posts or
//define how many recent posts are to be marked by changing the number
newText: " - <em style='color: white;padding: 1px 5px;border-radius: 20px;background-color: #F00;'>New!</em>" // HTML/CSS for
//the "New!" text
};
</script>
<script src="https://51sec.github.io/js/tabtoc.js" type="text/javascript"></script>
<style>
/*Sitemap */
#tabbed-toc {
width: 99%;
margin: 0 auto;
overflow: hidden !important;
position: relative;
color: #222;
border: 0;
border-top: 5px solid #FC0204;
background-color: #1D1D1D;
-webkit-transition: all 0.4s ease-in-out;
}
#tabbed-toc .loading {
display:block;
padding:5px 15px;
font:normal bold 11px Arial,Sans-Serif;
color:#FFF;
}
#tabbed-toc ul,
#tabbed-toc ol,
#tabbed-toc li {
margin:0;
padding:0;
list-style:none;
}
#tabbed-toc .toc-tabs {
width: 24.8%;
float: left !important;
}
#tabbed-toc .toc-tabs li a {
display:block;
font:normal bold 10px/28px Arial,Sans-Serif;
height:28px;
overflow:hidden;
text-overflow:ellipsis;
color:#ccc;
text-transform:uppercase;
text-decoration:none;
padding:0 12px;
cursor:pointer;
-webkit-transition: all 0.3s ease-in-out;
}
#tabbed-toc .toc-tabs li a:hover {
background-color: #515050;
color: #FFF;
}
#tabbed-toc .toc-tabs li a.active-tab {
background-color: #FFFC03;
color: #222;
position: relative;
z-index: 5;
margin: 0 -2px 0 0;
}
#tabbed-toc .toc-content,
#tabbed-toc .divider-layer {
width: 75%;
float: right !important;
background-color: #F5F5F5;
border-left: 5px solid #FFFC03;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: all 0.3s ease-in-out;
}
#tabbed-toc .divider-layer {
float:none;
display:block;
position:absolute;
top:0; right:0; bottom:0;
}
#tabbed-toc .panel {
position:relative;
z-index:5;
font:normal normal 10px Arial,Sans-Serif;
}
#tabbed-toc .panel li a {
display: block;
position: relative;
font-weight: bold;
font-size: 11px;
color: #222;
line-height: 2.8em;
height: 30px;
padding: 0 10px;
text-decoration: none;
outline: none;
overflow: hidden;
-webkit-transition: all 0.3s ease-in-out;
}
#tabbed-toc .panel li time {
display:block;
font-style:italic;
font-weight:400;
font-size:10px;
color:#666;
float:right;
}
#tabbed-toc .panel li .summary {
display:block;
padding:10px 12px;
font-style:italic;
border-bottom:4px solid #275827;
overflow:hidden;
}
#tabbed-toc .panel li .summary img.thumbnail {
float:left;
display:block;
margin:0 8px 0 0;
padding:4px;
width:72px;
height:72px;
border:1px solid #dcdcdc;
background-color:#fafafa;
}
#tabbed-toc .panel li:nth-child(even) {
background-color: #DBDBDB;
font-size: 10px;
}
#tabbed-toc .panel li a:hover,
#tabbed-toc .panel li a:focus,
#tabbed-toc .panel li a:hover time,
#tabbed-toc .panel li.bold a {
background-color:#222;
color:#FFF;
outline:none;
-webkit-transition: all 0.3s ease-in-out;
}
#tabbed-toc .panel li.bold a:hover,
#tabbed-toc .panel li.bold a:hover time {
background-color:#222;
}
@media (max-width:700px) {
#tabbed-toc {
background-color:#fff;
border:0 solid #888;
}
#tabbed-toc .toc-tabs,
#tabbed-toc .toc-content {
overflow:hidden;
width:auto;
float:none !important;
display:block;
}
#tabbed-toc .toc-tabs li {
display:inline;
float:left !important;
}
#tabbed-toc .toc-tabs li a,
#tabbed-toc .toc-tabs li a.active-tab {
background-color:#222;
color:#ccc;
}
#tabbed-toc .toc-tabs li a.active-tab {
color:#000;
}
#tabbed-toc .toc-content {
border:none;
}
#tabbed-toc .divider-layer,
#tabbed-toc .panel li time {
display:none;
}
}
</style>





2. Table of Contents
This page will display all of your posts sorted by post date. You can click Labels to display only certain labeled posts. Very powerful , but loading time will take a bit longer than others.
Demo page is here.



<style scoped="" type="text/css">
#bp_toc {background:#008CDB;color:#666;margin:0 auto;padding:5px;}
span.toc-note {padding:20px;margin:0 auto;display:block;text-align:center;color:#FAFAFA;font-family:'Trebuchet MS';font-weight:700;text-transform:uppercase;font-size:30px;line-height:normal;}
.toc-header-col1 {padding:10px;background-color:#f5f5f5;width:250px;}
.toc-header-col2 {padding:10px;background-color:#f5f5f5;width:75px;}
.toc-header-col3 {padding:10px;background-color:#f5f5f5;width:125px;}
.toc-header-col1 a:link, .toc-header-col1 a:visited, .toc-header-col2 a:link, .toc-header-col2 a:visited, .toc-header-col3 a:link, .toc-header-col3 a:visited {font-size:13px;
text-decoration:none;color:#aaa;font-family:'Trebuchet MS';font-weight:700;letter-spacing: 0.5px;}
.toc-header-col1 a:hover, .toc-header-col2 a:hover, .toc-header-col3 a:hover {
text-decoration:none;}
.toc-entry-col1, .toc-entry-col2, .toc-entry-col3 {background:#fdfdfd;padding:5px;padding-left:5px;font-size:89%}
.toc-entry-col1 a, .toc-entry-col2 a, .toc-entry-col3 a{color:#666;font-size:13px;}
.toc-entry-col1 a:hover, .toc-entry-col2 a:hover, .toc-entry-col3 a:hover{color:#e76e66;}
#bp_toc table {width:100%;margin:0 auto;counter-reset:rowNumber;}
.toc-entry-col1 {counter-increment:rowNumber;}
#bp_toc table tr td.toc-entry-col1:first-child::before {content: counter(rowNumber);min-width:1em;margin-right:0.5em;}
td.toc-entry-col2 {background:#fafafa;}
#comments {display:none;}
</style>
<div id="bp_toc" style="max-height:1200px;overflow:scroll;overflow-x:auto;">
</div>
<script src='https://51sec.github.io/js/tab-toc2.js' type='text/javascript'></script> <script src="/feeds/posts/summary?alt=json-in-script&amp;max-results=9999&amp;callback=loadtoc" type="text/javascript"></script>






3. SiteMap Sorted by Categories

Demo page is here.


<style>
p.labels a{color: #242424; text-transform: uppercase;font-size: 15px;}
a.post-titles {color: #0000FF;}
ol li{list-style-type:decimal;line-height:25px;}
</style>
<script>
//<![CDATA[
var postTitle=new Array();var postUrl=new Array();var postPublished=new Array();var postDate=new Array();var postLabels=new Array();var postRecent=new Array();var sortBy="titleasc";var tocLoaded=false;var numChars=250;var postFilter="";var numberfeed=0;function bloggersitemap(a){function b(){if("entry" in a.feed){var d=a.feed.entry.length;numberfeed=d;ii=0;for(var h=0;h<d;h++){var n=a.feed.entry[h];var e=n.title.$t;var m=n.published.$t.substring(0,10);var j;for(var g=0;g<n.link.length;g++){if(n.link[g].rel=="alternate"){j=n.link[g].href;break}}var o="";for(var g=0;g<n.link.length;g++){if(n.link[g].rel=="enclosure"){o=n.link[g].href;break}}var c="";if("category" in n){for(var g=0;g<n.category.length;g++){c=n.category[g].term;var f=c.lastIndexOf(";");if(f!=-1){c=c.substring(0,f)}postLabels[ii]=c;postTitle[ii]=e;postDate[ii]=m;postUrl[ii]=j;postPublished[ii]=o;if(h<10){postRecent[ii]=true}else{postRecent[ii]=false}ii=ii+1}}}}}b();sortBy="titleasc";sortPosts(sortBy);sortlabel();tocLoaded=true;displayToc2();document.write('</br><div class="sitemap-link"><a href="http://www.51sec.org" style="font-size: 10px; text-decoration:none; color: #5146CD;">51 Security Solutions</a></div>')}function filterPosts(a){scroll(0,0);postFilter=a;displayToc(postFilter)}function allPosts(){sortlabel();postFilter="";displayToc(postFilter)}function sortPosts(d){function c(e,g){var f=postTitle[e];postTitle[e]=postTitle[g];postTitle[g]=f;var f=postDate[e];postDate[e]=postDate[g];postDate[g]=f;var f=postUrl[e];postUrl[e]=postUrl[g];postUrl[g]=f;var f=postLabels[e];postLabels[e]=postLabels[g];postLabels[g]=f;var f=postPublished[e];postPublished[e]=postPublished[g];postPublished[g]=f;var f=postRecent[e];postRecent[e]=postRecent[g];postRecent[g]=f}for(var b=0;b<postTitle.length-1;b++){for(var a=b+1;a<postTitle.length;a++){if(d=="titleasc"){if(postTitle[b]>postTitle[a]){c(b,a)}}if(d=="titledesc"){if(postTitle[b]<postTitle[a]){c(b,a)}}if(d=="dateoldest"){if(postDate[b]>postDate[a]){c(b,a)}}if(d=="datenewest"){if(postDate[b]<postDate[a]){c(b,a)}}if(d=="orderlabel"){if(postLabels[b]>postLabels[a]){c(b,a)}}}}}function sortlabel(){sortBy="orderlabel";sortPosts(sortBy);var a=0;var b=0;while(b<postTitle.length){temp1=postLabels[b];firsti=a;do{a=a+1}while(postLabels[a]==temp1);b=a;sortPosts2(firsti,a);if(b>postTitle.length){break}}}function sortPosts2(d,c){function e(f,h){var g=postTitle[f];postTitle[f]=postTitle[h];postTitle[h]=g;var g=postDate[f];postDate[f]=postDate[h];postDate[h]=g;var g=postUrl[f];postUrl[f]=postUrl[h];postUrl[h]=g;var g=postLabels[f];postLabels[f]=postLabels[h];postLabels[h]=g;var g=postPublished[f];postPublished[f]=postPublished[h];postPublished[h]=g;var g=postRecent[f];postRecent[f]=postRecent[h];postRecent[h]=g}for(var b=d;b<c-1;b++){for(var a=b+1;a<c;a++){if(postTitle[b]>postTitle[a]){e(b,a)}}}}function displayToc(a){var l=0;var h="";var e="Post Title";var m="Click to sort by title";var d="Date";var k="Click to sort by date";var c="Category";var j="";if(sortBy=="titleasc"){m+=" (descending)";k+=" (newest first)"}if(sortBy=="titledesc"){m+=" (ascending)";k+=" (newest first)"}if(sortBy=="dateoldest"){m+=" (ascending)";k+=" (newest first)"}if(sortBy=="datenewest"){m+=" (ascending)";k+=" (oldest first)"}if(postFilter!=""){j="Click to view all"}h+="<table>";h+="<tr>";h+='<td class="header1">';h+='<a href="javascript:toggleTitleSort();" title="'+m+'">'+e+"</a>";h+="</td>";h+='<td class="header2">';h+='<a href="javascript:toggleDateSort();" title="'+k+'">'+d+"</a>";h+="</td>";h+='<td class="header3">';h+='<a href="javascript:allPosts();" title="'+j+'">'+c+"</a>";h+="</td>";h+='<td class="header4">';h+="Read all";h+="</td>";h+="</tr>";for(var g=0;g<postTitle.length;g++){if(a==""){h+='<tr><td class="entry1"><a href="'+postUrl[g]+'">'+postTitle[g]+'</a></td><td class="entry2">'+postDate[g]+'</td><td class="entry3">'+postLabels[g]+'</td><td class="entry4"><a href="'+postPublished[g]+'">Read</a></td></tr>';l++}else{z=postLabels[g].lastIndexOf(a);if(z!=-1){h+='<tr><td class="entry1"><a href="'+postUrl[g]+'">'+postTitle[g]+'</a></td><td class="entry2">'+postDate[g]+'</td><td class="entry3">'+postLabels[g]+'</td><td class="entry4"><a href="'+postPublished[g]+'">Read</a></td></tr>';l++}}}h+="</table>";if(l==postTitle.length){var f='<span class="toc-note">Show All '+postTitle.length+" Posts<br/></span>"}else{var f='<span class="toc-note">Show '+l+" posts by category '";f+=postFilter+"' the "+postTitle.length+" Total Posts<br/></span>"}var b=document.getElementById("toc");b.innerHTML=f+h}function displayToc2(){var a=0;var b=0;while(b<postTitle.length){temp1=postLabels[b];document.write("<p/>");document.write('<p class="labels"><a href="/search/label/'+temp1+'">'+temp1+"</a></p><ol>");firsti=a;do{document.write("<li>");document.write('<a class="post-titles" href="'+postUrl[a]+'">'+postTitle[a]+"</a>");if(postRecent[a]==true){document.write(' - <strong><span style="color: rgb(255, 0, 0);">New!</span></strong>')}document.write("</li>");a=a+1}while(postLabels[a]==temp1);b=a;document.write("</ol>");sortPosts2(firsti,a);if(b>postTitle.length){break}}}function toggleTitleSort(){if(sortBy=="titleasc"){sortBy="titledesc"}else{sortBy="titleasc"}sortPosts(sortBy);displayToc(postFilter)}function toggleDateSort(){if(sortBy=="datenewest"){sortBy="dateoldest"}else{sortBy="datenewest"}sortPosts(sortBy);displayToc(postFilter)}function showToc(){if(tocLoaded){displayToc(postFilter);var a=document.getElementById("toclink")}else{alert("Just wait... TOC is loading")}}function hideToc(){var a=document.getElementById("toc");a.innerHTML="";var b=document.getElementById("toclink");b.innerHTML='<a href="#" onclick="scroll(0,0); showToc(); Effect.toggle(\'toc-result\',\'blind\');">?? Display Table of Contents</a> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0mhEZXEZb_LGXrRF5lRZWOJ8wzzR59Vr0qYOEv9NpGvLXpcj-mzWHxT-eWnXoBnpYbvzfSviCzuYayVjxkyBe_9PbC4BFJRm8QKxzYf2C23RpDGXtYXnpExmhDgq5td2of2HGjWhcQJyO/s1600/new_icon.gif"/>'}function looptemp2(){for(var a=0;a<numberfeed;a++){document.write("<br>");document.write('Post Link : <a href="'+postUrl[a]+'">'+postTitle[a]+"</a><br>");document.write('Read all : <a href="'+postPublished[a]+'">'+postTitle[a]+"</a><br>");document.write("<br>")}};
//]]>
</script>
<script src="/feeds/posts/default?max-results=9999&amp;alt=json-in-script&amp;callback=bloggersitemap"></script>









Add Dropdown Menu in Blogger Website

Here are all codes I found from Internet to display a dropdown menu on my 91sec.blogspot.com website.




1 Add the following code to Template > Customize > Advanced > Add CSS. 
This will place the code in Template > Edit HTML.

/* ----- START DROPDOWN CSS ----- */

#navigationbar {
width: 100%; /* change the width of the navigation bar */
height: 40px; /* change the height of the navigation bar */
}

#navigationcss {
margin: 0 auto;
padding: 0;
}

#navigationcss ul {
float: none;
list-style: none;
margin: 0;
padding: 0;
overflow: visible;
}

#navigationcss li a, #navigationcss li a:link, #navigationcss li a:visited {
color: #ffffff; /* change color of the main links */
display: block;
margin: 0;
padding: 10px 30px;  /* change the first number for the top/bottom spacing, and the second number for left/right spacing */
}

#navigationcss li a:hover, #navigationcss li a:active {
color: #69b4ff ; /* change the color of the links when hovered over */
margin: 0;
padding: 10px 30px; /* make sure these are the same as the section above! */
}

#navigationcss li li a, #navigationcss li li a:link, #navigationcss li li a:visited {
background: #ffffff;  /* change the background color of the drop down box */
width: 150px;
color: #000000; /* change the color of the drop down links */
float: none;
margin: 0;
padding: 7px 10px; /* similar to above, change for the spacing around the links */
}

#navigationcss li li a:hover, #navigationcss li li a:active {
background: #69b4ff ; /* change the background color of drop down items on hover */
color: #ffffff; /* change the color of drop down links on hover */
padding: 7px 10px;  /* keep these the same as the above section */
}

#navigationcss li {
float: none;
display: inline-block;
list-style: none;
margin: 0;
padding: 0;
}

#navigationcss li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: auto;
width: 150px;
margin: 0;
padding: 0;
}

#navigationcss li:hover ul, #navigationcss li li:hover ul, #navigationcss li li li:hover ul, #navigationcss li.sfhover ul, #navigationcss li li.sfhover ul, #navigationcss li li li.sfhover ul {
left: auto;
}

/* ----- END DROPDOWN CSS ----- */




.tabs-outer, .tabs .widget ul {overflow: visible;}


]]></b:skin>

Note: Code ".tabs-outer, .tabs .widget ul {overflow: visible;}" is used to resolve the issue sometimes drop down menu invisible on some blogger template.

2.  Go to Layout > Add a new HTML/Javascript Gadget and add the following code to it. 
Different blogger template may have different layout to place this Gadget.




<!--Start Navigation -->
<div id="navigationbar">
<ul id='navigationcss'>
<li><a href="http://91sec.blogspot.com">Home</a></li>

<li><a href="https://91sec.blogspot.ca/p/sitemap2.html">Sitemap</a>
<ul>
<li><a href='https://91sec.blogspot.ca/p/sitemap2.html'>Sitemap Page</a></li>
<li><a href='https://91sec.blogspot.ca/p/sitemap_2.html'>Categories</a></li>
</ul>
</li>

<li><a href="">Resources</a>
<ul>
<li><a href='https://91sec.blogspot.ca/p/othe.html'>Online Resources</a></li>
<li><a href='https://91sec.blogspot.ca/p/new-things-to-learn.html'>Learning</a></li>
</ul>
</li>

<li><a href="">Tools</a>
<ul>
<li><a href='http://91sec.blogspot.com/p/tools.html'>Network Tools</a></li>
<li><a href='http://91sec.blogspot.com/2015/07/my-top-network-security-tools.html'>Security Tools</a></li>
<li><a href='http://91sec.blogspot.com/2013/08/some-of-my-network-troubleshooting-tools.html'>Internet Tools</a></li>
<li><a href='http://91sec.blogspot.com/2016/03/collection-of-website-and-tools-for.html'>Blogger Tools</a></li>
</ul>
</li>

<li><a href="">About</a>
<ul>
<li><a href='https://91sec.blogspot.ca/p/about-me.html'>About Me</a></li>
<li><a href='https://91sec.blogspot.ca/p/consulting-services.html'>Consulting</a></li>
<li><a href='https://91sec.blogspot.ca/p/services.html'>Services</a></li>
</ul>
</li>

<li><a href="http://www.51sec.org">51sec.org</a></li>
</ul>
</div>
<!--End Navigation -->