Docker and (Console) Logs Problem

Anyone who used docker before and care about quality will have to deal with the logs problem. As we all know, docker runs in a container, and if we don’t handle the logs in a special way, the logs will be lost when the container is restarted.

In order to deal with this, usually we will map the logs folder of our application to the parent host of the container, so that the logs don’t get lost when the container is restarted or changed.

Read more →

AWS Eb CLI (v3): How to fix ssl_wrap_socket error in Debian Jessie

This is the first time I’m deploying stuff to elasticbeanstalk, and when I’m trying to deploy my private project, I realized the eb cli I download is the version 2 and has different syntax. I installed the version 3, and it seems like it can only be installed using python package manager pip. After installing it, this is what I get:

rowanto@Rowanto-Deb ~ $ eb
Traceback (most recent call last):
  File "/usr/local/bin/eb", line 9, in <module>
    load_entry_point('awsebcli==3.0.10', 'console_scripts', 'eb')()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 519, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2630, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2310, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2316, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/ebcli/core/ebcore.py", line 23, in <module>
    from ..controllers.initialize import InitController
  File "/usr/local/lib/python2.7/dist-packages/ebcli/controllers/initialize.py", line 16, in <module>
    from ..core.abstractcontroller import AbstractBaseController
  File "/usr/local/lib/python2.7/dist-packages/ebcli/core/abstractcontroller.py", line 21, in <module>
    from ..core import io, fileoperations, operations
  File "/usr/local/lib/python2.7/dist-packages/ebcli/core/operations.py", line 25, in <module>
    from ..lib import elasticbeanstalk, s3, iam, aws, ec2, elb
  File "/usr/local/lib/python2.7/dist-packages/ebcli/lib/elasticbeanstalk.py", line 25, in <module>
    from ..lib import aws
  File "/usr/local/lib/python2.7/dist-packages/ebcli/lib/aws.py", line 17, in <module>
    import botocore_eb.session
  File "/usr/local/lib/python2.7/dist-packages/botocore_eb/session.py", line 27, in <module>
    import botocore_eb.credentials
  File "/usr/local/lib/python2.7/dist-packages/botocore_eb/credentials.py", line 27, in <module>
    from botocore_eb.utils import InstanceMetadataFetcher, parse_key_val_file
  File "/usr/local/lib/python2.7/dist-packages/botocore_eb/utils.py", line 22, in <module>
    from botocore_eb.vendored import requests
  File "/usr/local/lib/python2.7/dist-packages/botocore_eb/vendored/requests/__init__.py", line 53, in <module>
    from .packages.urllib3.contrib import pyopenssl
  File "/usr/local/lib/python2.7/dist-packages/botocore_eb/vendored/requests/packages/urllib3/contrib/pyopenssl.py", line 55, in <module>
    orig_connectionpool_ssl_wrap_socket = connectionpool.ssl_wrap_socket
AttributeError: 'module' object has no attribute 'ssl_wrap_socket'
rowanto@Rowanto-Deb ~ $ 

And I’m like, what? Googling around the last line returns you many result, but not those relevant with the eb cli v3. There’s also a post which suggest that we use the bundle version (it’s a zip file) of aws cli, but I can’t find a bundle version of eb cli. Long story short, I found this post which helped me to fix the problem. Thanks to @guss77!

Read more →

How to fix libgdbm3 update problem in Debian

In case you recently tried to update your debian system, and got an error related to libgdbm3 like this:

Preparing to unpack .../libgdbm3_1.8.3-13+b1_i386.deb ...
Unpacking libgdbm3:i386 (1.8.3-13+b1) over (1.8.3-13) ...
dpkg: error processing archive /var/cache/apt/archives/libgdbm3_1.8.3-13+b1_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libgdbm3/changelog.Debian.gz', which is different from other instances of package libgdbm3:i386
Errors were encountered while processing:
 /var/cache/apt/archives/libgdbm3_1.8.3-13+b1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

You can fix this easily by deleting the libdgbm3 changelog file.

Read more →

Monitor resolution not properly detected in Linux (Debian 7 or Wheezy)

So I have an ATI HD5xxx graphic card in my desktop personal computer. It’s a nice and quite fast card. It also has three display adapters: HDMI, DVI, DisplayPort. On my desk, there are two monitors. One of them have a DVI and a VGA adapter. The other however, only have VGA adapter. Do you see the problem here?

My graphic card has no VGA adapter, because of this, I need to use some adapter, and because I used an adapter, the resolution of the monitor is not detected properly. The native resolution of that monitor is 1920x1080 pixels, but I can only set it to 1440x900 when I use the adapter (which looks quite ugly). This problem is easily solveable in Windows 8. The windows’ ATI Cataylst has an option to force a resolution on the monitor. So I can just force 1920x1080 and it works perfectly. Debian (or other distribution like Fedora) however, does not have this option..

Read more →