Sunday, September 13, 2020

ftp connection error on command line

500 I won't open a connection to 172.31.xx.xxx (only to 19.216.xxx.xxx)ftp: bind: Address already in use

If you are trying to make a connection to ftp on command line and you are getting above error, it means ftp is trying to connect to the server using private IP but it cannot connect to remote server using private IP as it needs public IP. You have already passed public IP but still it is connecting to private IP and showing error 500. Here is solution for you.

Soluton :

Connect to ftp server in passive mode using -p

ftp -p ftp.domainname
or
ftp -p 19.216.xxx.xxx
It will ask username and password and after typing it, you should be able to connect to remote server successfully.

bitbucket pull/push error - gnutls_handshake() failed: Handshake failed

bitbucket gnutls handshake failed error :

If you are using ubuntu 14.04 or older and recently you start getting the error while pulling/pushing into git repository. All was working fine and suddently it stopped working.

You are not alone who are facing the issue. bitbucket removed support for libcurl3 version because of vulnerability. To use bitbucket, you should have libcurl4 installed in your system.

Solution :

Add following lines in the file /etc/apt/sources.list


deb http://security.ubuntu.com/ubuntu xenial-security main
deb http://cz.archive.ubuntu.com/ubuntu xenial main universe
Run :

sudo apt-get update && sudo apt-get install curl
If you are not able to install libcurl4 because of python dependencies errors on your Ubuntu machine. Follow approved solution on this link of stackoverflow and then follow above solution to install libcurl4.

 

tomcat error - tomcat authenticated - An attempt was made to authenticate the locked user "user"

You are getting 'Permission Denied' for some of the modules of your tomcat web application and you get error 'An attempt was made to authenticate the locked user "user"' in the log, here is the solution for you.

Solution :

The 'work' directory inside tomcat does not have enough permission to open the jsp files in the browser. You need to provide permission to 'work' directory. 'Owner' and 'Group' of the 'work' directory should be 'tomcat'

chown -R tomcat:tomcat /usr/share/tomcat/work
Your tomcat directory path may be different, it may be in /opt or in /var/lib/tomcat. Find your tomcat directory and provide it correct permission.

Ubuntu pip install error - __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'

 Pip install error in ubuntu

__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'

Solution :

You are missing one package in your Ubuntu, Install

sudo apt install libcurl4-openssl-dev libssl-dev

AWS S3 billing for 'Amazon Simple Storage Service APS3-TimedStorage-ByteHrs'

If you are getting some biils for S3 resource although there is no enough data in your bucket according to you. When you check the bill, it charges you for some GB data in your s3 bucket every month but you do not remember any GB data in your bucket.

I would suggest you to check bucketobjectsize metric in s3. Open your s3 bucket and go in Management > Metrices . here you can see all occupied size of your bucket. You can open this metric in cloud using 'View in cloud' option. In the graph you can see the graph bucketsize increment over the time. This is very helpful to analyze your bucket filling capacity over time.

If you are using your s3 bucket to keep back up data, please make sure you remove older data frequently. This may be the reason your bucket is occupying too much size.

If you have used cron to put data in the bucket and same cron is used to remove data after X days of time, I would sugest you to check 'Versioning' option in the properties. If 'Versioning' is on, even if you remove the data using cron, still it keeps one copy of it and this may be the reson your bucket is showing this much occupied space.

Open s3 bucket in aws management console and enable 'show' toggle button to see all hidden data, remove this data and your bucket will be back with the expected occupied size.