AWS Glacier CLI Command

Archived some of my files in Glacier for cold storage, jot down some note which I think useful.

To Download

Response as below, “InProgress” indicate it’s currently retrieving your vault information.

OK, tried few hours later and it showed “Succeeded”, go on…

Get archive list with command below which will lead to output written in archive.json.

Then create a json file with sample content below indicate which archive to download (I use download.json in this case)

Then execute command below:

You get response as:

Check the status job status:

Come back few hours/minutes, check the status and it’s now turn to “Succeeded”

Finally you can download your file with command below:

To Upload

To Delete

 

Credit to: softwaredevelopmentstuff.com & madboa.com

 

Docker: exec user process caused “no such file or directory”

Have no idea why Docker showing this (un-friendly) error message.
In fact, it caused by the bash script file created in Windows having different line ending and cannot run properly in Linux container.

Here is the fix using Notepad++.
First show the linefeed symbol.

You will see this.

Convert the linefeed from Windows to Unix.

You will get this, and save it 🙂

 

Weird Spring Boot Behavior

Encountered a weird behavior when running my Spring Boot + JSF (PrimeFaces) application in Docker container (using java -jar xxx.jar as ENTRYPOINT). It keep complaining “xhtml Not Found in ExternalContext as a Resource” when I access the page, in fact that runs well either using java -jar command or mvn spring:run in host machine.

After some hard time,  manage to figure out why…….. phew….
… it was caused by wrong jar packaging structure, and correct structure should look as below:

Credit to BalusC @ stackoverflow

 

Extraordinary Merdeka 2018

Nearly didn’t remember when was the last time I celebrate Merdeka (at least hoisting our national flag in front of house). But I feel a little special this year as many Merdeka celebration mtv shared around social media 🙂
~Happy Merdeka Malaysia~

 

MSSQL Configuration Tips

Happened to me hence jot down here for future reference, perhaps helpful to you also 🙂

Try to configure the TCP port as below from Sql Server Configuration Manager:

Try to configure as below from Microsoft SQL Server Management Studio: