Questions tagged http

Explore the latest questions and answers asked by our top developers.

Connection refuse on post request

I have to update a repo So, I created an image from python:3.7:slim I am using flask for the application After building the image I tries to send a post requst but I got rllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=’10.14.2.96′, port=8085): Max retries exceeded with url: /run_product_clustering_request/ (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7f344c13b5f8>: Failed to establish a new connection: […]

By MPA
Published
Categorised as apache, docker, http, request Tagged , , ,

Portainer with ssl working only on port 443 and not on 80

I followed this page to setup portainer both on https and *http: openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -keyout ~/local-certs/portainer.key -out ~/local-certs/portainer.crt docker run -d -p 443:9000 -p 80:8000 –name portainer –restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -v ~/local-certs:/certs portainer/portainer-ce:2.6.3 –ssl –sslcert /certs/portainer.crt –sslkey /certs/portainer.key It is working for https and port […]

By EuberDeveloper
Published
Categorised as docker, http, https, portainer Tagged , , ,

Traefik: How do I redirect https to http with Docker?

I inherited a project that is using Traefik with Docker but I have no experience with Traefik so seeking some assistance. Say I have domain https://xxx.testsite.com I have been asked to redirect any traffic from https to http. I’ve tried configuring a middleware to redirect but it didn’t work. Currently, if I visit http://xxx.testsite.com my […]

By MalcolmInTheCenter
Published
Categorised as docker, http, https, redirect, traefik Tagged , , , ,

How to avoid binary characters in the result of a docker engine api http exec call?

When running a http://127.0.0.1:2375/exec/xxxxx/start i get a response of type application/vnd.docker.raw-stream with some binary chars in the response. so for example, when calling "date" inside a docker container, the response always looks like this (screenshot made from postman): in joe (editor) I see: [email protected]@@@@@]Wed Dec 29 00:55:05 CET 2021 and vi (editor) shows A^@^@^@^@^@^@^]Wed Dec […]

By michabbb
Published
Categorised as api, docker, docker-engine, http Tagged , , ,

ASP.NET Core – Get client’s IP address instead of local IP

I am trying to retrieve the client’s IP address in my .net backend, which is running in Docker. With the code snippet below, I would expect to get the IP address of the client but I get 172.17.0.1 instead, which is some local IP address (Docker probably). public async Task Invoke(HttpContext context) { var clientIpContext […]

By spahno
Published
Categorised as .net, c#, docker, http, ip Tagged , , , ,

Can a Dockerfile be used to redirect http?

I have a containerized API server. The API server works on a http /path i.e. GET localhost/path => 200 OK I need to place that container in service that expects the container to handle / http requests and it does not. GET localhost/ => 404 Is there a way to use Dockerfile to rewrite the […]

By PovilasID
Published
Categorised as docker, http, routes Tagged , ,

HTTP request take 300 seconds in docker container

I’m testing the project Goteo https://github.com/GoteoFoundation/goteo with docker and when I navigate to the site, the request HTTP take 200ms for the first requests. But after, request take minute. I use ubuntu 20:04 with firefox. For reproduce: git clone https://github.com/GoteoFoundation/goteo.git cd goteo/ cp config/docker-settings.yml config/local-docker-settings.yml docker/up The services will start and we can navigate on […]

By Yoan Bousquet
Published
Categorised as docker, http, request Tagged , ,

Load balancer error with Nginx and Docker

I’m trying to setup a load balancer with 3 replicas to handle queries. I’m using Nginx for load balancer, Flask to deploy an API and Postgres to handle data in a replicative schhema. My Docker-Compose looks like this: version: ‘3.5’ services: tienda: build: ./api deploy: replicas: 3 depends_on: – postgresql-master – postgresql-slave ports: – 8080 […]

By myge32
Published
Categorised as docker, flask, http, load-balancing, nginx Tagged , , , ,

HTTP call to Logic App in a Docker Container

I’ve followed getting started with Logic Apps in a Container, in Azure Tips & Tricks #311, which worked OK. I also consulted Vinnie James, which is similar The Logic App runs on receipt of a HTTP request, which – inside VS Code – is localhost, easily used from a browser But when I go to […]

By JohnD
Published
Categorised as azure-logic-apps, containers, docker, http Tagged , , ,

Node.js HTTP Get stream freezes inside docker container

I have following code written in nodejs using http module. It’s basically listens to event stream (so the connection is permanent). http.get(EVENT_STREAM_ADDRESS, res => { res.on(‘data’, (buf) => { const str = Buffer.from(buf).toString(); console.log(str); }); res.on(‘error’, err => console.log("err: ", err)); }); If I run the above code on my Mac it works fine and […]

By JJ23
Published
Categorised as docker, http, http-streaming, node.js Tagged , , ,
1 2 3 8

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq