Solvedkong how to let kong start automatically

Following is my /etc/rc.d/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/usr/local/bin/kong start > /home/ec2-user/log

And the kong doesn't start, following is /home/ec2-user/log

[ec2-user@ip-172-16-1-127 ~]$ cat log
ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
[ec2-user@ip-172-16-1-127 ~]$ kong health
serf........not running
nginx.......not running

Error: Kong is not running at /usr/local/kong

  Run with --v (verbose) or --vv (debug) for more details
[ec2-user@ip-172-16-1-127 ~]$ kong health -v
2017/04/30 05:37:03 [verbose] Kong: 0.10.1
2017/04/30 05:37:03 [verbose] reading config file at /etc/kong/kong.conf
2017/04/30 05:37:03 [verbose] prefix in use: /usr/local/kong
2017/04/30 05:37:03 [verbose] reading config file at /usr/local/kong/.kong_env
2017/04/30 05:37:03 [verbose] prefix in use: /usr/local/kong
2017/04/30 05:37:03 [info] serf........not running
2017/04/30 05:37:03 [info] nginx.......not running
2017/04/30 05:37:03 [info] 
Error: 
/usr/local/share/lua/5.1/kong/cmd/health.lua:38: Kong is not running at /usr/local/kong
stack traceback:
	[C]: in function 'assert'
	/usr/local/share/lua/5.1/kong/cmd/health.lua:38: 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:5: in function 'file_gen'
	init_worker_by_lua:38: in function <init_worker_by_lua:36>
	[C]: in function 'pcall'
	init_worker_by_lua:45: in function <init_worker_by_lua:43>

What does following error mean and how to enable auto start? thx
Error:
/usr/local/share/lua/5.1/kong/cmd/health.lua:38: Kong is not running at /usr/local/kong

15 Answers

✔️Accepted Answer

you can use systemd for Control kong service.
First create kong.service file :

> # vi /usr/lib/systemd/system/kong.service

and then put this lines in file :

[Unit]
Description= kong service
After=syslog.target network.target


[Service]
User=root
Group=root
Type=forking
ExecStart=/usr/local/bin/kong start
ExecReload=/usr/local/bin/kong reload
ExecStop=/usr/local/bin/kong stop

[Install]
WantedBy=multi-user.target

now you can Control kong by systemd :

# systemctl start kong
# systemctl stop kong
# systemctl enable kong

Related Issues:

22
kong how to let kong start automatically
you can use systemd for Control kong service First create kong.service file : and then put this line...
4
kong request-transformer plugin fails if multipart/form-data contains file
@arvileino that's really valuable Summary When request-transformer plugin enabled multipart/form-dat...
373
Zappa bad magic number in 'application': b'\x03\xf3\r\n': ImportError
I was able to fix this too by doing find -name \*.pyc -delete Mine definitely wasn't caused by PY2 -...
94
Zappa AttributeError: 'module' has no attribute 'get_installed_distributions'
You probably have a newer pip they made changes to their public api top level functions recently Try...
59
aws sam cli Error when installing python version on MACOS
Try with --user flag? Description: I got an error when trying to install the new version on MacOS St...
27
aws sam cli AttributeError in arn_generator.py
I am a new user following the hello world tutorial linked from the README and hit this issue I don't...
26
aws sam cli fork/exec /var/task/main: permission denied
Not sure if this is the case here I successfully deployed a golang lambda api service using sam pack...
24
aws sam cli AWS::Serverless::SimpleTable not Created in DynamoDB Local
@PaulMaddox wrote: Sorry for the confusion SAM Local currently only does anything with AWS::Serverle...
23
aws sam cli sam build fails when required to install some 3rd party libraries in requirements.txt
For those that don't want to run the build inside a container: pip install wheel fixed it for me wit...
19
serverless express [Question] Internal server error when request method OPTIONS
With the help from staff on AWS forums I've resolved it by adding: which now returns a correct 200 r...
16
aws sam cli sam init errors with "No module named functools_lru_cache"
I had the same problem today Resolved be uninstalling and installing backports.functools_lru_cache ...
15
aws sam cli Local API Gateway responds with Internal Server error
Your timeout looks 3s try to increase in your template. Hi ...
14
spring cloud gateway Spring-cloud-gateway application not starting up.
Gateway is not compatible with org.springframework.boot:spring-boot-starter-web ...
14
spring cloud gateway io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record:
You usually see this when you have a http vs https mismatch I encountered this problem when my ssl r...
14
serverless express Async handler doesn't work on node 8.10
PR for this here #173 Note that I plan on improving the interface in a future breaking change (aws-s...
13
Zappa Error loading psycopg2 module on Python 3.6 (when on Lambda)
I solved the issue by installing psycopg2-binary Context Shiny new Zappa 0.41 and Python 3.6 Django=...
13
emissary Dev Portal attempts to find docs for every mapping by default
+1 for this ticket I would also like to disable this feature as it is generating large numbers of lo...
13
spring cloud gateway Cors Pre Flight Request
To version pre to 2.1.3.RELEASE this works for me: Spring Cloud Version: Greenwich.RELEASE To make m...
12
serverless next.js Started getting the Error: Cannot find module '@sls-next/next-aws-cloudfront'
Hi folks please pin the version number in your serverless.yml like it states in the README For examp...
12
serverless express Can't get the API Gateway event object
In case any other lost souls who are encountering Missing x-apigateway-event or x-apigateway-context...
11
spring cloud gateway Doubled CORS headers after upgrade to Greenwich
This works for me No need to add any bean. Some of the legacy back ends behind our gateway have thei...
10
spring cloud gateway Preflight Request
@hnxuruochen Just did a workaroundd below to set RoutePredicateHandlerMapping CORS configuration ...
9
aws sam cli sam local: --env-vars parameter does not work with "start-api" subcommand
If it helps anyone I found out that by setting empty environment variables in the template.yml ...
7
serverless next.js Using webpack 5 causes 503
Same for 10.2.3 Using webpack 5 returns the following from Cloudfront: Using versions: ...
6
serverless next.js Error: Source and destination must not be the same. When using useServerlessTraceTarget
I was also facing the same issue (getting Error: Source and destination must not be the same) and sp...
4
spring cloud gateway How to modify request / response body?
I didn't get how to change the response body I have a json in the body and I want to add a property ...
4
Zappa Error when deploying AWS Lambda with Zappa package
I seems that https://pypi.org/project/troposphere/ causes the problem: release 3.0.0 does not instal...
3
aws sam cli Conditionals, Refs, etc. in template yaml don't appear to be evaluated
Should this caveat be mentioned in the documentation? It took a lot of searching to hunt down this c...
3
serverless next.js 503 when using image optimization
It should be fixed now in@sls-next/serverless-component@1.19.0-alpha.19 after also include 7256ab9 W...
35
istio Envoy proxy is NOT ready: config not received from Pilot (is Pilot running?)
I have the same problem (This is used to report product bugs ...
27
istio how to configure envoyfilter to support ratelimit in istio 1.5.0?
Any plans to support this natively in istio? because of the mixer policy was deprecated in Istio 1.5...
25
istio Better support for sidecar containers in batch jobs
Sidecar containers do not play well with k8s jobs The job will keep running so long as the sidecar p...
21
istio Istio give x-forwarded-proto=http to upstream server when using SSL termination
OK came across this issue #12549 so it's out as part of v1.3.x i have tested it with istio v1.4.0 an...
20
istio Connection Failure to a MySQL Service
Hi We are also facing this issue and found that it is related to the default MeshPolicy ...
19
istio EKS - creating networking configs time out
the following helm line (based upon Zack's Nightly article) fixed this for me: I am attempting to se...
19
istio To support Single Sign-On scenario, Istio Origin Authentication should accept a JWT Token sent in a cookie
Hey guys We ended up doing something similar to what @yskopets is doing so I'll share the code here ...
15
istio Support multiple virtual services with same host
I know the spec currently has A host name can be defined by only one VirtualService however ...
15
istio Secure communication between Prometheus and Istio components
I just wanted to follow-up although that PR did enable using built-in Prometheus with mTLS (thanks f...
14
istio examples on gRPC-JSON transcode needed
@begoat There are two ways: Use k8s configmap Create configmap from descriptor set Add annotations t...
14
istio Helm delete does not clean the custom resource definitions
That's right Helm: Istio: 1.0.0 Kubectl: Following a deletion of Istio 1.0.0 using helm delete --pur...
13
istio gRPC-web
I found that these settings work @arbarlow commented on Mon Oct 30 2017 As discussed in istio/old_pi...
13
istio Connection problems with large deployments (1200+ pods)
We have experienced a similar issue on our staging environment recently with Istio 1.0.1 ...
12
istio Istio Ingress TLS key management use ACM
@naveeng68 you need to set the tls.httpsRedirect on your gateway to true as used here: According to ...
9
istio Allow egress requests to variable IP CIDR ranges
That is unfortunately not good enough Currently outbound requests are blocked by default ...
9
istio Deploy ingressgateway as daemonset
@anthonyvk You can use: istiooperator.yaml I'm in the process of setting up a bunch of microservices...
8
istio istioctl install fails on windows
Finally got my hands on a windows machine Bug description The istioctl manifest apply --set profile=...
5
istio istioctl get authentication problem with heptio aws authenticator
I don't have Heptio or any Kubernetes client config that requires the Exec Provider ...
5
istio Can not create gateway
https://istio.io/docs/setup/kubernetes/helm-install/#option-1-install-with-helm-via-helm-template ...
4
istio Envoy filter not allowing headers in Istio?
I fixed this issue which I opened using below yaml file with envoy.lua filter I am using Istio 1.0.3...