Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1isQeg-00011W-1a for pgsql-general@arkaria.postgresql.org; Fri, 17 Jan 2020 12:23:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1isQec-0006wt-Ib for pgsql-general@arkaria.postgresql.org; Fri, 17 Jan 2020 12:23:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1isQec-0006wl-6U for pgsql-general@lists.postgresql.org; Fri, 17 Jan 2020 12:23:10 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1isQeX-0006i7-By for pgsql-general@lists.postgresql.org; Fri, 17 Jan 2020 12:23:07 +0000 Received: by mail-oi1-x243.google.com with SMTP id z64so22028134oia.4 for ; Fri, 17 Jan 2020 04:23:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=Bs+g7zgeig0E+xu6ya5+xiHl2u1P2w6E1jrfK+TvfpE=; b=fTPVl3ivAiVAm3qVzxqecPNzN5/e0KbFYFDvQLcIk2kPwVbcgJr7ijQPwmOS9IlkbA nZHiI1LANN9VljC6ezmw6lqsgwngB3R3vjsjyvC5BEDJgn2ktkUwz8xO9NWRIdRfDL4O fRouWCSyLUfZPjA83+lIA7yP27CT9yvC9ZlQvOek/64rcILoZiJSCbbit59KGKVuXlK0 PeqmFuQOMLiCN2dsf0ThXn+8qA2LUiMvNybN4/jMqHFbAEg/SFE+5x+fYcwVq0LTlqU4 bY6u89TQCAbFRyvq0GuQpuQjmdInAxYSLBjexz5q7PdGMx2uLN+tvCf6qz0N/SU0oL0z p6EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=Bs+g7zgeig0E+xu6ya5+xiHl2u1P2w6E1jrfK+TvfpE=; b=doFDYTdo3wi9Zu/lYug0XhzxqsA9SzyAIci35qyYRu7Yr/PIfMhwqsqK2J58khkuXq 6oAH981/62sjXmufJnY0fRSRU6NykabIjBK1hT9UHA8TRlZtfaHNyMA/nPPNZXo9fvig LLgxNLb/lMXeZFr8hnOVQzIx9alQJcdbaMToag7RmpG85FREFtwx1bmbdgIlYJqpwnjx XlhpQKf3MXI3mzji3i5efbM3xnGkgPetUbKX7ntM4thK3EdSQJxyduBHW87ovlsjYrbi Hcy5bhoIZ3t0TJ91kDiVktEbiS//HOR6HhhIu4ot8Rv6e+sGlCCMru+OwhyJwgeUqDza 0cbA== X-Gm-Message-State: APjAAAU2GOsL6/rL2vIuR38hRjSy4ABB1/z3XiutYbG8TVunesLhxXN/ zlefSTFyfXknb3a41ttQZi49vZZIT+0= X-Google-Smtp-Source: APXvYqxFgiN1M24gByECcDxRi90yPRdmEWSEH3EAUPOOPmfsu2exflc19DvEl0CNzqA63aZ/xfr6Ew== X-Received: by 2002:aca:f5c1:: with SMTP id t184mr3256866oih.23.1579263782613; Fri, 17 Jan 2020 04:23:02 -0800 (PST) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id s145sm7740926oie.44.2020.01.17.04.23.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Jan 2020 04:23:02 -0800 (PST) Subject: Re: postgresql commands(psql,createdb,dropdb) are not working from shell script To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Fri, 17 Jan 2020 06:23:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------8212A28D48678418A54AF121" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------8212A28D48678418A54AF121 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Does the Jenkins' $PATH variable have the Postgres binaries' location? On 1/17/20 2:47 AM, ramesh penumalli wrote: > Dear Team, > > I am using postgresql 9.2.12 version and I am facing  an issue while > running the executing the commands createdb,dropdb,psql commands in the > shell script which is running from Jenkins to restore prod data into stage > environment. > > Jenkins job is failing with the below output.I have verified the script > and the scrit is fine and it seems to be an issue with the configuration > of postgresql  and not sure where to make the changes. > > line 48: dropdb: command not found > line 50: createdb: command not found > line 52: psql: command not found > Kindly guide me to rectify the issue. > Thanks and Regards, > Ramesh -- Angular momentum makes the world go 'round. --------------8212A28D48678418A54AF121 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Does the Jenkins' $PATH variable have the Postgres binaries' location?

On 1/17/20 2:47 AM, ramesh penumalli wrote:
Dear Team,

I am using postgresql 9.2.12 version and I am facing  an issue while running the executing the commands createdb,dropdb,psql commands in the shell script which is running from Jenkins to restore prod data into stage environment.

Jenkins job is failing with the below output.I have verified the script and the scrit is fine and it seems to be an issue with the configuration of postgresql  and not sure where to make the changes.

line 48: dropdb: command not found
line 50: createdb: command not found
line 52: psql: command not found
Kindly guide me to rectify the issue.
Thanks and Regards,
Ramesh

--
Angular momentum makes the world go 'round.
--------------8212A28D48678418A54AF121--