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 1kk6hV-0007Eu-SR for pgsql-general@arkaria.postgresql.org; Tue, 01 Dec 2020 14:32:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kk6hU-0000YE-J1 for pgsql-general@arkaria.postgresql.org; Tue, 01 Dec 2020 14:32:16 +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 1kk6hU-0000WR-BM for pgsql-general@lists.postgresql.org; Tue, 01 Dec 2020 14:32:16 +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 1kk6hS-00078G-4f for pgsql-general@postgresql.org; Tue, 01 Dec 2020 14:32:15 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 596595C0112; Tue, 1 Dec 2020 09:32:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 01 Dec 2020 09:32:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:from:to:references:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=C 2AINlITh5RgiCcjFP6jE2KGPz1PDk6fb/rdYvJ+Z7o=; b=UGjhRtZBejODEE/uK WUBWCvROZ7pLa8UFHcKFO9DPjG/ZWRhE3/gAcUsR9uaaIdDWTzZCXfB+RrTfs35N TliAUaI7vvS170QtgJCP8JZ3VTPKh40WkAGYoPSjaB6IRKYXUDXSbN11zaLa29pW euy2hJf7+uo3Wr5qvytXoyRYtYbJDDp7YUj1HIOw+lY78KjrQn+OSzVf2nXPT6nc 6adoq9qBFe7ALnwiiDEJ//YiR3e23qZRfbn/9am3CDbqjupIcQxA9mh/JxqReMTn +buryS9MzrueWcg9QfoQwjnUgtX23fNlzMhSiciSGyv2tUA2IGvJ+x9HBFrg98p/ uH+DQ== 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=C2AINlITh5RgiCcjFP6jE2KGPz1PDk6fb/rdYvJ+Z 7o=; b=hSFt9GV69eI2QF8T7sc2MhtmeyS87UjFqZSe7UnT+ekGHEjzgikii8w6B xlkvUMY5BHMFi1ysf0dccb1l8l9mEERVoEaWXBvgZQkDvylopFYDeGfTBQCaAqBU b5hYx7Nd5d8F/gyhkJOPkaZL0f6c7K8OYGQEqFUW0go2ze5Ot9KNyATT5pJBljeu 2zdiwnBqEQ821uYXKE9kQbFhoM04wKlJ3aiLSXPTvn/BaNorxsetm/Twzr7bKi+E hC1VDWc0TF8nItRPBRQ6ppL44iWIz4rn1Dijfr6NCM0D6vembWEvjFa3PgvzaIas YPzQxYm/0uE1kGpW9PXwG9XFYM65g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeivddgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffhvfhfkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpefhleekveehgeffgfekjeffhfdujeeukeeivefhudeg keelgfefgeevheefieeiteenucfkphepjeehrddujedvrddurdeileenucevlhhushhtvg 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 7866B108005F; Tue, 1 Dec 2020 09:32:12 -0500 (EST) Subject: Re: error on connecting port 5432 From: Adrian Klaver To: Atul Kumar , Postgres General References: <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com> Message-ID: Date: Tue, 1 Dec 2020 06:32:11 -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: <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/1/20 6:26 AM, Adrian Klaver wrote: > 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? Does /var/run/postgresql/.s.PGSQL.5432 exist? > > 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