Skip to content

Conversation

@floppyzedolfin
Copy link
Collaborator

I haven't tried @dotdc's solution, but I think using :80 is a bit extreme. I switched to a "random" other port, and got this result :

▶ make curl_measure 
curl -v -X POST -H "Content-Type: application/json" http://localhost:1919/measure  -d '{"temperature": 31.2, "humidity": 41.6}'
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:1919...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 1919 (#0)
> POST /measure HTTP/1.1
> Host: localhost:1919
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 39
> 
* upload completely sent off: 39 out of 39 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Date: Sat, 23 Jul 2022 17:32:41 GMT
< Content-Length: 0
< Connection: keep-alive
< 
* Connection #0 to host localhost left intact

@floppyzedolfin
Copy link
Collaborator Author

I was getting the following error, even after a reboot of my computer:

▶ make deploy
./deploy/deploy.sh

       ___  _              _ _
      |_ _|<_>._ _  _ _   | | | ___ ._ _
       | | | || ' || | |  | - |/ ._>| ' |
🐓     |_| |_||_|_|\_. |  |_|_|\___.|_|_|v     🐓
                   <___|                
---------------- 🏠 Create cluster tinyhen ----------------
Creating cluster "tinyhen" ...
 ✓ Ensuring node image (kindest/node:v1.24.0) 🖼
 ✗ Preparing nodes 📦  
ERROR: failed to create cluster: command "docker run --name tinyhen-control-plane --hostname tinyhen-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=tinyhen --net kind --restart=on-failure:1 --init=false --publish=0.0.0.0:80:80/TCP --publish=0.0.0.0:443:443/TCP --publish=127.0.0.1:33581:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.24.0@sha256:406fd86d48eaf4c04c7280cd1d2ca1d61e7d0d61ddef0125cb097bc7b82ed6a1" failed with error: exit status 125
Command Output: b1a3b32d6fdd314ce13c66c8f2eb7d16f42f322c3ee85c9a3d596d8289de9d50
docker: Error response from daemon: driver failed programming external connectivity on endpoint tinyhen-control-plane (482752aa895533ef405c699afbc9fa434526a91a83857cb8e0d0df24987c4752): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use.

@floppyzedolfin floppyzedolfin force-pushed the fix/run-on-another-host-port branch from 7bffa1a to db4cea7 Compare July 23, 2022 17:44
@floppyzedolfin floppyzedolfin changed the base branch from dev to main July 23, 2022 17:44
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

Successfully merging this pull request may close these issues.

2 participants