Kong installation issue on Redhat7

Hi you all there;
I am a fresh starter in using kong. I was wondering if someone have experienced the folling postgres error during installation.

Error: [PostgreSQL error] failed to bootstrap database: ERREUR: syntax error near « CURRENT_USER » (79).

I would appreciate any help.
regards.
Andy

Is this installed from source, docker, centos rpm, or rhel rpm?

What Kong version?

Postgres version and how was it installed?

Hi Colin,

the installation was done from an rpm file.

the kong version is 1.3

postgres version 9.5

installation was per commande line

many thanks in for helping?

Andy

I’m unable to reproduce:

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 (Maipo)

subscription-manager register --username hutchic --auto-attach
Registering to: subscription.rhsm.redhat.com:443/subscription
Password:
The system has been registered with ID: SNIP
The registered system name is: SNIP
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

EL_VERSION=`cat /etc/redhat-release | grep -oE '[0-9]+\.[0-9]+'` && yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-${EL_VERSION%.*}.noarch.rpm
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager

yum install -y wget

wget https://bintray.com/kong/kong-rpm/rpm -O bintray-kong-kong-rpm.repo

export major_version=`grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release | cut -d "." -f1`
sed -i -e 's/baseurl.*/&\/rhel\/'$major_version''/ bintray-kong-kong-rpm.repo
cat bintray-kong-kong-rpm.repo
#bintray--kong-kong-rpm - packages by  from Bintray
[bintray--kong-kong-rpm]
name=bintray--kong-kong-rpm
baseurl=https://kong.bintray.com/kong-rpm/rhel/7
gpgcheck=0
repo_gpgcheck=0
enabled=1

mv bintray-kong-kong-rpm.repo /etc/yum.repos.d/
yum update -y
yum install -y kong-1.3.0

export KONG_DATABASE=postgres KONG_PG_DATABASE=kong KONG_PG_HOST=localhost KONG_PG_PASSWORD=kong KONG_PG_USER=kong
kong migrations bootstrap
Bootstrapping database...
migrating core on database 'kong'...
core migrated up to: 000_base (executed)
core migrated up to: 001_14_to_15 (executed)
core migrated up to: 002_15_to_1 (executed)
core migrated up to: 003_100_to_110 (executed)
core migrated up to: 004_110_to_120 (executed)
core migrated up to: 005_120_to_130 (executed)
migrating hmac-auth on database 'kong'...
hmac-auth migrated up to: 000_base_hmac_auth (executed)
hmac-auth migrated up to: 001_14_to_15 (executed)
migrating oauth2 on database 'kong'...
oauth2 migrated up to: 000_base_oauth2 (executed)
oauth2 migrated up to: 001_14_to_15 (executed)
oauth2 migrated up to: 002_15_to_10 (executed)
migrating jwt on database 'kong'...
jwt migrated up to: 000_base_jwt (executed)
jwt migrated up to: 001_14_to_15 (executed)
migrating basic-auth on database 'kong'...
basic-auth migrated up to: 000_base_basic_auth (executed)
basic-auth migrated up to: 001_14_to_15 (executed)
migrating key-auth on database 'kong'...
key-auth migrated up to: 000_base_key_auth (executed)
key-auth migrated up to: 001_14_to_15 (executed)
migrating rate-limiting on database 'kong'...
rate-limiting migrated up to: 000_base_rate_limiting (executed)
rate-limiting migrated up to: 001_14_to_15 (executed)
rate-limiting migrated up to: 002_15_to_10 (executed)
rate-limiting migrated up to: 003_10_to_112 (executed)
migrating acl on database 'kong'...
acl migrated up to: 000_base_acl (executed)
acl migrated up to: 001_14_to_15 (executed)
migrating response-ratelimiting on database 'kong'...
response-ratelimiting migrated up to: 000_base_response_rate_limiting (executed)
response-ratelimiting migrated up to: 001_14_to_15 (executed)
response-ratelimiting migrated up to: 002_15_to_10 (executed)
migrating session on database 'kong'...
session migrated up to: 000_base_session (executed)
27 migrations processed
27 executed
Database is up-to-date

kong up

kong health
nginx.......running

Kong is healthy at /usr/local/kong

curl -I localhost:8000
HTTP/1.1 404 Not Found
Date: Thu, 17 Oct 2019 15:03:57 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Content-Length: 48
Server: kong/1.3.0

Double check the kong postgres username / password

Hello colin;

this is the error I am getting

afriland@afbsrv ~] kong [afriland@afbsrv ~] export KONG_DATABASE=postgres
KONG_PG_DATABASE=kong KONG_PG_HOST=localhost KONG_PG_PASSWORD=kong
KONG_PG_USER=kong
[afriland@afbsrv ~]$ kong migrations bootstrap
Bootstrapping database…
Error: [PostgreSQL error] failed to bootstrap database: ERREUR:
erreur de syntaxe sur ou près de « CURRENT_USER » (79)

    Run with --v (verbose) or --vv (debug) for more details
  [afriland@afbsrv ~]$

is there any I am missing?

  the kong database is up running and the konguser with password

kong is available

Andy

What’s the locale of the system you’re installing this into?

Is there anyway to provide a start to end sequence of steps you followed similar to what I provided / wasn’t able to reproduce.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