Zhixian's Tech Blog

2016-09-12

Cannot pull images from docker.io

Filed under: docker — Tags: , , , — Zhixian @ 18:14:09 pm

Summary

  1. You are unable to download docker images from the repository.
  2. You received a network timed out error message.
  3. This issue is probably due to your Docker DNS Server setting. Switch it from Automatic to Fixed to resolve issue.

Details

If you just installed docker in Windows (in my case, it is Windows 10 Pro), you may encounter the following error message when trying to pull a docker image from docker.io:

C:\VMs\Docker>docker pull hello-world
Using default tag: latest
Pulling repository docker.io/library/hello-world
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.

image

However, when you open up your browser to navigate to the url (https://index.docker.io/v1/repositories/library/hello-world/images) of the image, you found that you have no problems.

image

This maybe due to an issue with the Network settings of Docker.
Specifically, the problem maybe with the DNS Server setting.
The DNS Server is set to Automatic by default and that DNS server may not be able to find the docker image repository.

image

To resolve this issue, simply set the DNS Server setting to “Fixed”.
For the IP address of the DNS Server, you can probably accept the default of “8.8.8.8” (which points Google’s DNS server)
After clicking on the “Fixed” radio button, click on the “Apply” button to apply your changes.
This will cause Docker to restart.

image

After Docker have restarted, you should find that you are able to pull docker images without any issues.

image

2016-01-04

Fixing “The Parallel port driver service failed to start” on Windows 2003

Filed under: computing, windows — Tags: , — Zhixian @ 19:42:01 pm

My first blog post for 2016.
This is a reminder blog post.

Summary

  1. Symptoms
  2. Solution
  3. Reference

Symptoms

When your Windows 2003 boot up, you may see another a message like the below:

VirtualBox_Win2k3-ZXDBM_04_01_2016_19_14_09

When you logged into Windows and examine the Event Viewer, you may see an error under System.

VirtualBox_Win2k3-ZXDBM_04_01_2016_19_21_43

When you open up the error, you would see, the following error message:

VirtualBox_Win2k3-ZXDBM_04_01_2016_19_23_32

 

Solution

Start a Windows command prompt and run the following command:

sc config parport start= disabled

Note the space after “start=” in the above command. It is required.

After you ran this command, you should not see the error message prompt on your next Windows bootup.
Note: This solution deviate from the one stated in the reference.

 

Reference

  1. Error message on a Windows Vista-based or Windows Server 2008-based computer that does not have a parallel port: "The Parallel port driver service failed to start"

2015-11-02

Minix3 Basic Software Sets

Filed under: computing, minix3 — Zhixian @ 17:49:11 pm

This is done by executing the following commands at the command line:

# pkgin update
# pkgin_sets

When executing pkgin_sets, it will show the following screen and prompt you to install each set one by one.

Zhixian’s note: The software installed can be found in /usr/pkg/bin (or /usr/pkg/sbin for system executables).

First prompt installs:

  1. openssh
  2. vim (exception from the above note; executable is found at /usr/bin/vi)
  3. curl

Second prompt install:

  1. git-base
  2. bmake
  3. gmake
  4. binutils
  5. clang

Third prompt installs:

  1. bison
  2. groff
  3. perl
  4. python (the executable for python is named “python2.7” instead of “python” as found in other installations.)

First Prompt:image

 

Second Prompt:image

 

Third Prompt:
image

For some reason the tiff library is missing from repository.
image

 

Installation complete:image

 

Searching and installing the tiff library that got missed out earlier.

image

Minix3 Basic Post Installation Setup

Filed under: Uncategorized — Zhixian @ 17:00:11 pm

Summary

  1. Set password for root account
  2. Set timezone
  3. Set hostname

 

Set Password for root account

By default, there is no password assigned for the root account.
You can set a password for root account using the following command:

# passwd

image

Set timezone

Before you can set the timezone, you need to identify it using the computer standards.
Look at a file /usr/share/zoneinfo for a list of timezone.

image

In my case, my country Singapore is located in Asia

image

So my timezone is determined to be Asia/Singapore.
To set the timezone, enter the follow command:

# echo export TZ=Asia/Singapore > /etc/rc.timezone

image

This will take effect when I log in again.

 

Set hostname

The default hostname can be rather non-descriptive.

image

So you might want to change that.
So for example, I chose the hostname of rocket, I would enter the following command to set it:

# hostname rocket

image

Zhixian’s note: This change does not seem to persist after a reboot. Sad smile
Still exploring how to do this correctly.
The best solution I saw so far is from http://osdir.com/ml/minix3/2011-12/msg00072.html
It suggests putting your IP and host name into /etc/hosts file.
Here’s the excerpt pertaining to problem and suggested solution:image

In case you are wondering, here’s what my /etc/hosts file look like:

image

Reference

http://wiki.minix3.org/doku.php?id=usersguide:postinstallation

MINIX3 Installation

Filed under: computing, minix3 — Tags: , , — Zhixian @ 16:32:11 pm

A list of screen dumps that I taken while installing Minix3 on VirtualBox.
Dumping the screens first. I intend to annotate them at a later date.

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

 

image

 

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

End of installation

2015-10-30

Installing Alpine

Filed under: Uncategorized — Zhixian @ 23:08:10 pm

I do not find the default “mail” program in Linux is not user-friendly.

Hence, I would suggest another console e-mail application.
Two applications come to mind, pine and elm.
I’m picking pine as I have slightly more familiarity with it and I think it is more user-friendly than elm.

Pine is a proprietary application owned by University of Washington. So I am picking to install the open-source version of this application call Alpine. To install Alpine type the following command:

$ sudo apt-get install alpine

After the installation has complete, type the following command to run it:

$ alpine

Changing Screen Resolution of Ubuntu on VirtualBox

Filed under: Uncategorized — Zhixian @ 23:08:10 pm

Identify the resolution that your VirtualBox environment supports.

Reboot the system and hit ‘c’ when the grub windows appears appears to access grub console. In grub console, enter the following command to see a list of resolutions (eg, 1024x768x32):

grub> vbeinfo

Edit the grub configuration file
/etc/default/grub. Uncomment the following line in the file.

GRUB_GFXMODE=1152x864x32

Replace the resolution with the one appropriate for your environment.

Save the file. Then update your grub configuration by running:

$ update-grub

Restart your virtual machine again

Reference

http://askubuntu.com/questions/456527/maximum-terminal-resolution-in-ubuntu-server-virtual-box-guest

hellorails

Filed under: Uncategorized — Zhixian @ 23:06:10 pm

This blog is about creating a first Rails web application.
Before proceeding, you need to install sqlite.

Summary of Steps

  1. Install sqlite
  2. Install nodejs
  3. Create hellorails
  4. Running hellorails

Install sqlite

To install sqlite, run the follow commands:

$ sudo apt-get install sqlite3
$ sudo apt-get install libsqlite3-dev

Note: We have to install libsqlite3-dev because we want to use add sqlite support to Rails via gem.

After sqlite is installed, we can add sqlite support to Rails by running the following command.

$ sudo gem install sqlite3 -v '1.3.11'

Install nodejs

Rails do not a built-in web server. It relies on other infrastructure to run. Here, I decide to install nodejs as I am intending to do some other nodejs development later on as well.

$ sudo apt-get install nodejs
$ sudo apt-get install npm

Creating hellorails

After all the setup is done, we can start to create our hellorails application by running the following command:

sudo rails new ./hellorails

Running hellorails

After the application is created, navigate into the directory.
You can run the application by running the following command:

$ rails server

Note: This command will start a web server listening on localhost on port 3000. What this means, is that you can only access the web application on your local machine. To allow other machines to access the web application on port 3000, you need to make the web server listen to the IP address of 0.0.0.0. This can be done by running:

$ rails server -b 0.0.0.0

An alternative to adding the parameter is edit boot.rb file in the config folder.

Reference

http://guides.rubyonrails.org/initialization.html

Installing Ruby

Filed under: Uncategorized — Zhixian @ 23:06:10 pm

Installation

$ sudo apt-get install ruby-full

This will install Ruby 1.9.3 as of this writing.

I want to do Ruby on Rails, I need to install Rails.
Rails however require “make” which is not installed out of the box.
So we need to install that first.

$ sudo apt-get install make

Apparently, it also require zlib development libraries.
You need to install it by running the following command:

$ sudo apt-get install zlib1g-dev

Before installing Rails, you may want to install the “rdoc” package.
If not, you may encounter the error message “file ‘lib’ not found”.

$ sudo gem install rdoc

After installation of “rdoc” package, you can install Rails using:

$ sudo gem install -V rails

Note: The “-V” parameter in the above command makes the installation process more verbose and may be omitted. If omitted, it may appear as if the process is hanged as there is not visible feedback on the installation process. The download and installation process itself takes quite a while.

Alternatively, you may want to run the following command to install Rails instead. This command will not install documentation for Rails which can take some time to generate (and hence misled you to think that the process has hanged).

$ gem install rails --no-ri --no-rdoc

Reference

https://help.ubuntu.com/community/RubyOnRails

Installing FTP server

Filed under: Uncategorized — Zhixian @ 23:05:10 pm

Installation

$ sudo apt-get install vsftpd

Configuration

Edit the configuration file /etc/vsftpd.conf

Uncomment this line to allow users to be able to upload files:

write_enable=YES

Uncomment this line to limited to their home directories:

chroot_local_user=YES

Add the following line to counter the message:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()

allow_writeable_chroot=YES

Restart server

$ sudo restart vsftpd

Reference

https://help.ubuntu.com/lts/serverguide/ftp-server.html

https://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/#comment-2051

Older Posts »

Create a free website or blog at WordPress.com.