Skip to content
This repository

Foreman Compatibility #92

Closed
burke opened this Issue September 10, 2012 · 22 comments
Burke Libbey
Owner

No description provided.

Chris Ledet

It seems to fine work with foreman. What's missing?

Burke Libbey
Owner

Someone was complaining about it. I haven't had a chance to investigate for myself yet.

Burke Libbey
Owner

Closing this because it seems to work fine and I can't remember what the issue was.

Burke Libbey burke closed this September 15, 2012
Carl Mercier

I'm also having an issue. I added "zeus start" to my Procfile and here's what I get:

20:41:23 zeus.1          | started with pid 6377
20:41:23 zeus.1          | Starting Zeus server
20:41:23 zeus.1          | [ready] [crashed] [running] [connecting] [waiting]
20:41:23 zeus.1          | boot
20:41:23 zeus.1          | └── default_bundle
20:41:23 zeus.1          |     ├── test_environment
20:41:23 zeus.1          |     │   └── test_helper
20:41:23 zeus.1          |     └── development_environment
20:41:23 zeus.1          |         └── prerake
20:41:23 zeus.1          | 
20:41:23 zeus.1          | Available Commands: [waiting] [crashed] [ready]
20:41:23 zeus.1          | zeus test (alias: rspec, testrb)
20:41:23 zeus.1          | zeus rake
20:41:23 zeus.1          | zeus runner (alias: r)
20:41:23 zeus.1          | zeus server (alias: s)
20:41:23 zeus.1          | zeus console (alias: c)
20:41:23 zeus.1          | zeus generate (alias: g)
20:41:23 zeus.1          | zeus dbconsole
20:41:23 zeus.1          | statuslogger.go:49: inappropriate ioctl for device
20:41:23 zeus.1          | panic: runtime error: integer divide by zero
20:41:23 zeus.1          | [signal 0x8 code=0x7 addr=0x320d7 pc=0x320d7]
20:41:23 zeus.1          | goroutine 7 [running]:
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*StatusChart).lengthOfOutput(0xf8400c3000, 0x3f, 0x0, 0xf84006bc00)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/statuslogger.go:133 +0x11e
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*StatusChart).draw(0xf8400c3000, 0xf84006bc00)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/statuslogger.go:104 +0x6f
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.StartStatusChart(0xf8400431e0, 0xf840001fa0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/statuslogger.go:70 +0x4c5
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.Run
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:35 +0x1e7
20:41:23 zeus.1          | goroutine 1 [chan receive]:
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.Run(0x7fff5fbff401, 0x100000005)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:51 +0x372
20:41:23 zeus.1          | main.main()
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/cmd/zeus/zeus.go:37 +0x2a1
20:41:23 zeus.1          | goroutine 2 [syscall]:
20:41:23 zeus.1          | created by runtime.main
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/proc.c:221
20:41:23 zeus.1          | goroutine 3 [syscall]:
20:41:23 zeus.1          | os/signal.loop()
20:41:23 zeus.1          |  /usr/local/go/src/pkg/os/signal/signal_unix.go:20 +0x1c
20:41:23 zeus.1          | created by os/signal.init·1
20:41:23 zeus.1          |  /usr/local/go/src/pkg/os/signal/signal_unix.go:26 +0x2f
20:41:23 zeus.1          | goroutine 4 [select]:
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.StartSlaveMonitor(0xf8400431e0, 0xf840001eb0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:48 +0x2fb
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.Run
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:32 +0x17b
20:41:23 zeus.1          | goroutine 5 [syscall]:
20:41:23 zeus.1          | syscall.Syscall()
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/syscall/asm_darwin_amd64.s:14 +0x5
20:41:23 zeus.1          | syscall.fcntl(0x200000009, 0x1, 0x9, 0x0, 0x0, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/syscall/zsyscall_darwin_amd64.go:246 +0x5c
20:41:23 zeus.1          | syscall.CloseOnExec(0x100000009, 0x0)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/syscall/exec_unix.go:77 +0x33
20:41:23 zeus.1          | net.socket(0x11773c, 0x4, 0x100000001, 0x0, 0xf840043540, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/sock.go:27 +0xe8
20:41:23 zeus.1          | net.unixSocket(0x11773c, 0xf800000004, 0xf840044920, 0x0, 0x115bdc, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/unixsock_posix.go:62 +0x2a5
20:41:23 zeus.1          | net.ListenUnix(0x11773c, 0x78696e7500000004, 0xf840044920, 0x39, 0xf840044900, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/unixsock_posix.go:332 +0xe5
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.StartClientHandler(0xf8400431e0, 0xf840001f00, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/clienthandler.go:24 +0xcd
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.Run
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:33 +0x19f
20:41:23 zeus.1          | goroutine 6 [semacquire]:
20:41:23 zeus.1          | sync.runtime_Semacquire(0x1cc478, 0xf800000001)
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/zsema_amd64.c:146 +0x25
20:41:23 zeus.1          | sync.(*RWMutex).Lock(0x1cc470, 0x3000000030)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/sync/rwmutex.go:60 +0x83
20:41:23 zeus.1          | syscall.forkExec(0xf8400005b0, 0xf800000067, 0xf8400515e0, 0x100000001, 0xf84008e540, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/syscall/exec_unix.go:151 +0x206
20:41:23 zeus.1          | syscall.StartProcess(0xf8400005b0, 0xf800000067, 0xf8400515e0, 0x100000001, 0xf84008e540, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/syscall/exec_unix.go:212 +0x76
20:41:23 zeus.1          | os.startProcess(0xf8400005b0, 0x67, 0xf8400515e0, 0x100000001, 0xf84008e500, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/os/exec_posix.go:36 +0x307
20:41:23 zeus.1          | os.StartProcess(0xf8400005b0, 0x67, 0xf8400515e0, 0x100000001, 0xf84008e500, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/os/doc.go:24 +0x59
20:41:23 zeus.1          | os/exec.(*Cmd).Start(0xf840085000, 0xf840046450, 0xf840059320, 0x0)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/os/exec/exec.go:256 +0x4d2
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.startWrapper(0xa5330, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/filemonitor.go:75 +0x1fb
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.StartFileMonitor(0xf8400431e0, 0xf840001f50, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/filemonitor.go:34 +0x85
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.Run
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:34 +0x1c3
20:41:23 zeus.1          | goroutine 8 [chan receive]:
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster._func_005(0xf8400591c0, 0xf840059198, 0xf8400591a0, 0xf8400591a8, 0xf8400591b0, ...)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:42 +0x31
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.Run
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:44 +0x314
20:41:23 zeus.1          | goroutine 9 [chan receive]:
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster._func_006(0xf840059198, 0xf8400591a0, 0xf8400591a8, 0xf8400591b0, 0xf8400591b8, ...)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:47 +0x31
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.Run
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/zeusmaster.go:49 +0x356
20:41:23 zeus.1          | goroutine 10 [finalizer wait]:
20:41:23 zeus.1          | created by runtime.gc
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/mgc0.c:882
20:41:23 zeus.1          | goroutine 11 [syscall]:
20:41:23 zeus.1          | created by addtimer
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/ztime_amd64.c:72
20:41:23 zeus.1          | goroutine 12 [syscall]:
20:41:23 zeus.1          | syscall.Syscall6()
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/syscall/asm_darwin_amd64.s:38 +0x5
20:41:23 zeus.1          | syscall.kevent(0xf, 0x0, 0x0, 0xf8400d9008, 0xa, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/syscall/zsyscall_darwin_amd64.go:199 +0x88
20:41:23 zeus.1          | syscall.Kevent(0xf80000000f, 0x0, 0x0, 0xf8400d9008, 0xa0000000a, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/syscall/syscall_bsd.go:538 +0xa4
20:41:23 zeus.1          | net.(*pollster).WaitFD(0xf8400d9000, 0xf84008e140, 0x0, 0x0, 0x0, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/fd_darwin.go:96 +0x185
20:41:23 zeus.1          | net.(*pollServer).Run(0xf84008e140, 0x0)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/fd.go:236 +0xe4
20:41:23 zeus.1          | created by net.newPollServer
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/newpollserver.go:35 +0x382
20:41:23 zeus.1          | goroutine 13 [chan receive]:
20:41:23 zeus.1          | net.(*pollServer).WaitRead(0xf84008e140, 0xf840066480, 0xf840043120, 0x23, 0x1, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/fd.go:268 +0x73
20:41:23 zeus.1          | net.(*netFD).ReadMsg(0xf840066480, 0xf8400e8000, 0x40000000400, 0xf8400446a0, 0x2000000020, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/fd.go:486 +0x2d5
20:41:23 zeus.1          | net.(*UnixConn).ReadMsgUnix(0xf840059370, 0xf8400e8000, 0x40000000400, 0xf8400446a0, 0x2000000020, ...)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/net/unixsock_posix.go:274 +0x144
20:41:23 zeus.1          | github.com/burke/zeus/go/unixsocket.(*Usock).readFromSocket(0xf840042c80, 0x0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/unixsocket/unixsocket.go:186 +0xf4
20:41:23 zeus.1          | github.com/burke/zeus/go/unixsocket.(*Usock).ReadFD(0xf840042c80, 0x0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/unixsocket/unixsocket.go:109 +0xaa
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster._func_004(0xf8400591e0, 0xf840059378, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:35 +0x28
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.StartSlaveMonitor
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:41 +0x195
20:41:23 zeus.1          | goroutine 14 [chan receive]:
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).doUnbootedState(0xf84006c000, 0xf8400514d0, 0x0, 0x5500000000, 0x0, ...)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:169 +0x3c7
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).Run(0xf84006c000, 0xf8400514d0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:123 +0x271
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.StartSlaveMonitor
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:44 +0x203
20:41:23 zeus.1          | goroutine 15 [semacquire]:
20:41:23 zeus.1          | sync.runtime_Semacquire(0xf840059230, 0xf840059230)
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/zsema_amd64.c:146 +0x25
20:41:23 zeus.1          | sync.(*Cond).Wait(0xf84008e040, 0xf800000001)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/sync/cond.go:67 +0xaa
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).WaitUntilReadyOrCrashed(0xf84006c300, 0x301b1)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:64 +0x133
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).doWaitingState(0xf84006c3c0, 0x1, 0x10eb44, 0x5700000001)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:148 +0x51
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).Run(0xf84006c3c0, 0xf8400514d0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:121 +0x2cf
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.StartSlaveMonitor
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:44 +0x203
20:41:23 zeus.1          | goroutine 16 [semacquire]:
20:41:23 zeus.1          | sync.runtime_Semacquire(0xf840059220, 0x192fa)
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/zsema_amd64.c:146 +0x25
20:41:23 zeus.1          | sync.(*Cond).Wait(0xf840042780, 0xf800000001)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/sync/cond.go:67 +0xaa
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).WaitUntilReadyOrCrashed(0xf84006c0c0, 0x301b1)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:64 +0x133
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).doWaitingState(0xf84006c180, 0x1, 0x10eb44, 0x5700000001)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:148 +0x51
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).Run(0xf84006c180, 0xf8400514d0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:121 +0x2cf
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.StartSlaveMonitor
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:44 +0x203
20:41:23 zeus.1          | goroutine 17 [semacquire]:
20:41:23 zeus.1          | sync.runtime_Semacquire(0xf840059210, 0xf840059210)
20:41:23 zeus.1          |  /private/tmp/bindist454984655/go/src/pkg/runtime/zsema_amd64.c:146 +0x25
20:41:23 zeus.1          | sync.(*Cond).Wait(0xf840042040, 0xf800000001)
20:41:23 zeus.1          |  /usr/local/go/src/pkg/sync/cond.go:67 +0xaa
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).WaitUntilReadyOrCrashed(0xf84006c000, 0x301b1)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:64 +0x133
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).doWaitingState(0xf84006c0c0, 0x1, 0x10eb44, 0x5700000001)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:148 +0x51
20:41:23 zeus.1          | github.com/burke/zeus/go/zeusmaster.(*SlaveNode).Run(0xf84006c0c0, 0xf8400514d0, 0x0, 0x0)
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavenode.go:121 +0x2cf
20:41:23 zeus.1          | created by github.com/burke/zeus/go/zeusmaster.StartSlaveMonitor
20:41:23 zeus.1          |  /Users/burke/go/src/github.com/burke/zeus/go/zeusmaster/slavemonitor.go:44 +0x203
20:41:23 zeus.1          | goroutine 18 [semacquire]:
20:41:23 zeus.1          | exited with code 2
20:41:23 zeus.1          | sync.runtime_Semacquire(0xf840059218, 0xf840059218)
20:41:23 system          | sending SIGTERM to all processes
SIGTERM received
Valentin Rabanelly

+1 Same error for me, Running Zeus 0.12.0 on OSX Mountain Lion with Foreman 0.60.2

Ryan Schlesinger

I just got this for the first time on Friday.

EDIT: I don't run zeus with foreman but I do have the foreman gem installed.

Sasha Koss

Have same problem.

Tom Stoecklein

Ran into the same issue. Fine if in another process. Not sure if it'll make a difference, but if there are other declarations in the Procfile zeus doesn't get to the boot stage like the above backtrace.

Dan Croak

I would like to use Zeus with Foreman (which is our standard protocol for running Rails apps in development), but I'm unclear how to set it up.

I don't think I want to add Zeus to the Procfile: I want the Procfile to define the processes as they'll run in all environments.

Another solution I can think of is to alias rails="zeus rails". Seems a little crazy, though.

Tom Stoecklein

@croaky You can always consider using an an additional Procfile (i.e. Procfile.dev): foreman start -f Procfile.dev. That way I can take care of starting up the server, guard, and tail various logs. Right now I have to start zeus as a separate process, but for the time being, it works decently enough.

Carl Mercier

This is still broken. Issue should be reopened IMO.

Eckhard Rotte
erotte commented May 06, 2013

+1

Penn Su

It worked for me. I write

zeus: zeus start
web: zeus server -p $PORT -e $RACK_ENV

The only issue I had is the display of zeus command is all expanded and does not look pretty from foreman.

Ian Vaughan

as @pencilcheck says, the way zeus wants to reposition the cursor means its output within foreman is not pretty, but it does work, for me in any case.
But for me, I found that the time between foreman running between starting zeus and starting the web components was too fast, thus the server failed to boot as zeus was not ready.

Penn Su

@IanVaughan that's true as foreman starts workers in random order so I might have to rerun the foreman multiple times before the web workers run after zeus worker.

I have been looking for ways to specify orders for workers unfortunately it seems like there is no interests from the author to support this. Or if someone could prove me wrong.

Daniel Dosen

I notice foreman is really slow with zeus (and guard and karma) anyone else have this issue?

Jon Gold

Running into problems with my dev Procfile loading items in a random order too.

zeus: zeus start
web: zeus server -p 1313 -e development

-> Can't connect to master. Run zeus start first.

I could remove zeus from the Procfile but then if you forget to do zeus start the thing won't run. Any ideas?

Robert R. Meyer

+1 for zeus and Foreman, compatibility with unicorn would also be great.

Nikolay Nemshilov

fore the future reference here's how you can run stuff with zeus and foreman and avoid the Run zeus start first issue

https://gist.github.com/MadRabbit/8447712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.