Header Shadow Image


OSPF: [EC 134217740] Packet[DD]: Neighbor 192.168.0.1 Negotiation fails.

Getting this?

2020/02/15 20:58:07 OSPF: [EC 134217740] Packet[DD]: Neighbor 192.168.0.1 Negotiation fails.

Clear up some space:

root@INTERNET-ROUTER:/jffs/ospf# ls -altri
total 668396
      1 drwxr-xr-x    9 root     root             0 Dec 31  1969 ..
     20 drwxr-xr-x    2 root     root             0 Dec 31  1969 .
     21 -rw——-    1 root     root     684436856 Feb 15 20:56 ospf.log
root@INTERNET-ROUTER:/jffs/ospf# du -sh ospf.log
652.7M  ospf.log
root@INTERNET-ROUTER:/jffs/ospf# df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock/4          96.0M     94.8M      1.2M  99% /jffs
root@INTERNET-ROUTER:/jffs/ospf# >ospf.log
root@INTERNET-ROUTER:/jffs/ospf# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                26.1M     26.1M         0 100% /
/dev/mtdblock/4          96.0M      5.6M     90.4M   6% /jffs
/dev/sda                  3.8G     33.4M      3.5G   1% /opt
root@INTERNET-ROUTER:/jffs/ospf# df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock/4          96.0M      5.3M     90.7M   6% /jffs
root@INTERNET-ROUTER:/jffs/ospf# uptime
 20:57:47 up 16:00,  load average: 3.74, 2.76, 2.65
root@INTERNET-ROUTER:/jffs/ospf#

And consider disabling debug logging:

# cat /tmp/ospfd.conf
!
! Zebra configuration saved from vty
!   2019/12/13 08:12:53
!
frr version 7.1
frr defaults traditional
!
hostname INTERNET-ROUTER
domainname
log file /jffs/ospf/ospf.log
!
!debug ospf ism
!debug ospf nsm
!debug ospf lsa
!debug ospf zebra
!debug ospf nssa
!debug ospf packet all

!
!
!
!
router ospf
 ospf router-id 192.168.0.6
 log-adjacency-changes
 network 192.168.0.0/24 area 0
!
line vty
!

 

If that doesn't work, the solution on this page might be of help?

Cheers,
TK

OpenVPN + DD-WRT: CCD files not restricting users VLAN access while OSPF is enabled.

Here's the scenario.  I've set up my OpenVPN on my DD-WRT Asus router. My OpenVPN network is 10.1.1.0 / 255.255.255.0 ( tun2 ). I can connect to my VPN Server remotely by tethering my laptop to my mobile phone ( On my Wireless Provider's Network ) then connecting over to my external ISP IP on which my OpenVPN server is residing on. I see the CCD files get applied to my User, as they should, restricting me to a specific VLAN ( 10.30.0.X ). My CCD config is:

CCD File:
push "route 10.30.0.0 255.255.255.0"

Now the router where my OpenVPN resides also has a local IP address from the local subnet that is my local network and an external one for my ISP. This local VLAN IP is on br0: 192.168.0.100 . My external ISP IP is on vlan2@eth0 : 123.123.123.100 .

Connecting to devices on 10.30.0.X, works fine, which is expected. But I can also connect to devices on my local network which is on 192.168.0.X . I should not be able too. When I check where I logged in from on the target machine, the IP listed is 192.168.0.100, which is the OpenVPN Server local IP, NOT my VPN IP 10.1.1.2 . Because of this, restricting traffic via F/W rules doesn't work against 10.1.1.0/24 .

Appears when I initiate an SSH connection from my laptop to a local machine on 192.168.0.X, for example, the OpenVPN server forwards those packets from tun2 over to br0 from which it then initiates a connection to the target machine. Since the connection appears to be routed through br0, which is on 192.168.0.100, the connection to other machines on the local subnet of course works.

This Asus router is also running OSPF. ( This is a routing protocol that establishes routes automatically. )

Including a visual of the setup.

https://i0.wp.com/www.microdevsys.com/WordPressImages/OpenVPN-Restricting-Connections.png?ssl=1

Notice above that traffic to the 10.30.0.101 IP works as it should. The configuration for the whole setup is as follows:

OpenVPN Server Settings:

dh /jffs/etc/openvpn/dh.pem
ca /jffs/etc/openvpn/ca.crt
cert /jffs/etc/openvpn/cert.pem
key /jffs/etc/openvpn/key.pem
tls-auth /jffs/etc/openvpn/ta.key 0
keepalive 10 120
verb 3
mute 3
syslog
writepid /var/run/openvpnd.pid
management 127.0.0.1 14
management-log-cache 100
topology subnet
script-security 2
port 11194
proto tcp4-server
cipher aes-256-cbc
auth sha256
client-connect /tmp/openvpn/clcon.sh
client-disconnect /tmp/openvpn/cldiscon.sh
client-config-dir /jffs/etc/openvpn/ccd
comp-lzo adaptive
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
client-to-client
push "redirect-gateway def1"

tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
tcp-nodelay
tun-mtu 1500
mtu-disc yes
server 10.1.1.0 255.255.255.0
dev tun2
auth-nocache

OpenVPN Client Configuration:  

client
dev tun2
proto tcp
remote my.website.com 11194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert GuestUser.crt
key GuestUser.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 3
auth-nocache

F/W Rules:

# ----------------------
# VPN Specific
# ----------------------
# Allow external connections to 11194
iptables -A INPUT -p tcp --dport 11194 -d $(nvram get wan_ipaddr) -j ACCEPT
iptables -A INPUT -p udp --dport 11194 -d $(nvram get wan_ipaddr) -j ACCEPT

# Allow Web Traffic
iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -j MASQUERADE

# Block VPN clients from accessing anything else on the local network.
iptables -A INPUT -s 10.1.1.0/24 -j REJECT --reject-with icmp-port-unreachable
iptables -A OUTPUT -s 10.1.1.0/24 -j REJECT --reject-with icmp-port-unreachable

Client CCD File:

push "route 10.3.0.0 255.255.255.0"

 

The Resolution

The resolution to this was much simpler then it appeared at first.  Turns out this line:

push "redirect-gateway def1"

was causing all traffic to pass through the default gateway, which in this case is 192.168.0.100.  So the CCD files were effectively ignored.  Removed the above line from the configuration and VLAN restriction based on CCD definition worked like a charm.

HTH,
TK

REF: https://community.openvpn.net/openvpn/wiki/RoutedLans
REF ( Own Post – OpenVPN ): https://forums.openvpn.net/viewtopic.php?f=4&t=29447
REF ( Own Post – DD-WRT ): https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1187018#1187018

Asus – AC68U , OSPF, DD-WRT, OpenVPN, F/W, r40854

Despite a few quirks, I wanted to post some highlights ( success story ) of using the r40854 firmware for the Asus AC68U and some of DD-WRT's capabilities with this firmware.  Took some time to try this with various firmware versions and this appears the most stable combination so far:

    OSPF works
    VPN Works, but only if configured manually.
        3 Issues:
                CA Cert can't be saved through UI.  Simply disappears when saving or applying.
                Network can't be saved through UI.  Simply disappears when saving or applying.
                TLS ta.key  has wrong permissions.  Fixing manually appears to be persistently changed through reboots.
    tcpdump works

    

Since OSPF works, pairing up with other Asus AC68U routers running OSPF or even other Cisco
routers such as Cisco 3750G or Cisco WS-C4948-10GE switches that run OSPF works perfectly.


Would be great to have these in the latest release for the firmware for the Asus-AC68U:

    Cron not working.  Need to use an external host with passless SSH keys to execute something periodically. 
    Fully working VPN settings page:  Fix saving CA cert and Network.  (Won't start without these features.)
    OSPF working as it does in this r40854.
    tcpdump works in this r40854 firmware.  Doesn't in others I've tried (see my earlier posts).  

    

Conclusion:

Both of my Asus AC68U is running this version and are set to OSPF Router instead of Gateway or simply Router.  I never want to go back to the previous setup.  It gives me the best network performance while supporting multiple VLANs for my equipment to isolate network noise.  Strongly recommend OSPF over Gateway.  

OSPF Config

!
! Zebra configuration saved from vty
!   2019/12/13 08:12:53
!
frr version 7.1
frr defaults traditional
!
hostname DD-WRT-INTERNET-ASUS
domainname 
log file /jffs/ospf/ospf.log
!
# debug ospf ism
# debug ospf nsm
# debug ospf lsa
# debug ospf zebra
# debug ospf nssa
# debug ospf packet all
!
!
!
!
router ospf
 ospf router-id 192.168.0.100
 log-adjacency-changes
 network 192.168.0.0/24 area 0
!
line vty
!

ZEBRA Config

!
! Zebra configuration saved from vty
!   2019/12/13 08:12:53
!
frr version 7.1
frr defaults traditional
!
hostname DD-WRT-INTERNET-ASUS
domainname 
!
!
!
!
!
!
!
line vty
!


FIREWALL Rules for OSPF / Zebra


# ———————-
# OSPF Port for exchanging routing database information.
# ———————-
iptables -A INPUT -p 89 -j ACCEPT
iptables -A OUTPUT -p 89 -j ACCEPT
# ———————-
# ICMP – Allow ICMP TYPE 0 – Echo reply from outside.
# ———————-
iptables -A INPUT -p icmp –icmp-type 3 -s $(nvram get wan_ipaddr) -d $(nvram get wan_ipaddr) -m state –state ESTABLISHED,RELATED -j ACCEPT

# ———————-
# ICMP – Allow ICMP TYPE 0 – Echo reply from outside.
# ———————-
iptables -A INPUT -p icmp –icmp-type 0 -d $(nvram get wan_ipaddr) -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT


# ———————————–
# NAT Rules (from Gateway Config)
# Needed for web access.  
# ———————————–
iptables -t nat -I POSTROUTING -s 192.168.45.0/24 -j SNAT –to $(nvram get wan_ipaddr)
iptables -t nat -I POSTROUTING -s 192.168.75.0/24 -j SNAT –to $(nvram get wan_ipaddr)
iptables -t nat -I POSTROUTING -s 10.0.0.0/24 -j SNAT –to $(nvram get wan_ipaddr)                    # Per VLAN
iptables -t nat -I POSTROUTING -s 10.10.0.0/24 -j SNAT –to $(nvram get wan_ipaddr)
iptables -t nat -I POSTROUTING -s 10.20.0.0/24 -j SNAT –to $(nvram get wan_ipaddr)
iptables -t nat -I POSTROUTING -s 10.30.0.0/24 -j SNAT –to $(nvram get wan_ipaddr)
iptables -t nat -I POSTROUTING -s 192.168.0.0/24 -j SNAT –to $(nvram get wan_ipaddr)
iptables -t nat -I POSTROUTING -m mark –mark 0x80000000/0x80000000 -j MASQUERADE

# ———————-
# ICMP – 10.0.0.X
# ———————-
iptables -A INPUT -p icmp –icmp-type 0 -s 10.0.0.0/24 -d 192.168.0.0/24 -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp –icmp-type 0 -s 192.168.0.0/24 -d 10.0.0.0/24 -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp –icmp-type 8 -s 10.0.0.0/24 -d 192.168.0.0/24 -m state –state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp –icmp-type 8 -s 192.168.0.0/24 -d 10.0.0.0/24 -m state –state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp –icmp-type 3 -s 10.0.0.0/24 -d 192.168.0.0/24 -m state –state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp –icmp-type 3 -s 192.168.0.0/24 -d 10.0.0.0/24 -m state –state NEW,ESTABLISHED,RELATED -j ACCEPT


VPN Specific F/W Rules

# ———————-
# VPN Specific
# ———————-
iptables -A INPUT -p tcp –dport 11194 -j ACCEPT
iptables -A INPUT -p udp –dport 11194 -j ACCEPT
iptables -A OUTPUT -p tcp –dport 11194 -j ACCEPT
iptables -A OUTPUT -p udp –dport 11194 -j ACCEPT

iptables -A INPUT -s 10.1.1.0/24 -d 192.168.0.0/24 -dport 443 -j ACCEPT
iptables -A OUTPUT -d 10.1.1.0/24 -s 192.168.0.0/24 -j ACCEPT

iptables -I INPUT 1 -p tcp –-dport 11194 -j ACCEPT
iptables -I FORWARD 1 –-source 10.1.1.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -j MASQUERADE


VPN Specific Configuration

dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
keepalive 10 120
verb 3
mute 3
syslog
writepid /var/run/openvpnd.pid
management 127.0.0.1 14
management-log-cache 100
topology subnet
script-security 2
port 11194
proto tcp4-server
cipher aes-256-cbc
auth sha256
client-connect /tmp/openvpn/clcon.sh
client-disconnect /tmp/openvpn/cldiscon.sh
client-config-dir /jffs/etc/openvpn/ccd
comp-lzo adaptive
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
client-to-client
push "redirect-gateway def1"
tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
auth-nocache
tcp-nodelay
tun-mtu 1500
mtu-disc yes
server 10.1.1.0 255.255.255.0
dev tun2
tls-auth /tmp/openvpn/ta.key 0
push "dhcp-option DNS 192.168.0.150"
push "dhcp-option DNS 192.168.0.151"
push "dhcp-option DNS 192.168.0.152"
push "route 192.168.0.0 255.255.255.0"
push "route 10.0.0.0 255.255.255.0"
push "route 10.10.0.0 255.255.255.0"
push "route 10.20.0.0 255.255.255.0"
push "route 10.30.0.0 255.255.255.0"

OpenVPN Client Config ( Windows 10 )

# cat client.ovpn  | grep -Ev ";|#" | sed -e "/^$/d"
client
dev tun2
proto tcp
remote access.mysite.com 11194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert TomK.crt
key TomK.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 3
auth-nocache

UI VPN Config Page:

https://i1.wp.com/www.microdevsys.com/WordPressImages/OpenVPN-GUI-Configuration-Page.JPG?ssl=1

Masquerade Configuration for the above page:

expand-hosts
interface=br0,tun2
listen-address=127.0.0.1,192.168.0.100,10.1.1.1

https://i0.wp.com/www.microdevsys.com/WordPressImages/OpenVPN-GUI-Masquerade-Configuration-Page.JPG?ssl=1

The rest of the VPN configuration is pretty much exactly what you find on the official page:

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795

CRONTAB (Remote Linux host, DD-WRT cron isn't working for me right now. )


# DD-WRT

# Block WEB traffic by MAC after a certain time.
*/10 * * * * scp -P 22022 /root/bin/rested.sh root@192.168.0.100:/jffs/; ssh -P 22022 root@192.168.0.100 "chmod 750 /jffs/rested.sh; /jffs/rested.sh";

# Reboot the router everyday near 5AM.
57 4 * * * ssh -P 22022 root@192.168.0.100 "startservice run_rc_shutdown; /sbin/reboot";

# VPN UI saving issue workaround.
* * * * * scp -P 22022 /root/bin/openvpn-conf.sh root@192.168.0.100:/jffs/; ssh root@192.168.0.100 -p 22022 "chmod 750 /jffs/openvpn-conf.sh; /jffs/openvpn-conf.sh; grep -Ei vpn /var/log/messages";


Block WEB traffic by device MAC ( parental controls – guess it sucks to have a dad who knows IT. ) :


# cat /root/bin/rested.sh
#!/bin/ash
#
# This scripts connects to the primary house router and executes blocking iPad's, TV's and Kids Laptops from accessing youtube.com
#
# Block youtube.com (ex).
#
#
# nslookup       172.217.1.174
# Name:      172.217.1.174
# Address 1: 172.217.1.174 yyz10s04-in-f14.1e100.net
#
# Name:      172.217.2.174
# Address 1: 172.217.2.174 yyz10s06-in-f14.1e100.net
#
# REF: http://io.sivuduuni.biz/block-youtube-with-iptables/
#
#

CHAIN="youtube.com";
CDATE=$(date +"%H%M%S");
MOI=$(basename $0);
TSTART=210000;
TSTOP=125959;
CDAY=$(date +%A);
DCOND=0;
DOW="Monday Tuesday Wednesday Thursday Friday";
# DOW="Sunday Monday Tuesday Wednesday Thursday Friday Saturday";
DESTIPL="172.217.2.174 172.217.2.174 172.217.0.0/16";
MACLIST="B4:1C:FF:59:95:13 A4:8D:3B:FF:55:A3 C4:1C:FF:F9:3C:C2 35:1D:FF:F9:9F:8E 78:34:BF:C7:9C:7E 01:71:CC:68:A2:1B F9:A9:61:72:4E:C5 40:C2:30:73:D6:9F B8:86:CD:D7:87:37 68:86:DD:D7:47:A8 38:B5:C7:32:8C:54 78:A5:B7:32:3C:B8";

# Alternate reject line.
CREJECT="-m state –state ESTABLISHED -j REJECT –reject-with icmp-port-unreachable;";

# DROP and ADD flag.  Indicates if a block already ran and skips future iterations.
FLAGF="/tmp/added-$MOI";

# Properly decipher the range between days.
if [[ $TSTART -gt $TSTOP ]]; then
        [[ $CDATE -gt $TSTART || $CDATE -lt $TSTOP ]] && DCOND=1;
else
        [[ $CDATE -gt $TSTART && $CDATE -lt $TSTOP ]] && DCOND=1;
fi

if [[ $DCOND -eq 1 ]] && echo "$DOW" | grep "$CDAY" 2>/dev/null; then

        if [[ ! -r $FLAGF ]]; then

                # Setup a chain that forwards all traffic from given MAC addresses to the named CHAIN.
                if ! iptables -nL $CHAIN; then
                        iptables -N $CHAIN;
                fi

                # FORWARD all listed MAC addresses to the named CHAIN;
                for MAC in $MACLIST; do
                        iptables -A FORWARD -m mac –mac-source $MAC -j $CHAIN;
                done;

                for IP in $DESTIPL; do
                        iptables -A $CHAIN -d $IP -j DROP;
                        iptables -A $CHAIN -s $IP -j DROP;
                done
                touch $FLAGF;
        else
                echo "No Action.  The provided IP's are already blocked.";
        fi

else

        if [[ -r $FLAGF ]]; then
                for IP in $DESTIPL; do
                        iptables -D $CHAIN -d $IP -j DROP;
                        iptables -D $CHAIN -s $IP -j DROP;
                        iptables -F $CHAIN;
                        iptables -X $CHAIN;
                done

                # FORWARD all listed MAC addresses to the named CHAIN;
                for MAC in $MACLIST; do
                        iptables -D FORWARD -m mac –mac-source $MAC -j $CHAIN;
                done;
                rm -f $FLAGF;
        else
                echo "No Action.  The provided IP's are already unblocked.";
        fi
fi

OpenVPN Code to configure and start OpenVPN Server on the DD-WRT router:

# cat /root/bin/openvpn-conf.sh

#!/bin/sh

/bin/cp /jffs/openvpn.conf /tmp/openvpn/
/bin/cp /jffs/ca.crt /tmp/openvpn/

if ps | grep -Ei "openvpn\.con[Ff]" 1>/dev/null 2>&1; then
        if ! grep "OpenVPN server is running" /var/log/messages; then
                echo $(date)" OpenVPN server is running." >> /var/log/messages;
        fi
else
        echo "No VPN running.  Starting a new instance.";
        openvpn –config /tmp/openvpn/openvpn.conf –up /tmp/openvpn/route-up.sh –down /tmp/openvpn/route-down.sh –daemon -v –mode server ;
fi

 

Cheers,
IM

Important Notes: The above is not 100% refined.  Tweaks and issues are certainly possible.  Please keep this in mind.

OpenVPN: WARNING: this configuration may cache passwords in memory — use the auth-nocache option to prevent this

Running into this?

OpenVPN: WARNING: this configuration may cache passwords in memory — use the auth-nocache option to prevent this

Fix it by adding this parameter to the OpenVPN config file:

# Don't save passwords when connected.
auth-nocache

Restart your OpenVPN connection.

Cheers,
TK

OpenVPN: An error occurred installing the TAP device driver. in Windows 10

Suffering from this in Windows 10?

OpenVPN: An error occurred installing the TAP device driver.  

or perhaps a variant of the above?

OpenVPN: Write to TUN/TAP : Unknown error (code=122)

Then install a new version of the OpenVPN client application.  You may still get the above so open up device manager.  Look under the Network Devices section.  An Unknown device should be listed.  Right-click it and let windows find an appropriate driver for it.

The end result should look like this:

https://i2.wp.com/www.microdevsys.com/WordPressImages/OpenVPN-error-installing-TAP-TUN-driver.JPG?ssl=1

Then again the above might not solve all the issues.  In case you get the error:

OpenVPN: Write to TUN/TAP : Unknown error (code=122)

It's likely due to this:

Sun Dec 29 19:10:49 2019 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1571', remote='link-mtu 1572'
Sun Dec 29 19:10:49 2019 WARNING: 'comp-lzo' is present in remote config but missing in local config, remote='comp-lzo'

Then uncomment this:

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
comp-lzo

Hope this helps!

Cheers,
JB

TLS Error: cannot locate HMAC in incoming packet from [AF_INET]

Getting this?

TLS Error: cannot locate HMAC in incoming packet from [AF_INET]192.168.0.76:65169

Solve it by ensuring these two lines match the server:

cipher AES-256-CBC
auth SHA256

And ensure they appear in the sever config as well as follows:

cipher aes-256-cbc
auth sha256

 

Cheers,
TK

TLS Error: reading acknowledgement record from packet

Getting this?

Dec 28 04:16:28 DD-WRT-INTERNET-ASUS daemon.notice openvpn[18115]: TCP connection established with [AF_INET]192.168.0.76:64101
Dec 28 04:16:29 DD-WRT-INTERNET-ASUS daemon.notice openvpn[18115]: 192.168.0.76:64101 TLS: Initial packet from [AF_INET]192.168.0.76:64101, sid=6624e5bc bebf0a81
Dec 28 04:16:29 DD-WRT-INTERNET-ASUS daemon.err openvpn[18115]: 192.168.0.76:64101 TLS Error: reading acknowledgement record from packet
Dec 28 04:16:29 DD-WRT-INTERNET-ASUS daemon.err openvpn[18115]: 192.168.0.76:64101 Fatal TLS error (check_tls_errors_co), restarting
Dec 28 04:16:29 DD-WRT-INTERNET-ASUS daemon.notice openvpn[18115]: 192.168.0.76:64101 SIGUSR1[soft,tls-error] received, client-instance restarting

Enable TLS on the server:

Copy paste the ta.key contents into the TLS Auth Key box of the DD-WRT router.  Ensure your .ovpn config file also contains this:

# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth ta.key 1

Ensure the ovpn.conf file on the DD-WRT router has the following config:

root@DD-WRT-INTERNET-ASUS:/tmp/openvpn# cat openvpn.conf
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
keepalive 10 120
verb 3
mute 3
syslog
writepid /var/run/openvpnd.pid
management 127.0.0.1 14
management-log-cache 100
topology subnet
script-security 2
port 1194
proto tcp4-server
cipher aes-256-cbc
auth sha256
client-connect /tmp/openvpn/clcon.sh
client-disconnect /tmp/openvpn/cldiscon.sh
client-config-dir /jffs/etc/openvpn/ccd
comp-lzo adaptive
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
client-to-client
push "redirect-gateway def1"
tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
tcp-nodelay
tun-mtu 1500
mtu-disc yes
server 10.1.1.0 255.255.255.0
dev tun2
tls-auth /tmp/openvpn/ta.key 0
push "dhcp-option DNS 192.168.0.224"
push "dhcp-option DNS 192.168.0.44"
push "dhcp-option DNS 192.168.0.154"
push "route 192.168.0.0 255.255.255.0"
root@DD-WRT-INTERNET-ASUS:/tmp/openvpn#

 

Cheers,
TK

 

Networking: connect: Network is unreachable

Getting this?

[root@sat01 ~] # ping 192.168.0.6
connect: Network is unreachable
[root@sat01 ~] # 

When you're on a separate VLAN?

[root@sat02 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 18:28:38:b0:00:01 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.150/24 scope global ens3
       valid_lft forever preferred_lft forever
[root@sat02 ~]#

Solve by adding a default route:

[root@sat02 ~]# ip route add default via 10.0.0.1 dev ens3

And verify:

[root@sat02 ~]# ip route
default via 10.0.0.1 dev ens3
10.0.0.0/24 dev ens3 proto kernel scope link src 10.0.0.150
[root@sat02 ~]#

Regards,
AC

javax.persistence.NonUniqueResultException: query did not return a unique result: 2

Getting these?

2019-11-28 01:28:08,128 INFO com.cloudera.cmf.scheduler-1_Worker-1:com.cloudera.cmf.service.ServiceHandlerRegistry: Executing command GlobalPoolsRefresh BasicCmdArgs{scheduleId=1, scheduledTime=2019-11-27T10:00:00.000Z}.
2019-11-28 01:28:09,775 WARN scm-web-886:org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver: Resolved [java.io.IOException: Close org.eclipse.jetty.server.HttpConnection$SendCallback@2a3e3d03[PROCESSING][i=null,cb=org.eclipse.jetty.server.HttpChannel$ContentCallback@23de18e3] in state PROCESSING] to ModelAndView: materialized View is [com.cloudera.server.web.common.JamonModelAndView$JamonView@4a0945f9]; model is {}
2019-11-28 01:28:09,779 WARN scm-web-886:org.eclipse.jetty.server.HttpChannel: ERROR dispatch failed
org.eclipse.jetty.io.EofException: Closed
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:482)
        at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:638)
        at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:638)
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
        at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)

 

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:748)
        Suppressed: java.lang.IllegalStateException: Error already set
                at org.eclipse.jetty.server.HttpChannelState.onError(HttpChannelState.java:758)
                at org.eclipse.jetty.server.HttpChannel.handleException(HttpChannel.java:595)
                at org.eclipse.jetty.server.HttpChannelOverHttp.handleException(HttpChannelOverHttp.java:489)
                at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:531)
                … 17 more
        Caused by: java.io.IOException: Close org.eclipse.jetty.server.HttpConnection$SendCallback@2a3e3d03[PROCESSING][i=null,cb=org.eclipse.jetty.server.HttpChannel$ContentCallback@23de18e3] in state PROCESSING
                at org.eclipse.jetty.util.IteratingCallback.close(IteratingCallback.java:427)
                at org.eclipse.jetty.server.HttpConnection.onClose(HttpConnection.java:507)
                at org.eclipse.jetty.io.ssl.SslConnection.onClose(SslConnection.java:273)
                at org.eclipse.jetty.io.SelectorManager.connectionClosed(SelectorManager.java:345)
                at org.eclipse.jetty.io.ManagedSelector$DestroyEndPoint.run(ManagedSelector.java:923)
                … 4 more

 

2019-11-28 01:33:43,717 INFO scm-web-165:com.cloudera.enterprise.JavaMelodyFacade: Exiting HTTP Operation: Method:POST, Path:/services/31/healthStatusBar, Status:200
2019-11-28 01:33:51,548 INFO scm-web-165:com.cloudera.api.ApiExceptionMapper: (20 skipped) Exception caught in API invocation. Msg:This installation is currently running Cloudera Express.
java.util.NoSuchElementException: This installation is currently running Cloudera Express.
        at com.cloudera.api.dao.impl.LicenseManagerDaoImpl.readLicense(LicenseManagerDaoImpl.java:86)
        at com.cloudera.api.v1.impl.ClouderaManagerResourceImpl.readLicense(ClouderaManagerResourceImpl.java:57)
        at com.cloudera.api.v32.impl.ClouderaManagerResourceV32Impl.readLicense(ClouderaManagerResourceV32Impl.java:56)
        at sun.reflect.GeneratedMethodAccessor1984.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 

2019-11-28 02:20:02,169 INFO avro-servlet-hb-processor-1:com.cloudera.server.common.AgentAvroServlet: (27 skipped) AgentAvroServlet: heartbeat processing stats: average=35ms, min=24ms, max=92ms.
2019-11-28 02:20:50,007 ERROR ScmActive-0:com.cloudera.server.cmf.components.ScmActive: ScmActive:
javax.persistence.NonUniqueResultException: query did not return a unique result: 2

 

