Cookie not saved with load balanced request


The cookie is not send with the request with a load balanced Tomcat setup. When i do a post or get it says the user is not logged in. What is going wrong?


package tomcat

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
import java.util.concurrent.ThreadLocalRandom._
import java.util.Calendar
import java.text.SimpleDateFormat

class Starttomcat extends Simulation {

// HTTP Request Configuration
val httpConf = http
.acceptEncodingHeader(“gzip, deflate, br”)
.userAgentHeader(“Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”)
.header(“X-Token”, “no-check”)

// CSV Feeders
val userFeeder = csv(“users.csv”).circular
val spaceFeeder = csv(“spaces.csv”).circular
val homePages = csv(“homePages.csv”).circular
val homePagesId = csv(“homePagesId.csv”).circular

object Auth {

var users = feed(userFeeder)

val getDashboard = exec(
http(“Request 1 — Login tomcat”)


val login = exec(
http(“Request 2 — Authorize tomcat”)
.queryParam(""“os_username”"", “${username}”)
.queryParam(""“os_password”"", “${password}”)


.exec(session => {
val nodeId = session.get(“nodeId”).asOption[String]

val logOut = exec(
http(“Request 15 — Log out of tomcat”)
.queryParam(“logout”, “true”)


object Browse {

var space = feed(spaceFeeder)

val browseDirectory = exec(
http(“Request 3 — Get Space Directory”)


val browseSpace = exec(
http(“Request 4 — Get Space Home”)



val confluenceUsers = scenario(“tomcat Users”)
.repeat(8) {

// Setup Scenario based on tomcat scenario
rampUsers(15) over (120 seconds),

It doesn’t matter what i do, disable follow Redirects or whatever. Everytime I’m getting a 302 error…

Sorry, but there’s no way to investigate your problem with this information you provided.
You’d didn’t even mentioned the version fo gatling you’re using, as instructed when joining this mailing list:!forum/gatling


  • check you’re using the latest release

  • best: provide a way for us to reproduce your issue, typically a fully functional Simulation we can run on our side

  • better than nothing: synthetic (just for the request setting the cookie and the request where the expected cookie is missing) debug logs

Dear Stephane,

Thank you for your response.

Gatling Version: 2.3.1

Everytime after a loggin Gatling failures to execute the get and post request… It looks like the sessionid or cookie is missing and not saved in the next requests…

Please, really, I can’t do anything with at least debug logs. Please lower logging level in logback.xml and provide those.