Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues running http bidder #292

Closed
renderit opened this issue Jun 26, 2016 · 3 comments
Closed

Issues running http bidder #292

renderit opened this issue Jun 26, 2016 · 3 comments

Comments

@renderit
Copy link

renderit commented Jun 26, 2016

Hi, I am trying to run the python http bidder as described in the wiki!
My http-config.json is exactly as in the examples folder..
My sample.http_bidder_config.json:

{
    "type": "http",
    "router": {
        "host": "http://localhost:7654",
        "path": "/"
    },
    "adserver": {
          "host": "http://localhost",
          "winPort": 7653,
          "eventPort": 7652
    }
}

When I run python http_bid_agent_ex.py inside the py-bidder folder: I get:

ACS reg'ing: {"bidderInterface": "iface.http", "bidProbability": 0.5, "account": ["hello", "world"], "externalId": 123, "creatives": [{"width": 300, "id": 1, "height": 250}, {"width": 300, "id": 2, "height": 250}]}
Budgeting: {"USD/1M": 500000}
WARNING:root:Connect error on fd 13: ECONNREFUSED
Request Error!
Request response OK


Budgeting: {"USD/1M": 500000}
WARNING:root:Connect error on fd 12: ECONNREFUSED
Request Error!

My sample.http_bidder-config.json looks like:

......
               {
                    "name": "router",
                    "root": ".",
                    "path": "build/x86_64/bin/router_runner",
                    "arg": [
                        "-B", "rtbkit/sample.bootstrap.json",
                        "--bidder", "rtbkit/sample.http_bidder-config.json"
                    ],
                    "log": true
                },
                {
                    "name": "post-auction",
                    "root": ".",
                    "path": "build/x86_64/bin/post_auction_runner",
                    "arg": [
                        "-B", "rtbkit/sample.bootstrap.json",
                        "--win-seconds", "3600.0",
                        "--auction-seconds", "900.0",
                        "--bidder", "rtbkit/sample.http_bidder-config.json"
                    ],
                    "log": true
                },
......

Firstly, do I have to move any file(s) when running?
Does order matter? Can I python http_bid_agent_ex.py before running ./lauch.sh

All I see in the output is(even after budgeting):

rtbAgentConfiguration:
    agentConfigurationService OK  2016-06-26 04:59:12  Alive
rtbBanker:
    PostAuctionLoop.slaveBanker OK  2016-06-26 04:59:12  Sync with MasterBanker: OK
    router.slaveBanker   OK  2016-06-26 04:59:12  Sync with MasterBanker: OK
rtbDataLogger:
    data_logger          OK  2016-06-26 04:59:12  Alive
rtbPostAuctionService:
    PostAuctionLoop      ERR 2016-06-26 04:59:12  WinLoss pipe: ERROR, CampaignEvent pipe: ERROR, Banker: OK
rtbRequestRouter:
    router               OK  2016-06-26 04:59:12  Connection to PAL: OK, Banker: OK
@mikeburkat
Copy link
Contributor

seems like a problem between the banker and the bidder. can you check that the banker address is set to the right place.
this: https://github.com/rtbkit/rtbkit/blob/master/rtbkit/examples/http_config.json#L25-L27
and this: https://github.com/rtbkit/rtbkit/blob/master/rtbkit/sample.bootstrap.json#L47
should be the same ip and port.
I'll go ahead and make a fix so that nobody else encounters this issue.
All you need to do is set the port to 9985

or just update your master to: 427109f

@renderit
Copy link
Author

renderit commented Jun 27, 2016

