mattermost / mattermost-load-test

[DEPRECATED] replaced by https://github.com/mattermost/mattermost-load-test-ng
Apache License 2.0
58 stars 43 forks source link

"Failed to find user by email" error #161

Closed sourabkumarkeshri closed 5 years ago

sourabkumarkeshri commented 5 years ago

Hi all,

I am trying to run load-test using manual loadtesting against an existing cluster strategy.

When I run the loadtest all command,I get the following errror(repeated several times with different mail ids) :

{"level":"error","ts":1564551977.214884,"caller":"loadtest/client.go:48","msg":"Failed to find user by email","email":"success+user499@simulator.amazonses.com","error":": Unable to find the user., email=success+user499@simulator.amazonses.com, sql: no rows in result set"}

Please provide any possible solutions.

jasonblais commented 5 years ago

@reflog would you have thoughts on why this might occur?

reflog commented 5 years ago

@sourabkumarkeshri - any chance you post the full log? It's hard to investigate based on just one line

sourabkumarkeshri commented 5 years ago

@reflog - Here is the full log.And the error email is repeated several times(say about 500) and then the final message is displayed.

`sourabkumarkeshri-C02YQAS7LVCG:mattermost-load-test sourabkumarkeshri$ loadtest all {"level":"info","ts":1565009526.252393,"caller":"loadtest/loadtest.go:111","msg":"Running test","test":"all"} {"level":"info","ts":1565009529.677979,"caller":"loadtest/run.go:57","msg":"Registered loadtest instance","instance_id":"ahe7youzppfxdq7pco46o51j6r","entity_start_num":0,"seed":1565009529000} {"level":"info","ts":1565009529.678061,"caller":"loadtest/run.go:63","msg":"Settings","tag":"report","configuration":{"LoadtestEnviromentConfig":{"NumTeams":1,"NumChannelsPerTeam":300,"NumPrivateChannelsPerTeam":100,"NumDirectMessageChannels":2000,"NumGroupMessageChannels":50,"NumUsers":1000,"NumTeamSchemes":1,"NumChannelSchemes":1,"NumEmoji":2000,"NumPlugins":1,"PercentHighVolumeChannels":0.2,"PercentMidVolumeChannels":0.5,"PercentLowVolumeChannels":0.3,"PercentUsersHighVolumeChannel":0.1,"PercentUsersMidVolumeChannel":0.003,"PercentUsersLowVolumeChannel":0.0002,"PercentHighVolumeTeams":0.2,"PercentMidVolumeTeams":0.5,"PercentLowVolumeTeams":0.3,"PercentUsersHighVolumeTeams":0.9,"PercentUsersMidVolumeTeams":0.5,"PercentUsersLowVolumeTeams":0.1,"HighVolumeTeamSelectionWeight":3,"MidVolumeTeamSelectionWeight":2,"LowVolumeTeamSelectionWeight":1,"HighVolumeChannelSelectionWeight":1,"MidVolumeChannelSelectionWeight":3,"LowVolumeChannelSelectionWeight":1,"NumPosts":20000000,"PostTimeRange":2600000,"ReplyChance":0.3,"PercentCustomSchemeTeams":0.2,"PercentCustomSchemeChannels":0.1},"ConnectionConfiguration":{"ServerURL":"http://localhost:8065","WebsocketURL":"ws://localhost:8065","PProfURL":"http://localhost:8067/debug/pprof","DriverName":"mysql","DataSource":"mmuser:mostest@tcp(localhost:3306)/mattermost_test?charset=utf8mb4,utf8&readTimeout=20s&writeTimeout=20s&timeout=20s","DBEndpoint":"","LocalCommands":true,"SSHHostnamePort":"127.0.0.1:22","SSHUsername":"mmuser","SSHPassword":"null","SSHKey":"Users/sourabkumarkeshri/gocode/src/github.com/mattermost/mattermost-server/dist/mattermost-load-test/.ssh/id_rsa","MattermostInstallDir":"/Users/sourabkumarkeshri/gocode/src/github.com/mattermost/mattermost-server/dist/mattermost-load-test","ConfigFileLoc":"Users/sourabkumarkeshri/gocode/src/github.com/mattermost/mattermost-server/config/config.json","AdminEmail":"sourab@sourab.com","AdminPassword":"So@12345678","SkipBulkload":true,"MaxIdleConns":100,"MaxIdleConnsPerHost":128,"IdleConnTimeoutMilliseconds":90000},"UserEntitiesConfiguration":{"TestLengthMinutes":20,"NumActiveEntities":500,"ActionRateMilliseconds":240000,"ActionRateMaxVarianceMilliseconds":1500,"EnableRequestTiming":false,"ChannelLinkChance":0.02,"UploadImageChance":0.01,"LinkPreviewChance":0.2,"CustomEmojiChance":0.2,"CustomEmojiReactionChance":0.05,"SystemEmojiReactionChance":0.1,"NeedsProfilesByIdChance":0.22,"NeedsProfilesByUsernameChance":0.38,"NeedsProfileStatusChance":0.8,"DoStatusPolling":true,"RandomizeEntitySelection":false},"ResultsConfiguration":{"PProfDelayMinutes":15,"PProfLength":240},"LogSettings":{"EnableConsole":true,"ConsoleJson":true,"ConsoleLevel":"INFO","EnableFile":true,"FileJson":true,"FileLevel":"INFO","FileLocation":"loadtest.log"}},"instance_id":"ahe7youzppfxdq7pco46o51j6r"} {"level":"info","ts":1565009529.6783879,"caller":"loadtest/run.go:74","msg":"Setting up server."} {"level":"info","ts":1565009529.67842,"caller":"loadtest/setup_server.go:35","msg":"Connecting to local app server"} {"level":"info","ts":1565009529.6787689,"caller":"loadtest/setup_server.go:45","msg":"Testing ability to run commands."} {"level":"info","ts":1565009529.678838,"caller":"loadtest/local_command_runner.go:28","msg":"Running local command: ./bin/mattermost version"} {"level":"error","ts":1565009529.680531,"caller":"loadtest/setup_server.go:47","msg":"Unable to connect issue mattermost commands. Continuing anyway... Got Output: fork/exec ./bin/mattermost: no such file or directory : "} {"level":"info","ts":1565009529.685229,"caller":"loadtest/client.go:85","msg":"Successfully pinged server","server_url":"http://localhost:8065"} {"level":"info","ts":1565009529.765787,"caller":"loadtest/client.go:114","msg":"Successfully logged in","email":"sourab@sourab.com","roles":"system_admin system_user"} {"level":"info","ts":1565009530.769669,"caller":"loadtest/setup_server.go:62","msg":"Checking configuration parameters."} {"level":"info","ts":1565009530.772255,"caller":"loadtest/setup_server.go:246","msg":"EnableOpenServer is true"} {"level":"info","ts":1565009530.772313,"caller":"loadtest/setup_server.go:257","msg":"MaxUsersPerTeam is 50000"} {"level":"info","ts":1565009530.7723389,"caller":"loadtest/setup_server.go:268","msg":"MaxChannelsPerTeam is 50000"} {"level":"info","ts":1565009530.772359,"caller":"loadtest/setup_server.go:279","msg":"EnableIncomingWebhooks is true"} {"level":"info","ts":1565009530.772382,"caller":"loadtest/setup_server.go:281","msg":"Disabling only admin integrations for loadtest. 1/2"} {"level":"info","ts":1565009530.784023,"caller":"loadtest/setup_server.go:312","msg":"Disabling only admin integrations for loadtest. 2/2"} {"level":"info","ts":1565009530.789064,"caller":"loadtest/setup_server.go:344","msg":"PluginSettings.Enable is true"} {"level":"info","ts":1565009530.789106,"caller":"loadtest/setup_server.go:349","msg":"PluginSettings.EnableUploads is true"} {"level":"info","ts":1565009530.7891352,"caller":"loadtest/setup_server.go:68","msg":"Setting up plugins."} {"level":"info","ts":1565009530.789231,"caller":"loadtest/setup_server.go:79","msg":"Checking if plugin is installed: com.mattermost.sample-plugin"} {"level":"info","ts":1565009530.7927208,"caller":"loadtest/setup_server.go:86","msg":"Plugin found, removing: com.mattermost.sample-plugin"} {"level":"info","ts":1565009530.794621,"caller":"loadtest/setup_server.go:94","msg":"Removed plugin: com.mattermost.sample-plugin"} {"level":"info","ts":1565009530.794658,"caller":"loadtest/setup_server.go:100","msg":"Uploading plugin."} {"level":"info","ts":1565009530.852906,"caller":"loadtest/setup_server.go:105","msg":"Enabling plugin."} {"level":"info","ts":1565009530.896698,"caller":"loadtest/setup_server.go:111","msg":"Generating users for loadtest."} {"level":"info","ts":1565009530.925386,"caller":"loadtest/setup_server.go:177","msg":"Clearing caches"} {"level":"info","ts":1565009530.943114,"caller":"loadtest/setup_server.go:190","msg":"Found teams","teams":4} {"level":"info","ts":1565009530.945677,"caller":"loadtest/setup_server.go:207","msg":"Found town-square","team":"haha"} {"level":"info","ts":1565009530.945716,"caller":"loadtest/setup_server.go:213","msg":"Found team channels","team":"haha","channels":2} {"level":"info","ts":1565009530.947923,"caller":"loadtest/setup_server.go:207","msg":"Found town-square","team":"okay"} {"level":"info","ts":1565009530.947965,"caller":"loadtest/setup_server.go:213","msg":"Found team channels","team":"okay","channels":3} {"level":"info","ts":1565009530.95008,"caller":"loadtest/setup_server.go:207","msg":"Found town-square","team":"ok"} {"level":"info","ts":1565009530.9501178,"caller":"loadtest/setup_server.go:213","msg":"Found team channels","team":"ok","channels":2} {"level":"info","ts":1565009530.953275,"caller":"loadtest/setup_server.go:207","msg":"Found town-square","team":"team-2"} {"level":"info","ts":1565009530.953395,"caller":"loadtest/setup_server.go:213","msg":"Found team channels","team":"team-2","channels":4} {"level":"info","ts":1565009530.956019,"caller":"loadtest/client.go:85","msg":"Successfully pinged server","server_url":"http://localhost:8065"} {"level":"info","ts":1565009531.0372639,"caller":"loadtest/client.go:114","msg":"Successfully logged in","email":"sourab@sourab.com","roles":"system_admin system_user"} {"level":"info","ts":1565009532.037778,"caller":"loadtest/run.go:136","msg":"Logging in as users."} {"level":"error","ts":1565009532.0444129,"caller":"loadtest/client.go:48","msg":"Failed to find user by email","email":"success+user225@simulator.amazonses.com","error":": Unable to find the user., email=success+user225@simulator.amazonses.com, sql: no rows in result set"} {"level":"error","ts":1565009532.0489442,"caller":"loadtest/client.go:48","msg":"Failed to find user by email","email":"success+user330@simulator.amazonses.com","error":": Unable to find the user., email=success+user330@simulator.amazonses.com, sql: no rows in result set"} {"level":"error","ts":1565009532.048983,"caller":"loadtest/client.go:48","msg":"Failed to find user by email","email":"success+user150@simulator.amazonses.com","error":": Unable to find the user., email=success+user150@simulator.amazonses.com, sql: no rows in result set"} {"level":"error","ts":1565009532.048961,"caller":"loadtest/client.go:48","msg":"Failed to find user by email","email":"success+user375@simulator.amazonses.com","error":": Unable to find the user., email=success+user375@simulator.amazonses.com, sql: no rows in result set"} {"level":"error","ts":1565009532.04912,"caller":"loadtest/client.go:48","msg":"Failed to find user by email","email":"success+user60@simulator.amazonses.com","error":": Unable to find the user., email=success+user60@simulator.amazonses.com, sql: no rows in result set"}

Error: run test failed: Failed to login as any users Usage: loadtest all [flags]

Flags: -h, --help help for all`

reflog commented 5 years ago

@sourabkumarkeshri - there are several issues here:

{"level":"info","ts":1565009529.678838,"caller":"loadtest/local_command_runner.go:28","msg":"Running local command: ./bin/mattermost version"}
{"level":"error","ts":1565009529.680531,"caller":"loadtest/setup_server.go:47","msg":"Unable to connect issue mattermost commands. Continuing anyway... Got Output: fork/exec ./bin/mattermost: no such file or directory : "}

This means that your mattermost installation cannot be access by loadtest. Usually - ssh issue. I've alose noticed that your SSHKey config param is missing a leading '/' character. That might be it.

sourabkumarkeshri commented 5 years ago

Thanks @reflog . I corrected the SSHKey config param as you said. But the issue still exists with the same error.

reflog commented 5 years ago

Hm. I see that you also have SkipBulkLoad set to true. Any specific reason? Because these users that the loadtest can't find (like "success+user60@simulator.amazonses.com") are being generated by bulk loading