puma / puma-dev

A tool to manage rack apps in development with puma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaunchAgent fails on macOS Mojave - Error listening: accept tcp 0.0.0.0:0: accept: invalid argument

jasonsof opened this issue · comments

commented

I followed the installation steps to the letter on a brand new laptop (no previous versions of pow installed) it works fine in interactive mode, however I'd like to be able to run it in the background and not need to use port numbers in the URL.

I was unable to start the LaunchAgent. Running this:

sudo launchctl load -w ~/Library/LaunchAgents/io.puma.dev.plist

resulted in

/Users/jason/Library/LaunchAgents/io.puma.dev.plist: Path had bad ownership/permissions

so I changed the ownership to root

sudo chown root ~/Library/LaunchAgents/io.puma.dev.plist

I can now load the LaunchAgent but I get this in the log files every 10 seconds:

2019/06/19 12:39:35 Error listening: accept tcp 0.0.0.0:0: accept: invalid argument

Any insights on what this might be? I have not altered the plist file in any way

AFAIK you shouldn't have to manually interact with launchctl at all.

I'm able to configure and use the background process with

puma-dev -uninstall
puma-dev -install
sudo puma-dev -setup
commented

@nonrational you are right that I shouldn't need to but it doesn't seem to work using the background process (running interactively works fine) and after some digging I found that the LaunchAgent was not running.

I tried those steps you suggest and still no joy :(

are you using the version from homebrew or building from source?

commented

installed using homebrew and following the instructions in the readme

I'd try running the latest binary. A few libs and dependencies have been updated since the version thats currently installed via homebrew. Might yield benefits? Or at least give you another datapoint.

https://github.com/puma/puma-dev#build-from-source

I did not have the LaunchAgent issues, but I did have the accept tcp 0.0.0.0:0: accept: invalid argument logging with puma-dev repeatedly failing. It would never get to the point where it would actually launch anything.

Running macOS Catalina, I had a homebrew install from years ago, though reinstalling did not help.

Removing the homebrew version and building from source fixed the problem.

Maybe a new binary release would be helpful?