Error while installing KONG on aws ec2

Hello Guys,

Kong version: 2.0.3
Database: Postgres (Remote DB RDS instance)

I am new to kong and trying to install & run kong on amazon ec2 but while running kong migrations:
kong migrations bootstrap -c path_to_config
Error: /usr/local/share/lua/5.1/kong/db/migrations/state.lua:86: cannot open /usr/local/share/lua/5.1/kong/db/migrations/operations/init.lua: No such file or directory

Below logs :

2021/02/22 08:56:20 [debug] trusted_ips = {}

2021/02/22 08:56:20 [debug] upstream_keepalive = 60

2021/02/22 08:56:20 [verbose] prefix in use: /usr/local/kong

2021/02/22 08:56:20 [debug] sending signal to pid at: /usr/local/kong/pids/nginx.pid

2021/02/22 08:56:20 [debug] kill -0 `cat /usr/local/kong/pids/nginx.pid` >/dev/null 2>&1

2021/02/22 08:56:20 [debug] loading subsystems migrations...

Error:

/usr/local/share/lua/5.1/kong/db/migrations/state.lua:86: cannot open /usr/local/share/lua/5.1/kong/db/migrations/operations/init.lua: No such file or directory

stack traceback:

[C]: in function 'assert'

/usr/local/share/lua/5.1/kong/db/migrations/state.lua:86: in function 'load_subsystems'

/usr/local/share/lua/5.1/kong/db/migrations/state.lua:200: in function 'load'

/usr/local/share/lua/5.1/kong/db/init.lua:388: in function 'schema_state'

/usr/local/share/lua/5.1/kong/cmd/start.lua:33: in function 'cmd_exec'

/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>

[C]: in function 'xpcall'

/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>

/usr/local/bin/kong:9: in function 'file_gen'

init_worker_by_lua:47: in function <init_worker_by_lua:45>

[C]: in function 'xpcall'

init_worker_by_lua:54: in function <init_worker_by_lua:52>

Hello,

How did you install Kong? It seems that Kong was not installed properly. It is recommended to use the pre-built package when installing Kong to avoid common path issues.

Also, I would recommend to install the latest Kong release, which at this point is 2.3.

1 Like

Thanks, @datong.sun.

Fixed now I got the issue. It’s because the OS of ec2 was Amazon Linux 2 but amazonlinux2 supports kong >= 2.1.4 and I was installing 2.0.3.

Thanks,
Ankit Pandey


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