Strange issue with AWS VPC Private link endpoint

Hai guys, sorry for discontinuing this blog for a long time; got distorted with work pressure and a lot of changes in my life! This Covid-19 lockdown time made me think about my blog and planned to start it again

Recently I was working for one of the clients to set up an AWS account for there internal product. Meantime one of my team members got into a strange issue while creating private link endpoint from an endpoint service. I got involved in it and got to know that it some issue with AWS availability zone assignment! I will be explaining how this issue come in to notice and what AWS asked us to do resolve the issue.

Before starting on the issue; let me explain what exactly I am trying to achieve. My client is having multiple products and multiple teams working on different projects on the AWS platform. One of the projects wanted to access one of the services running on a different AWS account, which is fully running on the private network and it’s not exposed to the public network.

To achieve this connectivity, utilized AWS service called Private linking using VPC endpoint services and VPC endpoint interface. High-level architecture will look like this.

A screenshot of a cell phone

Description automatically generated
AWS Pvt Link

How to create an endpoint service in AWS VPC:

  • Create a Network Load Balancer for your application in your VPC and configure it for each subnet (Availability Zone az1, az2, az3) in which the service should be available.
  • Create a VPC endpoint service configuration and specify your Network Load Balancer created above.
  • Grant permissions to specific service consumers (AWS accounts) to create a connection to endpoint service.

Steps to enable service consumers to connect to endpoint service:

  • Creates an interface endpoint with endpoint service name
  • Choose respective VPC and availability zone. We used CloudFormation with default option, this means; it will create in all zones as Account B NLB and Account A is having 3 subnets with az1, az2, az3.
  • To activate the connection, accept the interface endpoint connection request. It’s set to automatically accepted in account B so no actin required in our case.
  • Attached a security group with outgoing tariffing enabled for service ports on VPC CIDR.

So, till here all looks good; but it’s not! When tried to access or telnet endpoint DNS name on service port from account A it’s getting a timeout error.

Root cause:

When validated, I have noticed the endpoint interface created in account A only created interface with 2 availability zone. Asper AWS documents, CloudFormation should have created endpoint interface with 3 availability zones as NLB in Account B and account B is having 3 availability zones!

I have taken this issue with AWS and they came back with a reply saying

When creating endpoint service CloudFormation do not have the option to give AZs. It takes AZs from the NLBs attached.

If you add a subnet later to the NLB in different AZ that change wont take effect on endpoint service. i.e. when you add a subnet to the NLB AFTER you created the Endpoint Service.

But we didn’t add or update any subnet in any of the accounts, it was same old VPC and subnets in both of the accounts! AWS also asked us to delete and create endpoint service and endpoint interface again.

I have also noticed, when we create endpoint interface from AWS console, I do not have any issue and It takes AZs from the NLBs attached and it works as expected.

Issues with Amazon Elastic Load Balance or ELB and fixes

I was using Amazon cloud services for past some time. Amazon is one of the amazing service provider and mean time many restrictions and limitations when you are looking for flexible cloud infra and services. On my experience on Amazon EC2, and ELBs; I have noticed some issues which may be very difficult to identify.

AWS ELB

ELBs behave very strange some time when servers go offline. As Expected Health checks in ELBs, will manage EC2 downtime as explained. But I have noticed, once all servers in ELB goes down for maintenance or for any rezone it will be marked as Out of service in ELB page.

Yes, this looks normal. The issue comes when these servers come up; at this moment ELB behaves very strange. ELB will show servers are in service after health checks, and even you can see health checks are hitting all servers. But if you try to access ELB URL it will respond like unavailable or it will say service is down.

So surprised rite! Yes this what issue I have noticed. The solution for this was remove the server from ELB and add it back. When I checked with some AWS experts, they said it will come up and will be live but if it’s not coming up remove servers and add it back.

So the conclusion is keep sharp eye on it using monitoring tools. Hop this will be helpful for some one who will be facing similar king of issues with ELBs. Thank you, will come with new topic soon.

How to Use Wrapper to Get Root Privilege for Scripts in Plesk Module

When you try to build a Plesk module you will come across number of doubts in that some of them are

How to Run a Shell Script or Binary as Root in Plesk Module?
How to use plesk wrapper to get root privilege for scripts?
How to use plesk wrapper from sbin?
What to do with “failed to open stream: Permission denied” in plesk module?

Plesk-modules
Its very difficult to get help on plesk module development. The tutorial provided by Parallels is really insufficient and incomplete. When I was trying to build a plesk module package, I faced many problems and googling never gave any solution too. After doing so much research I was able to develop a plesk module for my Client. I hope this post will be helpful for many who are trying to build plesk module and wanted root privilege to run a script in it.

Following is one of the methods which I used successfully in plesk 10.4. I hope it will work for all plesk versions.

Imagine you want to build a plesk module and that should have functionality to set ownership of  configuration file to root:root or any other ownership. Also need to write in to /etc/passwd or any file which can be edited only with root permission. This functionality is not possible with simple php script like chown, or system functions. It is because, plesk modules runs under psaadm user privilege so it can’t change files which is under root privilege. But there is one solution for this which is provided in plesk i.e. plesk module wrappers. This can be used to get root privilege for some scripts. To achieve this, you can follow below procedure or steps.

Imagine you have a shell script [setperm.sh] which is used to set permission for all files related to your module. To execute this script with root privilege use following steps.

1) Place setperm.sh under “/usr/local/psa/admin/sbin”  [don’t forget this path is very important]
2) Create a symbolic link in “/usr/local/psa/admin/bin/modules/<ur-module-foldername>”. By executing
“ln -s /usr/local/psa/admin/sbin/wrapper /usr/local/psa/admin/bin/modules/<ur-module-foldername>/ setperm.sh”
3) You are done with wrapper; now you can use this script in any php file inside your module script and it will execute as root.
4) For example you can call this script like this
<?php
system(/usr/local/psa/admin/bin/modules/<ur-module-foldername>/ setperm.sh, $varout);
?>
5) You can create this symbolic link while building RPM itself.

So this is all about plesk wrapper usage to get root privilege for scripts under plesk module.

Must have Useful Android Apps

If you having an android phone it is sure that you will be searching for Must have and Useful Android Apps, good or best apps in android market and also best free android apps in market etc. I have spent two third of my time in searching, installing and testing android apps for my android phone for the past few months. So I have come to a conclusion on all the best apps and must have apps for android phones. I have listed all apps which you should have in your android phone. In this 16 out of 17 are Must have Useful free Android Apps.
[ad#add-top-in]
By defaults all android phones having many Google applications like gtalk, gmail, etc.
1) Google Maps

Google Maps a Google Inc product, it really helps those who travel.

2) eBuddy Messenger

eBuddy Messenger helps, Stay always connected with all your friends and family on MSN Windows Live Messenger or WLM, Facebook, Yahoo, MySpace, Gtalk, Orkut, ICQ, AIM (AOL) and Hyves.

3) Barcode Scanner

Barcode Scanner is must have application. This Scans barcodes on products then look up prices and reviews. You can also scan Data Matrix and QR Codes containing URLs, contact info, etc. Also share your contacts, apps, and bookmarks via QR Code.
You can also copy URL form you pc monitor if you have firefox with QR code add-on installed

4) Tiny Flashlight + LED

Tiny Flashlight + LED is one of the very use full application. It supports the widest range of devices with camera led/flash torch.

5) Dolphin Browser HD

Dolphin Browser HD is one of the best browser I found which support many add-on. Which is not that good in any other browsers, also nice design. Many customizations, themes etc.

6) Springpad

Springpad is a nice App which really helps to keep notes and also passwords protect etc

7) Adobe Photoshop Express

This is one of the very useful app which can be used to instant edit of images took in cam or stored in phone.

8 ) PicsIn Photo Studio

PicsIn Photo Studio is one of the amazing applications which are like image creator, wallpaper crater, paintbrush editor, image publisher to social network etc.

9) TubeMate: YouTube Downloader

TubeMate: YouTube Downloader is one of the nice application, this helps to search in youtube also helps to download videos we like in different resolution. Even this has supportive application to convert video to mp3 converter also.

10) GO Weather

GO Weather is nice weather application and it gives nice weather widgets also.

11) MixZing Media Player

MixZing Media Player is nice Media player, compare to default media player this having many options and also nice 10 band equalizer too.

12) ES File Explorer

ES File Explorer is nice application. It is having multiple functionality like featured file manager with FTP and network and blue tooth, app manager with app backup and task killer etc, which explores PHONE and PC.

13) App 2 SD Free (move app to SD)

App 2 SD helps you to get more free internal phone storage space, also it notifies which are application you can move to SD card.

14) Android Assistant(14 features)

Android Assistant it having many features. It really helps to optimize your device by clearing cache monitoring CPU, memory, battery usage etc even it have an advance task killer.

15) AndroZip File Manager

AndroZip File Manager is an archive manager (ZIP, encrypted ZIP, RAR, TAR, GZIP, BZIP2, 7ZIP – BETA – under development), app backup, Task manager, search files, app installer, send files, app installer. Has multiple/batch move, copy, delete, create ZIP

16) JuiceDefender Plus

Compare to all application I will strongly recommend JuiceDefender Plus to save battery usage. It really works grate but need to configure it nicely. You can customize many things in it. This app had a free copy earlier, but now it’s removed. Now you need to pay for it.

17) GO Launcher EX

This is one useful application. It gives very good flexibility for your android phone appearance. Many customizations, themes etc. You can change each and every part of your android phone looks also it have some nice widgets also. It is really awesome tool.

Issues and good features of Samsung Galaxy Ace S5830

The Samsung Galaxy Ace S5830 has good features for good price. A decent 3.5” HVGA screen, 800MHz processor, Good 5 mega pixel camera, good look, and good design. However it fails in some area like disastrous video recording and poor codec support etc.

Key features of Samsung Galaxy Ace S5830

  • 800MHz ARM 11 processor, ARM6 architecture.
  • Adreno 200 GPU, Qualcomm MSM7227 chipset.
  • 278MB of RAM available for user.
  • Internal memory 158 MB
  • Micro SD slot (up to 32GB, 2GB in box).
  • Quad-band GSM.
  • Dual-band 3G supports.
  • 7.2 Mbps HSDPA support.
  • 3.5″ 16M-color TFT LCD capacitive touch screen of HVGA (320 x 480 pixels) resolution.
  • Android OS v2.2 (Froyo).
  • Touch Wiz 3.0 UI customization.
  • Gorilla Glass display
  • Swype text input.
  • 5 MP auto focus camera.
  • LED flash; Geo-tagging, face and smile detection.
  • QVGA@15fps video.
  • Wi-Fi 802.11 b/g/n.
  • Wi-Fi hotspot
  • DLNA.
  • GPS.
  • A-GPS connectivity.
  • Digital compass.
  • MicroUSB port (charging).
  • Stereo Bluetooth v2.1. With A2DP
  • Standard 3.5 mm audio jack.
  • DNSe sound enhancement.
  • FM radio with RDS.
  • Document editor.
  • File manager pre-installed.
  • Samsung Apps brings a few nice apps for free.
  • Accelerometer.
  • Proximity sensor.
  • Dimensions : 112.4 x 59.9 x 11.5 mm
  • Weight : 113 g
  • Stand-by : Up to 640 h (2G) / Up to 420 h (3G)
  • Talk time : Up to 11 h (2G) / Up to 6 h 30 min (3G)
  • Average Recharge time once charged: 12h [2G, Wifi]

[ad#add-top-in]

Main disadvantages

  • Very bad QVGA (320×240) video recording @15fps
    There are some good ROMs in internet, which support very good resolution video recording for Samsung Galaxy Ace S5830. I didn’t try because its pretty new device! If I flash the device it will cos warranty issue.
    Not sure why Samsung set video resolution to a poor value.
  • No shutter key for the camera
  • No support for Adobe Flash in the web browser (Still you can watch You tube and flash videos in it).
  • No ambient light sensor
  • No DivX/Xvid video support out of the box
  • Not ARM-7 architecture.
  • Java applications are not supported by default. Need to download Java MIDP emulator.

Issues Noticed

  • Phone gets heated up a lot (Mainly battery) while charging and while running heavy applications.
  • Samsung Ace S5830 shut down by itself when screen goes off, mainly when using the Wi-fi, it looks like an android 2.2 bug.
  • My Samsung Ace S5830, only 1 month old recently powered off its own and was not able to switch it on back. When checked with service center guy, he said motherboard shorted, need to replace mother board.
  • Firefox browser is not supported. Its not the Samsung ace issue we can say Firefox need more RAM and resource to run.

First Tablet PC Xoom Motorola with Android 3.0

xoom-Android

Motorola Mobility’s hotly awaited tablet computer, the “Xoom,” will be available in the market soon.
With a 10.1-inch screen, the Xoom is about the same size as Apple’s iPad, which hit stores in April. Xoom will be the first tablet computer featuring Android 3.0, or Honeycomb, an operating system developed with tablets in mind.
“It has multi-tasking capability.” Several features on the Xoom that the iPad does not have; including front and rear facing cameras and the ability to play Adobe Flash video software, which is banned from the Apple device. Xooms to hit the market will feature 3G connectivity to the Internet through US carrier Verizon Wireless. A 4G Xoom will come out soon and 3G versions can be upgraded to 4G. HD video capture, 2MP video calling camera, 1GB RAM, 32 GB inbuilt memory with microSD Card slot, supports up to 10 hour video playback through its powerful standard battery. The XOOM Android Tablet is Wi-FI, Bluetooth and Corporate sync enabled

Glass less Apple 3D TV How it Works

Apple 3D

Apples new patent looks to be a form of 3D projection technology. The Apple 3D patent was originally filed in 2006, and has just now been released publicly. Apple has been working on a device that allows the viewer to view a 3D image without those 3D glasses. The Apple 3D invention uses a screen that deflects images taken from slightly different angles into each eye to create a stereoscopic image which the brain converts into three dimensions. The brass ring is an entirely holographic live-action movie, though such a feat will require new film making techniques to capture the actors from all the necessary angles. The Apple 3D technology will likely first be implemented with computer displays, and the iPad.

Looking at the setup it is really hard to implement. Apple 3D will have 3 hardware components like a projector, 3D image generator, 3D display and light sensor, which is placed accordingly in a room. It’s clear that it need a special room to implement this Apple 3D technology. So you are not using 3D glasses to see this but you need to spend more on devices and also should arrange a special room for it. Any way if the quality and 3D reality is good then the people will accept it.

How to Setup Amazon EC2 Cloud Server Tool Locally

Cloud computing you do not generally own the physical infrastructure serving as host to the software platform in question. Instead, they avoid capital expenditure by renting usage from a third-party provider. They consume resources as a service and pay only for resources that they use. Many cloud-computing offerings employ the utility computing model. Sharing “perishable and intangible” computing power among multiple tenants can improve utilization rates, as servers are not unnecessarily left idle it will reduce costs significantly while increasing the speed of application development. A side effect of this approach is that overall computer usage rises dramatically, as customers do not have to engineer for peak load limits. Additionally, “increased high-speed bandwidth” makes it possible to receive the same response times from centralized infrastructure at other sites.
[ad#add-top-in]
Following are some simple Tip and tricks on how to build an application using Amazon Web Services. While purchasing Amazon EC2 you will get auth key and public key to access your EC2 server. You can set this key to your local PC by simple commands bellow.
Down load Tool from http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&categoryID=88

* Before all you need to download java5+ SDK to install this tool

IN LINUX:

export JAVA_HOME=/usr/    [Path to java binary]
export EC2_HOME=/root/amz    [Path to EC2 tool]
Set the environment variables as follow
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=/root/amz/pk-HKZYKTAIG2ECMXYIBH3HXdsd4ZBZQ55CLO.pem
export EC2_PRIVATE_KEY=/root/amz/pk-WAJNB7EJYW4ESF2O74CQsdsddNVU6ZXQ5K.pem
export EC2_CERT=/root/amz/cert-WAJNB7EJYW4ESF2OsdCQSQXNVU6ZXQ5K.pem

IN Windows:

set JAVA_HOME=C:\Sun\SDK\jdk    [Path to java.exe]
set EC2_HOME=C:\amz
set PATH=%PATH%;%EC2_HOME%\bin
set EC2_PRIVATE_KEY=/root/amz/pk-HKZYKTAIG2ECMXYIBH3HXdsd4erZQ55CLO.pem
set EC2_PRIVATE_KEY=/root/amz/pk-WAJNB7EJYW4ESF2O74CQserddNVU6ZXQ5K.pem
set EC2_CERT=/root/amz/cert-WAJNB7EJYW4ESdf2OsdCQSQXNVU6ZXQ5K.pem

So you are done now to test the tool run the following command

#>ec2-describe-regions

Output:
REGION        us-east-1        us-east-1.ec2.amazonaws.com
REGION        eu-west-1        eu-west-1.ec2.amazonaws.com

You can get all commands in /bin folder of EC2 tool you downloaded. Like to start instants stop and restart also search AMI and applications to get password etc.

You can install any of the OS you want Windows or Linux etc and also you can choose verity of OS and pre-installed AMI or even you can create your own AMI using AMI tool provided by EC2. You can create AMI of you local server and also of  VMware images etc.

  • Wile installing Linux OS it installs OS without any password for root, so u don’t want any password while ssh into it.
  • Incas if you need to get the password of the instant you can use the tool you installed to get the password using the command called
PROMPT> ec2-get-password i-2574e22a -k windows-keypair q96A40B9w

Philips 3D 4YOU LCD Monitor and with its first 3D Television set

Panasonic is promoting its 3D TV and even Sony is trying for 3D TV too. Philips is already out with its 3D TV prototype. Even Samsung. The TV can also display standard two-dimensional images, close to HD quality.

This can be done either by direct 3D recording or by converting existing 2D content to 3D content. After that it’s coded with a processor in the TV generates nine slightly different views corresponding to the different angles. From almost any location, a viewer catches a different image in each eye. It is viewed over any 3D television using special glasses that come along with the TV itself.
[ad#add-top-in]
This type of TV is best suited for video gaming. The amount of fun element it will add to Video Gaming. As its very difficult to convert traditional videos into 3D format, new games can very well adapt to the situation and can start creating new games which will be 3D compatible.

A standard laptop running Philips’ software was able to convert the DVD The Lord of the Rings: The Return of the King into 3D in real time and display it on Philips’s new 20-inch 3D 4YOU LCD monitor. A retail-kiosk implementation of the 3-D screen.