2019-11-28 02:20:50,008 INFO ScmActive-0:com.cloudera.enterprise.AbstractWrappedEntityManager: Rolling back transaction that wasn't marked for rollback-only.
java.lang.Exception: Non-thrown exception for stack trace.
        at com.cloudera.enterprise.AbstractWrappedEntityManager.close(AbstractWrappedEntityManager.java:161)
        at com.cloudera.cmf.persist.CmfEntityManager.close(CmfEntityManager.java:367)

 

        at java.lang.Thread.run(Thread.java:748)
2019-11-28 02:21:02,220 INFO avro-servlet-hb-processor-1:com.cloudera.server.common.AgentAvroServlet: (27 skipped) AgentAvroServlet: heartbeat processing stats: average=35ms, min=24ms, max=92ms.
2019-11-28 02:21:05,016 ERROR ScmActive-0:com.cloudera.server.cmf.components.ScmActive: ScmActive:
javax.persistence.NonUniqueResultException: query did not return a unique result: 2
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:121)

 

2019-11-28 02:21:05,016 ERROR ScmActive-0:com.cloudera.server.cmf.components.ScmActive: ScmActive is deferring the validation to the next run in 15 seconds.
2019-11-28 02:21:05,016 INFO ScmActive-0:com.cloudera.enterprise.AbstractWrappedEntityManager: Rolling back transaction that wasn't marked for rollback-only.
java.lang.Exception: Non-thrown exception for stack trace.
        at com.cloudera.enterprise.AbstractWrappedEntityManager.close(AbstractWrappedEntityManager.java:161)
        at com.cloudera.cmf.persist.CmfEntityManager.close(CmfEntityManager.java:367)

 

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2019-11-28 02:21:20,028 ERROR ScmActive-0:com.cloudera.server.cmf.components.ScmActive: ScmActive:
javax.persistence.NonUniqueResultException: query did not return a unique result: 2
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:121)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)

Restore the database from your automatic backups:

[root@psql01 ~]# psql -h psql-c01.nix.mds.xyz -p 5432 -U postgres -f /root/psql-c01.sql.1574920910 postgres

Cheers,
TK

ERROR 1044 (42000): Access denied for user ‘skip-grants user’@’skip-grants host’ to database ‘performance_schema’

If this happens after you do a mass database restore:


ERROR 1044 (42000): Access denied for user 'skip-grants user'@'skip-grants host' to database 'performance_schema'
ERROR 1142 (42000): INSERT command denied to user 'skip-grants user'@'' for table 'variables_by_thread'
ERROR 1044 (42000): Access denied for user 'skip-grants user'@'skip-grants host' to database 'performance_schema'
Query OK, 1 row affected (0.00 sec)

 

It is ok.

Regards,
BK


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License