IPSec VPN Working for OS X Mavericks

In iOS IPSec VPN Server on Ubuntu, I host a VPN on Ubuntu 13.10 based on StrongSwan 4.x, working for iOS, but not for OSX.

Then I upgraded to Ubuntu 14.04, which has StrongSwan upgraded to 5.x, error like:

To fix this, install all strongswan’s plugins by:

And make some changes to configurations:
/etc/ipsec.conf:

/etc/strongswan.conf:
Replace with strongswan.conf.dpkg-dist

After these, VPN is connectable by OS X but DNS settings is not pushed to the client-side

/etc/strongswan.d/charon.conf:

DONE.

If you get a error saying the certificate is not trusted, and then check /var/log/system.log, you may found

If you have debug logging enabled in /etc/racoon/racoon.conf like

You may see more detail in /var/log/racoon.log, kSecTrustResultRecoverableTrustFailure might be a useful keyword.
Google it, the only useful article is http://www.traud.de/vpn/ but still not working here.

I tried on my macbook pro, and also as a dude told me, the Root CA I gave and the mobileconfig worked without any error nor warning.
But on my mac mini and from some others, error like above, which stopped me getting ipsec on os x work before.

I tried to delete the certificate, both root ca and client’s, from Keychain Access app, and the mobileconfig from Profiles in Preferences, reinstall like firstly CA secondly mobileconfig, check if the mobileconfig is signed and has passed the certificate verification, green light on then there it goes.

IPSec VPN Working for OS X Mavericks by @sskaje: https://sskaje.me/2014/04/ipsec-vpn-working-os-mavericks/

Incoming search terms:

Delete Unexpected 127.0.0.1 from Cloudera Manager

I have cloudera manager 5.0.0 installed in my small cluster, tried to delete some nodes and then found cloudera manager not working, exceptions thrown in the landing page and 500 in the hosts page, almost null pointer exception everywhere.
Next time when I restart cm and log into CM, agent upgrading guide begins again. Here I found the 127.0.0.1 appeared in the host list which is not delete-able.
So I try to delete data from PostgreSQL.

1 read database config

password can be found from Cloudera Manager Drop Database/User on Embedded Postgresql

2 check table

3 find data

The row host_id=13 has an empty cluster id, no ip address nor name filled.

4 delete data

Try to find out deletes on foreign keys.

So Delete like

5 restart

Delete Unexpected 127.0.0.1 from Cloudera Manager by @sskaje: https://sskaje.me/2014/04/delete-unexpected-127-0-0-1-cloudera-manager/

Incoming search terms:

Collections: X86_64 registers

x64 Architecture by Microsoft

Note: r8b,r9b,…,r15b may be recognised as r8l, r9l, … r15l

64-bit register Lower 32 bits Lower 16 bits Lower 8 bits

rax

eax

ax

al

rbx

ebx

bx

bl

rcx

ecx

cx

cl

rdx

edx

dx

dl

rsi

esi

si

sil

rdi

edi

di

dil

rbp

ebp

bp

bpl

rsp

esp

sp

spl

r8

r8d

r8w

r8b

r9

r9d

r9w

r9b

r10

r10d

r10w

r10b

r11

r11d

r11w

r11b

r12

r12d

r12w

r12b

r13

r13d

r13w

r13b

r14

r14d

r14w

r14b

r15

r15d

r15w

r15b

X86_64 Assembly Language Tutorial by CocoaFactory

Register Usage Preserved across function calls
%rax 1st return register, number of vector registers used No
%rbx callee-saved register; base pointer Yes
%rcx pass 4th integer argument to functions No
%rdx pass 3rd argument fo functions, 2nd return register No
%rsp stack pointer Yes
%rbp callee-saved register, frame pointer Yes
%rsi used to pass 2nd argument to functions No
%rdi used to pass 1st argument to functions No
%r8 used to pass 5th argunent to functions No
%r9 used to pass 6th argument to functions No
%r10 temp register, used for passing a function’s static chain ptr No
%r11 temp register No
%r12 callee-saved register Yes
%r13 callee-saved register Yes
%r14 callee-saved register Yes
%r15 callee-saved register Yes
%xmm0 used to pass and return floating point arguments No
%xmm1 used to pass and return floating point arguments No
%xmm2 used to pass floating point arguments No
%xmm3 used to pass floating point arguments No
%xmm4 used to pass floating point arguments No
%xmm5 used to pass floating point arguments No
%xmm6 used to pass floating point arguments No
%xmm7 used to pass floating point arguments No
%xmm8 temporary register No
%xmm9 temporary register No
%xmm10 temporary register No
%xmm11 temporary register No
%xmm12 temporary register No
%xmm13 temporary register No
%xmm14 temporary register No
%xmm15 temporary register No
%mmx0 temporary register No
%mmx1 temporary register No
%mmx2 temporary register No
%mmx3 temporary register No
%mmx4 temporary register No
%mmx5 temporary register No
%mmx6 temporary register No
%mmx7 temporary register No
%st0 temporary register, used to return long double arguments No
%st1 temporary register, used to return long double arguments No
%st2 temporary register No
%st3 temporary register No
%st4 temporary register No
%st5 temporary register No
%st6 temporary register No
%st7 temporary register No
Collections: X86_64 registers by @sskaje: https://sskaje.me/2014/04/collections-x86_64-registers/

Fix Alternatives for Cloudera Manager + CDH

Earlier post: Fix Hadoop Conf Alternatives for CDH5

I tried to upgrade Cloudera Manager + CDH 5.0.0 beta 1 and beta 2 from CM+CDH 4 then downgrade and delete, found many alternatives were installed on my small cluster, that made my lately installed CM+CDH 4 and CM+CDH 5 not working well, all because of the dirty uninstallation of CM + CDH 5 beta-s.

To fix these alternatives, I wrote a python script, read default alternative configurations, check all currently installed alternatives and delete broken links, install defaults and bring down priority, so we can use ‘Deploy Client Configuration’ in CM to set up the correct ones.

Repository: https://github.com/sskaje/cm_fix_alternatives

Tested only under centos 6.

Fix Alternatives for Cloudera Manager + CDH by @sskaje: https://sskaje.me/2014/04/fix-alternatives-cloudera-manager-cdh/

Cloudera Manager Drop Database/User on Embedded Postgresql

First, you have to find out where the password locates.
https://gist.github.com/mrmichalis/5984131
I ran these on which Cloudera Manager locates.

The cloudera-scm is the superuser.
And the first line in that file is the password.

To drop a database, dropdb is the command:

Commands may like:

To drop a user, using dropuser:

Commands may like:

Cloudera Manager Drop Database/User on Embedded Postgresql by @sskaje: https://sskaje.me/2014/04/cloudera-manager-drop-databaseuser-embedded-postgresql/

Incoming search terms: