<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
Maven package org.apache.commons.httpclient.methods does not exist
Ubuntu 18.04 customizations
Few of the things which I like are mentioned below.
Enable Gnome Shell extensions and Windows like themes
https://www.howtogeek.com/353819/how-to-make-ubuntu-look-more-like-windows/
sudo apt install gnome-shell-extensions gnome-shell-extension-dash-to-panel
auso apt install gnome-tweaks adwaita-icon-theme-full
Gradle Could not create service of type ScriptPluginFactory
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Clevo P570WM Ubuntu freeze problem
To get Ubuntu running on a Clevo laptop get kernel version 5.6.15+. Here are the steps to upgrade Kernel.
7 years back in 2013, I bought a P570WM laptop from Metabox, I did one big mistake that I invested money on something which was brand new in the market. My goal was to get some good Ubuntu laptop. I thought to go ahead with Clevo based laptop.
Below were the specs, they might not look impressive, but if you think these are 7 years old, then you will feel they were really good back then.
- Screen type: 17.3" FHD 1920x1080 LED/LCD
- Graphics: Nvidia GTX 780M 4GB GDDR5 video graphics
- Processor: i7-3970X 6-Core 3.5GHz - 4.0GHz 15MB Cache
- RAM memory: 32GB DDR3 1600Mhz RAM
- Primary drive: 1TB 7200 rpm primary hard drive
I was very happy with the laptop arrived, but my nightmare began when I installed Ubuntu in it and it froze immediately on the boot.
Unfortunately, Metabox was of no help, they said they don't support Ubuntu and I was left alone with a massive waste of money of $5.5K machine of no use.
Fast forward 2020, that laptop was collecting dust in my cupboard and I thought to give it another shot and glad it worked. I am using Ubuntu 18.04 with Kernel 5.6.15 and no custom drivers for the Nvidia card.
The posts which gave me a hope to keep moving are mentioned below
https://edgcert.com/2019/06/03/ubuntu-on-clevo/
https://forum.manjaro.org/t/freezes-when-probing-system-on-clevo-n850hk1/60346
https://askubuntu.com/questions/1068161/clevo-n850el-crashes-freezes-ubuntu-18-04-1-frequently
Related Kernel bug
https://bugzilla.kernel.org/show_bug.cgi?id=109051
Upgrading Large Hadoop Cluster
Epilogue
Many weeks before The Weekend
Practice upgrades
Code changes
Meeting the pre-requite for upgrade
One week before The weekend
Imaginary upgrade
Applications upgrade and use case teams
Data feeds redirection
The time roaster
The Weekend
Friday
Saturday and Sunday
Credits
Collaboration and COVID
Kids and families
Weekend + 1 Monday
Replace ssh key of the AWS EC2 machine
Step 1)
Check that you have existing ssh key working and we can log in to the machine using it. You can also directly login via a new function in AWS console.
Step 2)
Generate a new SSH key via Amazon Web Console
Step 3)
Get the public key from it. Using the command below
ssh-keygen -y -f ~/Downloads/second.pem
If working on Windows system using this https://www.puttygen.com/convert-pem-to-ppk
Step 4)
Login to the machine and edit the file.
vi ~/.ssh/authorized_keys
Add the new public key and check that you are able to login with the new key
Step 5)
Change permission of new key to 400 and try to login
Step 6)
If login is successful delete the old key from authorized keys file
Tips for AWS Professional certification exams
I recently gave AWS Professional exam and found certain things that are useful to be documented and share with all.
This post is generally about non-technical things. For technical pointers please see the other related posts.
AWS professional exams not only test your AWS knowledge but, also test our mental and physical strength. You have to sit there for 3 hours staring at the screen and read large large texts in questions and answers.
Below are the things which can be useful for you
Stretch at regular intervals
After every 30-45mins just stand up and stretch your legs, or just stretch your hands while sitting, this will keep your blood circulation moving and helps to keep you active.
Time management
AWS professional exams are the fight against time, you need to keep a constant tab on your clock which ticks on the screen. As a rough guideline try to complete 30 questions in the first 60mins, 30 in the next 60mins and keep the remaining 15 questions in 30mins. Try to spend just 2 mins per question and mark any thing which you are doubtful for a review and go ahead.
Time left >>>>> Questions pending
170 >>>>> 75
110 >>>>> 45
50 >>>>> 15
20 >>>>> 0
In the last 20mins try to review any questions which you have marked during the first pass.
Question reading
Read what is really asked first. Don’t start reading the question from the top to bottom and then read the answers. Don’t do this.
Just to make it clear, see the example question below from the AWS Solutions Architect Professional exam.
Question.
Your company’s on-premises content management system has the following architecture:
- Application Tier – Java code on a JBoss application server
- Database Tier – Oracle database regularly backed up to Amazon Simple Storage Service (S3) using the Oracle RMAN backup utility
- Static Content – stored on a 512GB gateway stored Storage Gateway volume attached to the application server via the iSCSI interface
Which AWS based disaster recovery strategy will give you the best RTO?
A) Deploy the Oracle database and the JBoss app server on EC2. Restore the RMAN Oracle backups from Amazon S3. Generate an EBS volume of static content from the Storage Gateway and attach it to the JBoss EC2 server.
B) Deploy the Oracle database on RDS. Deploy the JBoss app server on EC2. Restore the RMAN Oracle backups from Amazon Glacier. Generate an EBS volume of static content from the Storage Gateway and attach it to the JBoss EC2 server.
C) Deploy the Oracle database and the JBoss app server on EC2. Restore the RMAN Oracle backups from Amazon S3. Restore the static content by attaching an AWS Storage Gateway running on Amazon EC2 as an iSCSI volume to the JBoss EC2 server.
D) Deploy the Oracle database and the JBoss app server on EC2. Restore the RMAN Oracle backups from Amazon S3. Restore the static content from an AWS Storage Gateway-VTL running on Amazon EC2
----
When you see this question, the first thing which you should read is the text underlined. This will give you an idea of what is really needed. Then quickly go up and read the full questions and start reading the answers options. Keep on eliminating the answers till to are able to find the correct answer as per what is asked for the underlined text.
Elimination
While reading keeps on eliminating the wrong answers and iterate until you are able to reach the most suitable answer as per the ask of the question. If you are stuck with a choice of 2 and not able to decide on the final one, mark that question for review, randomly mark one choice as the answer, note on the notepad provided with question number and choices for which the final battle is to be decided. You can come back to this question later at the end of the exam if time permits. This happens very rarely that you will get time to review. So, we have to mark something in the first pass and then later decide if we get time in the review.
Water bottleA clear water bottle is allowed, keep it next to you and drink a sip when your brain starts steaming in the middle of the exam. It will happen that brain will be jammed in the middle at the regular intervals and you will need some fuel to keep it going :)
Thank you for reading. I am done with AWS Devops Professional and now preparing for the SA Pro. What are your tips for the AWS professional exams?
How to pass AWS Devops Engineer Professional Exam
Hi,
I recently cleared AWS Devops Engineer Professional exam.
Below is what I did and hopefully can be helpful to you as well for the exam.
Course:
- Stephane Udemy course. I did everything he told. Readings (He suggests lots of things to read) + Watched videos 2 times and labs. I did all 3 Associate exams also following Stephane. So, he does assume that we know the basics.
- AWS Official Devops exam readiness. This course tells about how to approach the question and the test. I highly suggest you to take this and it is a free course.
Practice tests
- Whizlabs practice tests. My average was around 72% and 87% in the final exam.
- Udemy https://www.udemy.com/course/aws-certified-devops-engineer-professional-practice-exams-/. My average was around 70%
- AWS Official practice test. I scored only 60% in the practice test
This exam tests your time management. So keep an eye on the watch on your side. Try to finish 30 questions in first hour, 30 in second hour and 15 in the remaining time plus for the questions you marked for the review. I was very slow and managed to finish the exam only 5 mins to spare.
Good luck
How to pass AWS Certified Developer exam
Study material
- Udemy Stephane Maarek course
- Linux Academy course
- Whizlabs
- Udemy Stephane Maarek practice tests
Good luck
Patterns
https://en.wikipedia.org/wiki/Architectural_pattern
Software
https://en.wikipedia.org/wiki/Software_design_pattern
Convert webpage to pdf using Python
If you want to use Python then see the library below
https://pypi.org/project/pdfkit/
Gradle proxy settings
If you are behind the corporate proxy, you can configure Gradle to use the proxy by following settings.
Create a file called ~/.gradle/gradle.properties
Generally is in «USER_HOME»/.gradle/gradle.properties, where «USER_HOME» is your home directory.
That’s typically one of the following, depending on your platform:
C:\Users\<username> (Windows Vista & 7+)
/Users/<username> (macOS)
/home/<username> (Linux)
Add the settings related to proxy.
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
Also add the HTTPS proxy settings
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
If your proxy is a CNTLM then you can also configure
* Set the http.proxyUser system property to a value like domain/username.
• Provide the authentication domain via the http.auth.ntlm.domain system property.
Class JavaLaunchHelper is implemented in both
I was getting the below error which compiling my code.
objc[3789]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java (0x1095e64c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1096724e0). One of the two will be used. Which one is undefined.
Solution.
Upgrade JDK to the latest version from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Details related are also discussed at https://stackoverflow.com/questions/18794573/class-javalaunchhelper-is-implemented-in-both-libinstrument-dylib-one-of-th
How to fix when Nexus 5 cannot detect Wifi SSID
Suddenly my phone today could not detect the WiFi SSID for my home router. Strangely all other devices at my home are able to connect.
I was not able to figure out why it is the case and I restarted my Router and Phone. But, it did not help.
I logged into router and checked what is the channel of current wifi connection. It was set to automatic and its value was 12.
I found the issue with my phone plus higher channels.
https://www.reddit.com/r/Nexus5/comments/31ljh5/connect_to_wifi_channel_12_or_13/
I manually set the channel to a lower number (2) and then my phone was able to detect and connect to the Wifi
How to get Wunderlist list of all tasks in different lists
Wunderlist has become my default task management tool.
I was looking for a way to see on a single page the list of all tasks, in the all the lists.
After lot of searching, I found a way inside Mac application of Wunderlist.
If you want to see list of all tasks on Mac (might be in other OS also)
- Click Open preferences
- Click on Smart List
- Check the option next to ALL and make it Auto
- Save and then you should see list of all tasks inside the menu option All
How to prettify JSON in VS Code Editor
I have been using VS code editor from 1 month now. I am big fan of it and now it has become the default editor for me.
Here is a tip if you want to prettify son in VS code.
Download the extension Prettify JSON
Install and Reload the editor
From the Command Palette, type Prettify JSON and hit enter
If you have JSON in your editor, it would shown now in pretty format.
Enjoy using VS Code
How to install libevents on Linux
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar xzf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/opt/libevent # Change path as required
make
make install
How to get internet access inside Jupyter notebook
vi ~/.ipython/profile_default/startup/00-startup.py
Add the following inside it
(Change proxy details as per your own environment)
import sys,os,os.path
os.environ['HTTP_PROXY']="http://127.0.0.1:3128"
os.environ['http_proxy']="http://127.0.0.1:3128"
os.environ['HTTPS_PROXY']="http://127.0.0.1:3128"
os.environ['https_proxy']="http://127.0.0.1:3128"
# Test
Inside the notebook cell
import requests
requests.get("http://google.com")
Atom editor proxy
To use Atom editor behind proxy , use the below. Restart Atom if needed
apm config set strict-ssl false
apm config set https-proxy http://127.0.0.1:3128Change proxy as per your requirements
Use Kafka command line with Kerberos
kdestroy
kinit -k -t myprincipal.keytab myprincipal/HOST.com
export KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=/etc/kafka/conf/kafka_client_jaas.conf"
/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh \
--zookeeper zookeeper.com:2181 \
--topic topicname \
--from-beginning \
--security-protocol SASL_PLAINTEXT