Hey guys! I'm developing a webapp and its working ...
# server
v
Hey guys! I'm developing a webapp and its working in local on many computers, but when i deploy on remote, the request are pending and not change it. The remote server is TomCat and it's behind a reverse proxy. Anyone know what could be the problem?
d
Hard to say with no furhter information! Did you check the server logs?
v
Yes! and has no logs written. It's very strange because the auth is working on server, but the responses are pending all time. is it necessary any special configuration due to the reverse proxy?
d
I 'am also not really experienced with setting up a proxy, but I would look there first.
v
I'm debugging and the problem is when execute the call.respond or the call.receive, as if the server was suspended when have to do the petition. It could be due to the suspend methods, but it's not working either on a function without suspend. I'm using GSon as a content negotiation.
d
So it´s on every request (Endpoint)? The pending status
v
Yes, for example, in a simple:
Copy code
routing{
    get("/foo"){
        log.debug("first")
        call.respondText("response")
        log.debug("end")
    }
}
I can see in the logs only "first" written, and the client browser shows the request with a pending status. I think that Ktor suspend the functions, but i don know why. I have deployed some .war of other apps in other languages in the same TomCat, but they should not interfere with ktor.
d
Well as I know the respond functions are always suspend functions. Have you tried using netty or jetty and try if the also show the not ending pending status!
v
I tried in local with netty, jetty, and tomcat too, and it's working. But it does not work in the remote tomcat, which is behind a reverse proxy with other apps, being where I need to deploy it.