peterldowns / localias

custom local domain aliases for local dev servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Error: error: a localias daemon or server is already running

tanvirraj opened this issue · comments

i'm trying to run localias, but everytime i'm getting this error
i install the app in mac osx 12, then run this 2 commands but failed

localias set pg.web 8081
localias run

Screenshot 2023-11-23 at 10 36 25 PM

Interesting, is it possible that you have an instance already running? To figure this out, can you share what the following commands tell you?

localias daemon status
ps aux | grep -i localias

If there is another instance running already, that would explain the problem, and you can just kill it and then try running localias run. If there is not another instance running already, I'm not sure what to do and I'll have to think harder.

One other possibility is that you already have a proxy server like Charles, Caddy, or Puma that is bound to ports 443/80. This was previously reported and may be the cause of the issue. The same solution would apply here — kill that proxy and try localias run again.

I'll leave this issue open until I've updated the README to make a note of this since it seems to be a common problem.

@peterldowns Thanks for you time, and sorry for delay.
i face some wired behavior, every time i run ps aux | grep localias it shows dynamic process. not sure if i missing something
Screenshot 2023-12-29 at 2 18 33 PM

@tanvirraj that's the grep process, matching itself. You don't have the actual localias binary running in those runs.

@tanvirraj — what @hslatman is correct. if you're only seeing the grep process, then you don't have an instance of localias running. Most likely the problem is what I wrote above:

One other possibility is that you already have a proxy server like Charles, Caddy, or Puma that is bound to ports 443/80. This #16 and may be the cause of the issue. The same solution would apply here — kill that proxy and try localias run again.

One other thing I didn't mention is that you can try showing which processes are listening to which ports by using lsof:

❯ lsof -Pn | grep '*:443'
localias  62825   pd    7u     IPv6 0xa3c836944101b8c3           0t0                 TCP *:443 (LISTEN)
localias  62825   pd    9u     IPv6 0xa3c836990e200103           0t0                 UDP *:443
❯ lsof -Pn | grep '*:80'
localias  62825   pd    8u     IPv6 0xa3c83694410180c3           0t0                 TCP *:80 (LISTEN)

Please let me know if this helps. If you're still unable to start localias and you're certain that no other proxies are running / bound to ports 80/443, then there is something unexpectedly wrong and I'll have to come up with some other theory.

I added docs clarification in #19, this should be resolved now. Please re-open if the suggestions above didn't work!