Containerized Node server inaccessible with server.listen(port, ‘127.0.0.1’)

Your ports are being exposed correctly but your server is listening to connections on 127.0.0.1 inside your container: http.createServer(function (req, res) { res.writeHead(200, {‘Content-Type’: ‘text/plain’}); res.end(‘Hello World\n’+new Date); }).listen(1337, ‘127.0.0.1’); You need to run your server like this: http.createServer(function (req, res) { res.writeHead(200, {‘Content-Type’: ‘text/plain’}); res.end(‘Hello World\n’+new Date); }).listen(1337, ‘0.0.0.0’); Note the 0.0.0.0 instead of … Read more

Maximum packet size for a TCP connection

The absolute limitation on TCP packet size is 64K (65535 bytes), but in practicality this is far larger than the size of any packet you will see, because the lower layers (e.g. ethernet) have lower packet sizes. The MTU (Maximum Transmission Unit) for Ethernet, for instance, is 1500 bytes. Some types of networks (like Token … Read more

How to connect to docker host from container on Windows 10 (Docker for Windows)

Short answer: in most cases, you’ll need 10.0.75.1 . In Docker for Windows, the container communicates through a vEthernet adapter called DockerNAT. To find its details, open Command Prompt and type ipconfig Look for an entry that looks like Ethernet adapter vEthernet (DockerNAT): Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . … Read more

How to access Network panel on google chrome developer tools with selenium?

This possible via Selenium WebDriver. For this you should do the following: Download selenium language-specific client drivers from – http://docs.seleniumhq.org/download/ and add apropriate jar files to your project build path. To run a test with Chrome/Chromium you will also need chromdriver binary which you can download from – http://chromedriver.storage.googleapis.com/index.html Create a test case like this: … Read more

tech