Comments (16)
I'm also on 10.11.5 and am not able to reproduce this. The UserName
stuff should be cleaned up at some point but it's not what's causing this error. What happens if you run httpd22
manually? Smells like it could be a local configuration issue.
from homebrew-services.
Running it manually works. This gets weirder and weirder.
from homebrew-services.
@daFish I'm afraid this doesn't look like a Homebrew issue. If you can figure out a fix and create a PR then we'll consider it. Sorry!
from homebrew-services.
Thanks, @MikeMcQuaid. I try to come up with a solution. However, I have the exact same issue on another machine running 10.11.5.
from homebrew-services.
@daFish Try to remove the UserName
key and then brew reinstall
.
from homebrew-services.
@MikeMcQuaid Still doesn't work. The UserName
key is always readded when starting the service.
from homebrew-services.
Starting the service with sudo
works as expected.
from homebrew-services.
@daFish You may also want to try and remove the relevant UserName
code from brew services
and see if that fixes it.
from homebrew-services.
also CC @ilovezfs for thoughts.
from homebrew-services.
Perhaps they got stricter and made the incorrect usage an error instead of just ignoring it.
As a workaround, @daFish can you try opening brew-services.rb, and changing
# Force fix UserName
if !ServicesCli.root?
if data =~ %r{<key>UserName</key>}
# Replace existing UserName value with current user
data = data.gsub(%r{(<key>UserName</key>\s*<string>)[^<]*(</string>)}, '\1' + ServicesCli.user + '\2')
else
# Add UserName key and value to end of plist if it doesn't already exist
data = data.gsub(%r{(\s*</dict>\s*</plist>)}, "\n <key>UserName</key>\n <string>" + ServicesCli.user + "</string>\\1")
end
elsif data =~ %r{<key>UserName</key>}
# Always remove UserName key entirely if running as root
data = data.gsub(%r{(<key>UserName</key>\s*<string>)[^<]*(</string>)}, "")
end
to
if data =~ %r{<key>UserName</key>}
data = data.gsub(%r{(<key>UserName</key>\s*<string>)[^<]*(</string>)}, "")
end
from homebrew-services.
@ilovezfs This worked and I was able to start the services without any problems.
from homebrew-services.
Cool. You may want to commit that change for now, since brew update will try to stash it otherwise.
cd /usr/local/Library/Taps/homebrew/homebrew-services
git add cmd/brew-services.rb
git commit -m "username go away please"
from homebrew-services.
@ilovezfs Thanks! Would you or @daFish mind making a PR for that?
from homebrew-services.
@MikeMcQuaid Sure. Let's go with that as a workaround, clean up the formulae, and then drop the section entirely.
from homebrew-services.
@ilovezfs Sounds good.
from homebrew-services.
@MikeMcQuaid Done.
from homebrew-services.
Related Issues (20)
- their error when brew services not work HOT 2
- `restart_delay` on MacOS doesn't appear to do anything HOT 5
- Auto completion errors HOT 6
- formula.plist_path is deprecated HOT 9
- Starting a service with sudo does allow it to run on user login HOT 3
- Mariadb cant start HOT 4
- brew services failed (Error: uninitialized constant Homebrew::Service)
- when I run `brew services`, it returned 'Error: Unknown command: services' HOT 6
- Error: /usr/local/var/homebrew/linked/telnet is not inside a keg HOT 2
- Services missing from `brew services list` output on macOS 13.5.1 HOT 4
- Services stop running after I logout system. HOT 1
- `sudo brew services` is broken in linux HOT 1
- Add information about logs to help: `brew services --help` HOT 4
- Homebrew Services logs don't exist on MacBook Pro M2 (arm64) after at least failed attempt to run `dnscrypt-proxy` HOT 4
- HOWTO: Setting up a parallel redis service as a custom service? HOT 1
- brew services restart (stop/start) via ssh does not return and loops in /bin/launchctl list HOT 12
- Error on execute a "brew services start mongodb-community" command HOT 4
- Error starting service HOT 1
- brew services cannot find plist file for installed packaged HOT 4
- brew service generating invalid systemd service HOT 3
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 homebrew-services.