Posts

Showing posts from June, 2015

\r command not found. Cygwin script

You might have faced this error when creating a cygwin script, Even a simple script can replicate this issue #!/bin/sh date who ls ps ax ./deploy.sh ./deploy.sh: line 2: $'date\r': command not found ./deploy.sh: line 3: $'who\r': command not found https://cygwin.com/ml/cygwin-announce/2010-08/msg00015.html This page has the problem in detail.So the solution is #!/bin/sh # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples (set -o igncr) 2>/dev/null && set -o igncr; # this comment is needed date who ls ps ax This line does the trick. Happy Cygwin scripting :)

Debugging the SSL Issues in Linux

First of all the JVM Needs to start in the Debug mode as many servers report the errors vaguely. It is better to start in Debug mode Add the JVM parameter -Djavax.net.debug=all After that before Even trying to run the transaction try to connect the server with the certificate using openssl openssl s_client -showcerts -connect 10.24.256.69:443 If the certificate is present it shows the last statement as Verify return code: 0 (ok) Check the link below for a more detailed tutorial. http://www.cyberciti.biz/faq/test-ssl-certificates-diagnosis-ssl-certificate/ If for some reason is receiving an error OpenSSL: socket: Connection refused connect:errno=111 It means that the PORT might be wrong in the connection. So we need to find the right port on which https is running. This can be done using nmap So what u do is nmap -sS 10.24.256.69 sample output for above command  Host is up (0.0051s latency). Not shown: 999 closed ports PORT    STATE SERVICE 443/tcp