Tuesday, April 26, 2016

Issue after updating to ubuntu 16.04 (GIT, Docker )

I am always eager to be on latest version so I updated ubuntu 16.04, soon I started facing the unexpected error in my application

DSA based SSH not working in git

I tried to pull my code from git repository, the error I got was Permission denied, After spading almost a full day I get to know latest OpenSSH 7.0 has disabled the support DSA based SSH key used in ubuntu 16.04 : reference

$ git pull origin master     
  
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists

Solution
you can re-enable support locally by updating your ~/.ssh/config files with lines like so: 
 
Host *
PubkeyAcceptedKeyTypes=+ssh-dss
 
 
  

 Docker not working

After upgrading to ubuntu 16.04, my docker container started failing with various error, but most of them had one error messages common at the end as below 

Resource temporarily unavailable

Primary error occurred because  systemd has been updated in new kernal 4.3 to limit the number of process or thread


There's a new system.conf setting DefaultTasksMax= to control the default TasksMax= setting for services and scopes running on the system. (TasksMax= is the primary setting that exposes the "pids" cgroup controller on systemd and was introduced in the previous systemd release.) The setting now defaults to 512, which means services that are not explicitly configured otherwise will only be able to create 512 processes or threads at maximum,


Run below command and notice Tasks: 502 (limit: 512) In output
 systemctl status docker



Solution 

Update the TasksMax limit  to infinity and verify as below as below
  1. Set TasksMax=infinity in the [Service] section of docker.service at /lib/systemd/system/docker.servic
  2. Run 'systemctl daemon-reloads' to reload units changed