@mikeburkat : My sample.launch.json looks like:

          {
                    "name": "banker",
                    "root": ".",
                    "path": "build/x86_64/bin/banker_service_runner",
                    "arg": [
                        "-B", "rtbkit/sample.bootstrap.json", "-r", "localhost:6379"
                    ],
                    "log": true
                },
                {
                    "name": "augmentor",
                    "root": ".",
                    "path": "build/x86_64/bin/augmentor_ex_runner",
                    "arg": [
                        "-B", "rtbkit/sample.bootstrap.json"
                    ],
                    "log": true
                },
                {
                    "name": "router",
                    "root": ".",
                    "path": "build/x86_64/bin/router_runner",
                    "arg": [
                        "-B", "rtbkit/sample.bootstrap.json",
                        "--bidder", "rtbkit/sample.http_bidder-config.json"
                    ],
                    "log": true
                },
                {
                    "name": "post-auction",
                    "root": ".",
                    "path": "build/x86_64/bin/post_auction_runner",
                    "arg": [
                        "-B", "rtbkit/sample.bootstrap.json",
                        "--win-seconds", "3600.0",
                        "--auction-seconds", "900.0",
                        "--bidder", "rtbkit/sample.http_bidder-config.json"
......

My http-config inside the examples folder looks like:

{
  "ACS": {
    "Ip": "127.0.0.1",
    "Port": 9986,
    "Config": {
      "account": ["hello", "world0"],
      "externalId": 123,
      "bidderInterface": "iface.http",
      "bidProbability": 0.5,
      "creatives": [
        {
          "id": 1,
          "width": 300,
          "height": 250
        },
        {
          "id": 2,
          "width": 300,
          "height": 250
        }
      ]
    }
  },

  "Banker": {
    "Ip": "127.0.0.1",
    "Port": 9985,
    "Budget": 500000,
    "Period": 300000
  },

  "Bidder": {
    "Port": 7654,
    "Win": 7653,
    "Event": 7652
  }
}

Lastly, my sample.bootstrap.json:

....
  "portRanges": {
        "logs":                   [16000, 17000],
        "router":                 [17000, 18000],
        "augmentors":             [18000, 19000],
        "configuration":          [19000, 20000],
        "postAuctionLoop":        [20000, 21000],
        "postAuctionLoopAgents":  [21000, 22000],

        "banker.zmq":             [22000, 23000],
        "banker.http":              9985,

        "agentConfiguration.zmq": [23000, 24000],
        "agentConfiguration.http":  9986,

        "monitor.zmq":            [24000, 25000],
        "monitor.http":             9987,

        "adServer.logger":        [25000, 26000]
    }
}

I feel problem might in the mock exchange? When I do:

$ ./build/x86_64/bin/mock_exchange_runner
FD limit too low: 1024/4096 smaller than recommended 65535
FD limit raised to: 4096
starting worker 0
sending to localhost:12339

I do tcpdump port 12339 or sudo tcpdump -i lo , I can see:

$ sudo tcpdump -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
03:35:38.914743 IP localhost.39314 > localhost.12339: Flags [S], seq 3669368984, win 43690, options [mss 65495,sackOK,TS val 42238385 ecr 0,nop,wscale 7], length 0
03:35:38.914758 IP localhost.12339 > localhost.39314: Flags [R.], seq 0, ack 3669368985, win 0, length 0
03:35:39.015024 IP localhost.39316 > localhost.12339: Flags [S], seq 3669368987, win 43690, options [mss 65495,sackOK,TS val 42238410 ecr 0,nop,wscale 7], length 0
03:35:39.015033 IP localhost.12339 > localhost.39316: Flags [R.], seq 0, ack 3669368988, win 0, length 0
03:35:39.115278 IP localhost.39317 > localhost.12339: Flags [S], seq 3669368990, win 43690, options [mss 65495,sackOK,TS val 42238435 ecr 0,nop,wscale 7], length 0
03:35:39.115290 IP localhost.12339 > localhost.39317: Flags [R.], seq 0, ack 3669368991, win 0, length 0

Still getting:

rtbAgentConfiguration:
    agentConfigurationService OK  2016-06-28 01:19:11  Alive
rtbBanker:
    PostAuctionLoop.slaveBanker OK  2016-06-28 01:19:11  Sync with MasterBanker: OK
    router.slaveBanker   OK  2016-06-28 01:19:11  Sync with MasterBanker: OK
rtbDataLogger:
    data_logger          OK  2016-06-28 01:19:12  Alive
rtbPostAuctionService:
    PostAuctionLoop      ERR 2016-06-28 01:19:11  WinLoss pipe: ERROR, CampaignEvent pipe: ERROR, Banker: OK
rtbRequestRouter:
    router               OK  2016-06-28 01:19:11  Connection to PAL: OK, Banker: OK

@mikeburkat
Copy link
Contributor

Issue is fixed on latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants