Monday, January 18, 2021

AWS S3 Copy Error - Connection was closed before we received a valid response from endpoint URL

 aws s3 cp error :


Error : upload failed: ./file.txt to s3://bucketname/file.txt Connection was closed before we received a valid response from endpoint URL: "https://bucketname.s3.amazonaws.com/file.txt"
Solution :

You are getting this error because you did not configure your aws bucket region in your ec2 instance. 

I did not get this error every time. When my bucket was in Mumbai region (ap-south-1), I did not need to configure bucket region in my ec2, I got this error when one of my bucket was in North California (us-west-1) region but it is a good practice if you configure your bucket region always.

Configure aws with region.

aws configure

It will ask for access key and secret key. If you have then you can enter, if you do not have like you attached the role with your ec2 instance, then you can skip it by simply pressing return key.

Now it will ask 'Default region name'. This is the attribute for that you are configuring aws. Check your bucket's region and enter here.

Example : If your bucket is in North California then your region will be us-west-1.

Skip the 'Default output format' and try to copy again using `aws s3 cp` command.

You should not get the same error again.

Saturday, December 19, 2020

Google Chrome GPU process Error

If you are facing gpu process error in your google chrome after upgrade or if the error starts appearing suddenly, this solution should work for you.
To find the error, you need to start the chrome from terminal then only you will be able to see the error.


In regular way, Chrome does not open. You click on the icon and it does not happen anything that's why you are not able to detect the error.


In some cases, chrome starts with half black and half white screen and you cannot type anything because cursor does not appear.

If you are a root user then you need to start the chrome with given command.

google-chrome --disable-gpu --disable-software-rasterizer --no-sandbox

or you can start it using icon too but it is not working so you need to update a line in the file /opt/google/chrome/google-chrome.
Find last line in the file. It should be something like this.

exec -a "$0" "$HERE/chrome" "$@"

Replace the line with

exec -a "$0" "$HERE/chrome" "$@" --disable-gpu --disable-software-rasterizer --no-sandbox

Now click on the chrome icon, it should be opened properly.

Mysql import table error : Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.

If you are facing this error while importing data in mysql, you need to edit the Engine type of your mysql table.

Error : Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.

 Solution :

ALTER TABLE sheet4_5 ENGINE=MYISAM;