Closed reoxey closed 7 years ago
Hi reoxey,
Can you please send output from command
ifconfig -a
I need to see how your network interfaces configured on your machine
I also need to see output of this command
python -c 'import socket; print socket.getaddrinfo("0.0.0.0", 11081, 0, 0, socket.IPPROTO_TCP, socket.AI_ADDRCONFIG)'
the http UI is only for campaign budget management , so can you just
start it standalone by following command.
./campaign_manager_test --config etc/config.cfg
you have to choose the model of the bidder , a.) either the simplest http_bidder_test that has both exchange handler + embedded bidder code OR b.) multi-bidder example that consists of
./multi_bidder --config etc/config.cfg
./multi_exchange_handler --config etc/config.cfg
The multi-bidder is useful for very large DSP shops where you have 1 million campaigns/clients and so the only way we thought to tackle it is to segregate
1 million campaigns as segments , so each stack on each machine would have unique set of campaigns. For your project I recommend simple http_bidder_test.cpp and if you need to load balance the load between those handlers to achieve minimum latency use NGINX . In this model your handlers will run on either same IP address / different ports for each http_bidder_test or same port/ different IP - each stack will have its own config with IP/port.
In our tests we run all on the same machine and keep all campaigns together for multi-bidders.
We haven't assembled complete DSP in the examples , you are dealing with pieces that represent
a bidder engine.
We pre-generated 1000 campaign ads and 1000 campaign budgets by python script which is hooked up to our build system , so when you run
make -j4 install
as you probably see campaign raw data and everything else is published under
Release/examples/bin
The bidder can be tested with suit of curl*.sh scripts and the performance is tested by ab.sh script
ab.sh -n20000 -c 10 --bidder
when testing http_bidder_test . When testing other examples curl.sh and ab.sh also accepts other parameters
giving you snapshot from curl.sh script
LONGOPTS="help,version,auction,mock-bidders,bidder,multi-bidder,c:n:"
snapshot from ab.sh
SHORTOPTS="hvta:c:n:"
LONGOPTS="help,version,auction,mock-bidders,bidder,multi-bidder,test"
You can read the scripts to see what parameters need to be passed to test different executables.
Waiting for your response with your network configuration output ...
here's the output...
reoxey@reoxey-desktop:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 74:e6:e2:10:d4:c6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4370 errors:0 dropped:0 overruns:0 frame:0
TX packets:4370 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:271711 (271.7 KB) TX bytes:271711 (271.7 KB)
wlan0 Link encap:Ethernet HWaddr 10:08:b1:b1:3e:37
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:13272 errors:0 dropped:0 overruns:0 frame:0
TX packets:12305 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10864680 (10.8 MB) TX bytes:2473278 (2.4 MB)
here's the second one...
reoxey@reoxey-desktop:~$ python -c 'import socket; print socket.getaddrinfo("0.0.0.0", 11081, 0, 0, socket.IPPROTO_TCP, socket.AI_ADDRCONFIG)'
[(2, 1, 6, '', ('0.0.0.0', 11081))]
The error in your log suggest there is an issue with resolving ip address
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): resolve: Host not found (authoritative)
Aborted (core dumped)
When I googled for this error resolve: Host not found (authoritative)
it pointed to misconfiguration of network.
By default, the resolver takes the option `address_configured', which only returns IP addresses if a non-loopback address is configured.
from your ifconfig -a
output I only see lo
aka Local Loopback
configured with IP 127.0.0.1, but I don't see other network interfaces configured with IP address . Neither wireless - wlan0 nor fixed eth0
has IP address.
The code that fails is most likely this one
https://github.com/venediktov/vanilla-rtb/blob/master/CRUD/service/server.hpp#L63
You can try changing it from
boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve({address, port});
to this one
boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve({address, port, boost::asio::ip::resolver_query_base::flags(0)});
And let me know if that helps even without changing your network configuration.
Just run capaign_manager test alone for now , because that's the one that you tried connecting your browser to.
./campaign_manager_test --config etc/config.cfg
You should get this output
campaign-manager.host 0.0.0.0
campaign-manager.ipc_name vanilla-campaign-budget-ipc
campaign-manager.log /tmp/campaign_manager_log
campaign-manager.port 11081
campaign-manager.root www
config etc/config.cfg
Without errors and the process should keep running . Then you connect your browser to http://localhost:11081/campaign/index.html
You must add index.html at the end for now.
2.) your run.sh is not correct , it will only start first example and will not proceed to the next our processes don't exit after start up . However , because every process in your case experienced same issue and aborted you were able to execute one after another.
yeah it worked, thanks.
If you want to talk to us about your project you can send email to info@forkbid.com perhaps we could help in exchange for web development? We need to revamp our web site.
on running run.sh
cd Release/examples/bin
./http_bidder_test --config etc/config.cfg
./cache_loader_test --config etc/config.cfg
./exchange_handler_test --config etc/config.cfg
./mock_bidder_test --config etc/config.cfg
./multi_bidder --config etc/config.cfg
./multi_exchange_handler --config etc/config.cfg
./notification_service_test --config etc/config.cfg
./slavebanker_service_test --config etc/config.cfg
./campaign_manager_test --config etc/config.cfg
i get this output in terminal..
reoxey@reoxey-desktop:~/CLionProjects/vanilla-rtb$ sh ./run.sh
when i try to open localhost:11081 or localhost:11081/campaign, this error shows up.
what am i doing wrong?