OpenSSL: socket: Connection refused connect:errno=111 Cent OS

19,248

Since the connection is refused there is either no server at this address or a firewall is blocking the connection. Not much more can be said from the information you provide but

  • Check that you actually have a server running at port 443: netstat -lnt on the server machine will tell you if there is some server at port 443.
  • If there is no server make sure you have it correctly configured (look for error messages)
Share:
19,248

Related videos on Youtube

Bibek Sharma
Author by

Bibek Sharma

Ruby!!! You make me Happy :) Start by doing what's necessary; then do what's possible; and suddenly you are doing the impossible

Updated on September 18, 2022

Comments

  • Bibek Sharma
    Bibek Sharma over 1 year

    I'm facing this problem.Actually I'm trying to disable SSLV3 and enable TLS 1.2 in my Cent OS production server.I found exact same question here.

    [root@186-aven-vps ~]# openssl s_client -connect kickmarket.eu:443 -ssl3
    socket: Connection refused
    connect:errno=111
    

    So I tried accepted answer in the above mentioned link

    [root@186-aven-vps ~]# nmap kickmarket.eu
    
    Starting Nmap 6.40 ( http://nmap.org ) at 2015-10-27 04:16 GMT
    Nmap scan report for kickmarket.eu (46.4.213.86)
    Host is up (0.000010s latency).
    rDNS record for 46.4.213.86: 186-aven-vps.mde.ie
    Not shown: 986 closed ports
    PORT      STATE SERVICE
    21/tcp    open  ftp
    22/tcp    open  ssh
    25/tcp    open  smtp
    53/tcp    open  domain
    80/tcp    open  http
    110/tcp   open  pop3
    143/tcp   open  imap
    465/tcp   open  smtps
    587/tcp   open  submission
    993/tcp   open  imaps
    995/tcp   open  pop3s
    3306/tcp  open  mysql
    10000/tcp open  snet-sensor-mgmt
    20000/tcp open  dnp
    
    Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
    

    But couldn't see the openssl running on port 443.Here is my some information

    [root@186-aven-vps ~]# openssl version
    OpenSSL 1.0.1e-fips 11 Feb 2013
    
    [root@186-aven-vps ~]# yum info openssl
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.softaculous.com
     * epel: mirrors.n-ix.net
     * extras: centosmirror.netcup.net
     * rpmforge: mirror.de.leaseweb.net
     * updates: mirror.23media.de
    Installed Packages
    Name        : openssl
    Arch        : x86_64
    Epoch       : 1
    Version     : 1.0.1e
    Release     : 42.el7.9
    Size        : 1.5 M
    Repo        : installed
    From repo   : updates
    Summary     : Utilities from the general purpose cryptography library with TLS implementation
    URL         : http://www.openssl.org/
    License     : OpenSSL
    Description : The OpenSSL toolkit provides support for secure communications between
                : machines. OpenSSL includes a certificate management tool and shared
                : libraries which provide various cryptographic algorithms and
                : protocols.
    
    • Admin
      Admin over 8 years
      What are you trying to connect to exactly? Nginx?
    • Admin
      Admin over 8 years
      @David please have a look stackoverflow.com/questions/33168251/…
    • Admin
      Admin over 8 years
      I still can't figure out what you're trying to do. Why would you expect OpenSSL to be running on port 443? What are you trying to connect to with OpenSSL? I understand the broad concept of what you're trying to do, but can't for the life of me figure out what the specific issue you're having has to do with your big picture. Are you trying to configure nginx? If so, to do what? To listen on port 443?
  • Bibek Sharma
    Bibek Sharma over 8 years
    Thank you @Steffen.It seems their is problem with my configuration.One thing I got confused is Do I need to use HTTPS SSL in order to call Paypal Sandbox API?
  • Steffen Ullrich
    Steffen Ullrich over 8 years
    @BibekSharma: I have no idea of how this API works.