星期一, 2月 10, 2020

Docker CAS steps

  • docker run -d --name cas -p 8443:8443 apereo/cas:v6.1.3
  • [optional] docker logs cas, "<The following profiles are active: standalone>" shown.
  • append "127.0.0.1 cas.example.org" to /etc/hosts
  • visit https://cas.example.org:8443/cas
  • login username: casuser, password Mellon

星期五, 9月 20, 2019

How to resolve "org.tmatesoft.svn.core.SVNException: svn: E175002: SSL peer shut down incorrectly"?

  1. In Jenkins, Nodes > xxx > Monitoring > View Threads to find those threads which naming *svnkit*, kill them.
  2. Nodes > xxx > Monitoring > Execute the garbage collector
  3. Clean the workspace of related job

星期一, 9月 09, 2019

Linux nologin and recovery

  • checkout someone's shell
    • awk -F: '{print $7}' /etc/passwd
  • change someone (root) to nologin
    • sudo usermod -s `which nologin` root
  • recovery
    • sudo usermod -s /bin/bash root

星期五, 7月 26, 2019

SonarQube scan failed when .ts included

In a Jenkins job which invoke SonarQube, it failed with:
ERROR:     throw err;
ERROR:     ^
ERROR: 
ERROR: Error: Cannot find module 'typescript'
How to resolve this? Before SonarQube scanning, we need:

  • npm install typescript

星期四, 6月 20, 2019

Elmah bootstrapper

After .NET Framework 4.x, include Elmah just need:
  • *.csproj
    • ...
    • </ItemGroup>
    • <ItemGroup>
    •   <PackageReference Include="elmah.bootstrapper" Version="1.0.1" />
    • </ItemGroup>
    • ...
  • Elmah.Athz.config
    • ?

Then you can check error by visit http://<YourWebAP>/elmah from any remote

SonarQube method-level complexity

After SonarQube 6.7, file-level complexity still calculated, but method-level complexity gone. The opinion of SonarQube team is Complexity is displayed as a Code Smell. If you still wish to investigate the complexity of your project in method-level, combine those filter:
  • Type: Code Smell
  • Severity: Critical
  • Tag: brain-overload

星期五, 5月 17, 2019

Update old OpenSSH default DH key size

For Windows 2000, setupssh371-20031015.exe sholud be a good choice for SSH Server / Client. But when connecting to Jenkins as a SSH Publisher, Jenkins complained that DH key size 2047 not valid. How to fix it? Generate by yourself:
  • cd "C:\Program Files\OpenSSH\bin"
  • ssh-keygen -G moduli-2048.candidates -b 2048
  • (wait)
  • ssh-keygen -T moduli-2048 -f moduli-2048.candidates
  • (wait)
  • move moduli-2048 ..\etc\moduli
  • del moduli-2048.candidate