Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kk6cO-00072L-4O for pgsql-general@arkaria.postgresql.org; Tue, 01 Dec 2020 14:27:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kk6cN-0004BD-00 for pgsql-general@arkaria.postgresql.org; Tue, 01 Dec 2020 14:26:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kk6cM-0004B6-0A for pgsql-general@lists.postgresql.org; Tue, 01 Dec 2020 14:26:58 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kk6cJ-000760-Db for pgsql-general@postgresql.org; Tue, 01 Dec 2020 14:26:56 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6588B5C0103; Tue, 1 Dec 2020 09:26:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 01 Dec 2020 09:26:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=X Urf5Cl1EgJu/Ggr0kSI6bib/nN9h4PbZZFNW91nf/0=; b=CW52y7gqIG3GoXgvC t4WYSIIzDg+IWgXw7y8pCvTwCxZejxpZaCZ2jjwzuW363agU+c39NnnYCMC+edZ2 SQ+1nD5zKWIFk/+hHk7prZd/F0vn8+gPxxZYDTIz0d+f2broE3xh2axJvc5vvZjN 2FnCvIgEKs8BFRijbJ/lJzmuHWSc8RTXI5WUKjtvlBqYf/WWSWzFtEqcL5iUJ2un akeGBjPERDbQkUeOHsyZ1XtGzyWXW0ZT8yyafaOAeBPtEX4BwaSf8Nc5C03fBdV6 oJYnyivLalUCL2CoB+CnZ4Pj/WyRCLoAJtkI3gI7I4NamlVYKS32owG9dLwmmhhL eajdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=XUrf5Cl1EgJu/Ggr0kSI6bib/nN9h4PbZZFNW91nf /0=; b=R7WZ2DkZVQZRFQ+w471rBtt5RGe/NCA5sGunksCtr+H5wmF9l5QAqnm4t nzzJbtWc1FmhR/R2tAt2TRSxqDrit6RTNBLf52AkHADfiHBtSWKI3jIQOWfoQhyZ okLpYUR9Oy580/NoJkEbrEBtjSANfkEa62CY6tCDEAh8V8NLuTBl+mXJsT2mkg/o 7jHkeiZnd8Ppv5HQ07cC9ckzVbNO7JQOriEUizz+CH3tdIffgucgF13wf73dm7Di gBzIJeFM+eZ5BPNlfo4Eiei/HqfbaJ9VdK4Yy+wDJoa1H2kRnTOoVadBYfXzBBXV rf7Z9ljO3Z3yYQbeidGoJhFwhkT7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeivddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeetjedvteffjeeuvdelieeffeehuedthffgvdfhhffh kedvudevgedvjedufefgveenucfkphepjeehrddujedvrddurdeileenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.4] (75-172-1-69.tukw.qwest.net [75.172.1.69]) by mail.messagingengine.com (Postfix) with ESMTPA id B178B108005B; Tue, 1 Dec 2020 09:26:53 -0500 (EST) Subject: Re: error on connecting port 5432 To: Atul Kumar , Postgres General References: From: Adrian Klaver Message-ID: <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com> Date: Tue, 1 Dec 2020 06:26:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/1/20 12:51 AM, Atul Kumar wrote: > Hi, > > When I m creating a test db user using below command using root OS user > sudo -u postgres createuser -p 5432 --pwprompt testuser > > I am getting the attached error of port. > > But my postgres services are running fine on port 5432, I am sharing > the screenshot of that also. In future please include this as text not images. > > So please help me in letting me know why I am getting the above error > when I am connected to the root OS user? You are not connecting as OS root you are connecting as the database user testuser. Does /var/run/postgresql/.s.PGSQL.5432 exits? Do you have more then one instance of Postgres on this machine? If so how where they installed and more importantly where they installed differently? As a test try running the command with addition of -h localhost. > > Note - I am able to create a test db user when I am connected to > postgres using psql command. > > > Regards, > Atul > -- Adrian Klaver adrian.klaver@aklaver.com