typicode / katon

(use hotel instead)
https://github.com/typicode/hotel
MIT License
683 stars 28 forks source link

Broken in OS X El Capitan #78

Open whatyoubendoing opened 9 years ago

whatyoubendoing commented 9 years ago

Katon is not working in the latest developer build of OSX.

typicode commented 9 years ago

Thanks for reporting the issue.

I've checked pow repository and they don't seem to have found a solution to that yet. I'm saying that because katon is built on pow technique to make servers available on local domains.

Meanwhile, if you want you can try hotel. It's simpler on purpose and doesn't rely much on the system, so there's less things that can break.

rizowski commented 9 years ago

This issue isn't very descriptive... I am currently running El Capitan but I keep having problems where katon status returns ok for both the daemon and domain. But when I try to hit any of the projects I have loaded to katon or the index.ka address I get and empty server response:

screenshot 2015-10-15 09 28 33

It seems to work intermittently as just this morning everything was working fine. I haven't been able to find a solution to getting it working after it crashes like this without a computer restart. I have tried stopping katon and starting again. I have already tried uninstalling katon but this still seems to be an issue.

typicode commented 9 years ago

It may be related to https://github.com/typicode/katon/issues/36 You can give a try to xip.io URLs, for example http://app-name.127.0.0.1.xip.io.

PS: I'll be on vacation for 2 weeks. So I won't be able to code/test things :/

rizowski commented 8 years ago

Here is some more information. I did a little more investigation into what is going on with katon. I tried to use the xip.io server urls and they return but, id like to not use those if I absolutely have to, since I have APIs talking to other APIs using the ka urls. I cloned katon down and installed it locally testing out the status command. It reports everything as ok because it actually gets the index.ka page.

If I open postman and I try to hit the index.ka page, it also returns what chrome is returning (no data received). Whenever I try to hit any of my api's using the regular url it gives me [dns ] as a log message in the main daemon log file.

12 Nov 11:02:02 - [daemon] Starting DNS server on port 13375
12 Nov 11:02:02 - [daemon] Starting HTTPS server on port 30900
12 Nov 11:02:02 - [daemon] Starting HTTP server on port 31000
12 Nov 11:02:02 - [daemon] DNS server started
12 Nov 11:02:02 - [daemon] HTTPS server started
12 Nov 11:02:02 - [daemon] HTTP server started
12 Nov 11:02:10 - [dns   ]
12 Nov 11:02:10 - [dns   ]
12 Nov 11:02:10 - [router] HTTP request received index.ka
12 Nov 11:02:27 - [router] HTTP request received index.ka
12 Nov 11:10:39 - [router] HTTP request received my.api.10.10.10.10.xip.io
12 Nov 11:10:39 - [procs ] Start my.api
12 Nov 11:10:39 - [router] Proxying to http://127.0.0.1:31012 my.api.10.10.10.10.xip.io
12 Nov 11:10:39 - [router] Can't connect, retry in 1 second [Error: connect ECONNREFUSED] my.api.10.10.10.10.xip.io
12 Nov 11:10:40 - [router] Proxying to http://127.0.0.1:31012 my.api.10.10.10.10.xip.io
12 Nov 11:10:40 - [router] Can't connect, retry in 1 second [Error: connect ECONNREFUSED] my.api.10.10.10.10.xip.io
12 Nov 11:10:41 - [router] Proxying to http://127.0.0.1:31012 my.api.10.10.10.10.xip.io
12 Nov 11:10:41 - [router] Can't connect, retry in 1 second [Error: connect ECONNREFUSED] my.api.10.10.10.10.xip.io
12 Nov 11:10:42 - [router] Proxying to http://127.0.0.1:31012 my.api.10.10.10.10.xip.io
12 Nov 11:10:42 - [dns   ]
12 Nov 11:10:42 - [dns   ]
12 Nov 11:10:42 - [router] HTTP request received security.api.ka
12 Nov 11:10:42 - [procs ] Start security.api
12 Nov 11:10:42 - [router] Proxying to http://127.0.0.1:31004 security.api.ka
12 Nov 11:10:42 - [router] Can't connect, retry in 1 second [Error: connect ECONNREFUSED] security.api.ka
12 Nov 11:10:43 - [router] Proxying to http://127.0.0.1:31004 security.api.ka
12 Nov 11:10:43 - [router] Can't connect, retry in 1 second [Error: connect ECONNREFUSED] security.api.ka
12 Nov 11:10:44 - [router] Proxying to http://127.0.0.1:31004 security.api.ka
12 Nov 11:10:44 - [router] HTTP request received my.api.10.10.10.10.xip.io
12 Nov 11:10:44 - [router] Proxying to http://127.0.0.1:31012 my.api.10.10.10.10.xip.io
12 Nov 11:17:38 - [dns   ]
12 Nov 11:17:38 - [dns   ]

Curl also seems to respond with the same status:

$ curl http://index.ka
curl: (52) Empty reply from server

@typicode have you found anything else out about this problem?

typicode commented 8 years ago

@rizowski thank you for the detailed logs. Didn't really have the time to, sorry.

But I've worked on a alternative way to have .dev local domains.

It's available in the latest version of hotel. Main advantages are that, unlike here, it doesn't rely on OS X firewall and won't get broken with OS updates.

So, It doesn't fix this issue, but you may want to give it a try.

rizowski commented 8 years ago

Ok thanks for the update. I will test it out and let you know of the results.