Comments (7)
why do you have two different ports listening? Looks like 666 and 667?
from captainhook.
I'm running CaptainHook on Docker with autorestart=true. So to be able to run CaptainHook in multiple containers on the same machine with --net=host Docker, I use
#!/bin/bash
increment=${CAPTAINHOOK_PORT_INCREMENT:-1}
port=${CAPTAINHOOK_PORT:-666}
isfree=$(netstat -tapln | grep $port)
while [[ -n "$isfree" ]]; do
port=$[port+increment]
isfree=$(netstat -tapln | grep $port)
done
exec /usr/share/gocode/bin/captainhook -listen-addr 127.0.0.1:$port -configdir /etc/captainhook -echo
Hence the 2014/09/29 19:27:13 Listening on 127.0.0.1:667
line.
from captainhook.
So basically, I think this goes like: bind to 666, crash without releasing the bind, bind on 667.
from captainhook.
PS this is on Ubuntu 14.04 using Go 1.2.1.
from captainhook.
It's deadlocked because the port is in use. Your incrementing script might have a bug?
from captainhook.
Hmm this is running on a machine with only one Docker container running, so the port wasn't in use. I can also see that by the 2014/09/29 19:27:13 Listening on 127.0.0.1:666
line. If the port was in use, it would not have bound to it.
from captainhook.
it didn't bind to it, that's line 34 in your stack trace. Go is waiting for that port to be freed.
from captainhook.
Related Issues (12)
- logging HOT 1
- Add queues/locking for non parallel jobs HOT 2
- What happens if a second webhook comes in while the first is running? HOT 2
- How to `cd` to some directory
- Filters
- documentation missing
- bash: captainhook: command not found HOT 4
- Use a multi-stage dockerfile
- -echo? HOT 4
- runtime error: invalid memory address or nil pointer dereference HOT 4
- Make post data available HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from captainhook.