Skip to content

Unable to Run Crank in my local (Mac) #766

@vishwakamala

Description

@vishwakamala

Hi @sebastienros

thanks for this benchmarking tool that you built. I am trying to bench mark a .Net core Webapi Project based on the documentation i have tried to set benchmarking.yml I was stuck with this issue.

The specified endpoint url 'http://localhost:5010' for 'application' is invalid or not responsive: "An error occurred while sending the request."

If i try to solve this issue by making a default route for GET this is passing but it gets failed in next step. It is trying to get the JobStatus and it gets 404.

[01:23:59.080] Running session 'f6e9283f7aca4ef6827d3d79e53a1e59' with description ''
Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Microsoft.Crank.Controller.JobConnection.GetQueueAsync() in /_/src/Microsoft.Crank.Controller/JobConnection.cs:line 1323
   at Microsoft.Crank.Controller.Program.<>c__DisplayClass61_1.<<Run>b__6>d.MoveNext() in /_/src/Microsoft.Crank.Controller/Program.cs:line 849
--- End of stack trace from previous location ---
   at Microsoft.Crank.Controller.Program.Run(Configuration configuration, String[] dependencies, String session, Int32 iterations, ExcludeOptions exclude, IEnumerable`1 scripts) in /_/src/Microsoft.Crank.Controller/Program.cs:line 845
   at Microsoft.Crank.Controller.Program.<>c__DisplayClass60_0.<<Main>b__1>d.MoveNext() in /_/src/Microsoft.Crank.Controller/Program.cs:line 705
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.Crank.Controller.Program.Main(String[] args)`

BenchMark.yml

imports:
  - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml

jobs:
  server:
    sources:
     entity:
        localFolder: ./RulesPOC/RulesPOC
    project: RulesPOC.csproj
    readyStateText: Application started.
  bombardier:
    source:
      repository: https://github.com/dotnet/crank.git
      branchOrCommit: main
      project: src/Microsoft.Crank.Jobs.Bombardier/Microsoft.Crank.Jobs.Bombardier.csproj
      sourceKey: bombardier
      noBuild: true
      readyStateText: Bombardier Client
      waitForExit: true
      variables:
        verb: POST
        path: "https://localhost:5010/BatchPoc"
scenarios:
  hello:
    application:
      job: server
    load:
      job: bombardier
     

profiles:
  local:
    variables:
      serverAddress: localhost
    jobs:
      application:
        endpoints:
          - https://localhost:5010/
      load:
        endpoints:
          - https://localhost:5010/`

I tried your example of the hello sample still the same.

Crank command i used - crank --config benchmark.yml --scenario hello --profile local

Please let me know what i am doing wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions