Frequently Asked Questions

Estimated reading time: 2 minutes

In this section we provide answers to the frequent questions you ask us.

Can’t find an answer for your question? Head over our #ktor Kotlin Slack channel, and we will try to help you!

Table of contents:

What is the proper way to pronounce ktor?


Ktor imports are not being resolved. Imports are in red.

Ensure that you are including the ktor artifact. For example, with gradle and Netty engine would be:

dependencies {
    compile "io.ktor:ktor-server-netty:$ktor_version"

Does ktor provide a way to catch ipc signals (e.g. SIGTERM or SIGINT) so server shutdown can be handled gracefully?

If you are running a DevelopmentEngine, it will be handled automatically.

Otherwise you will have to handle it manually. You can use Runtime.getRuntime().addShutdownHook JVM’s facility.

How do I get the client IP behind a proxy?

The property call.request.origin gives connection information about the original caller (the proxy) if the proxy provides proper headers and the feature XForwardedHeadersSupport is installed.

I get the error ‘java.lang.IllegalStateException: No instance for key AttributeKey: Locations’

You get this error if you try to use the locations feature without actually installing it. Check the locations feature: