Open gotoAndBliss opened 7 years ago
Today I went a bit further. Curious if anyone can see something blatantly incorrect about my approach here..
Started also forwarding ip6
sudo sysctl -w net.inet6.ip6.forwarding=1
net.inet6.ip6.forwarding: 0 -> 1
Created a new forwarding rule
sudo touch /private/etc/pf.anchors/org.user.forwarding
With
rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9000
rdr pass on en0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9000
rdr pass on en1 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9000
Added it to /private/etc/pf.conf
Parse tested it sudo pfctl -vnf /etc/pf.anchors/org.user.forwarding
. It was correct.
Rebooted, and ran sudo pfctl -f /etc/pf.conf; sudo pfctl -e
.
Still need to include the port 9000
to access domain.
Could it be caused by https://github.com/code-mancers/invoker/issues/184?
@WojtekKruszewski Thanks so much for the recommendation. I was previously on 2.1.5, and went to 2.3.0, but the problem still persisted.
I have bumped into the same issue. I can access my app fine by visiting localhost:9000, but if I visit web.dev I'm greeted by the usual
Application not running Invoker did not get any response. Please check if the application is running.
I'm using the latest version (1.5.4) and these are my configuration files:
$ cat /etc/resolver/dev
nameserver 127.0.0.1
port 23400
$ cat ~/.invoker/config
---
:http_port: 23403
:https_port: 23404
:tld: dev
:dns_port: 23400
$ cat /Library/LaunchDaemons/com.codemancers.invoker.firewall.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.codemancers.invoker</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>echo "rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 23403
rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 23404" | pfctl -a 'com.apple/250.InvokerFirewall' -f - -E</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>root</string>
</dict>
</plist>
$ head -1 Procfile
web: sleep 7 && zeus server -p $PORT
and here is the output of invoker list
$ invoker list
+-----+-----+------+------------------+---------------------------------------------+
| dir | pid | port | process_name | shell_command |
+-----+-----+------+------------------+---------------------------------------------+
| | 828 | 9000 | web | sleep 7 && zeus server -p 9000 |
+-----+-----+------+------------------+---------------------------------------------+
@Arkham Does this work for you: https://github.com/code-mancers/invoker/issues/194#issuecomment-316599726 ( It did for me, but didn't for @gotoAndBliss )
Hey @swanandp! I've tried every suggestion in the thread and the current situation is:
localhost:9000
✅ web.dev
🔴 Invoker did not get any response. Please check if the application is running.
web.dev:9000
🔴 This site can’t be reached web.dev refused to connect.
@Arkham I had the same and was resolved by running with binding 0.0.0.0
(e.g. rails s -b 0.0.0.0
)
@Dan2552 amazing, works for me too!
Would there be something similar for running rails thin
?
thin also has a -a
option that you can use to specifying binding address.
@gnufied Ah ok, because I tried -a 0.0.0.0
, but nothing happened. Should the address always be 0.0.0.0?
Purchased a brand new macbook, fresh install. Same issue. 😭
I discovered that if I greenfielded a new app, everything works as expected. No port required.
I tried stripping down the problem app to practically nothing ( still in the process of stripping ). And everytime I make the call I get this error
whisper : 4736210368:error:1408F09C:SSL routines:ssl3_get_record:http request:ssl/record/ssl3_record.c:322:
Not sure if that means anything to anyone on this thread.
Might be related: https://github.com/code-mancers/invoker/issues/248
I'm trying to migrate from POW, but lets give Invoker the benefit of the doubt and greenfield a new app
rails create newapp && cd newapp
. I did..My
invoker.ini
says..I run
sudo invoker setup
I run the app with ..
invoker start invoker.ini
Looks like it's booting up!
But...
curl whisper.dev
-> Operation Timeout. Strange.https://0.0.0.0:9000
-> This site can’t provide a secure connection 0.0.0.0 sent an invalid response. Weird.http://0.0.0.0:9000/
-> Boots up my homepage without SSL support. So anything CORS fails. Once I try and click on a subdomain. It's a big fail.