invoker
invoker copied to clipboard
does not proxy port on linux
I'm using Ubuntu 13.10 as a development machine with Ruby on Rails. I ran the invoker setup and appear to have everything setup correctly.
Example config file: [qlp] directory = /home/mark/dev/qlp command = bundle exec rails s -p $PORT
I can start the process and verify it works. However, it will ONLY respond if I explicitly add the port to the url. (must do http://qlp.dev:9001). It does not respond without the port being added.
I checked the /etc/rinetd.conf file and it looks like it should be proxying the port.
May be for some reason rinetd
is not running. Do you already have a program running on port 80 and 443 in dev. box? such as apache/nginx ? if yes - rinetd may not be run.
Thanks for the response. I verified I don't have anything running on port 80. I also verified that rinetd (version 0.62-5.1) is running. However, the /var/log/rinetd.log file is empty. Even after stopping and restarting the rinetd service. Is there another way to verify that it is working?
I am not sure, what is happening in your setup. Can you paste your ~/.invoker/config
- it should look something like:
---
:http_port: 23401
:https_port: 23402
Once Invoker is running. Can you telnet to port 23401
locally? rinetd should be proxying from port 80 to 23401. if you can't directly telnet to port 23401, then it could be either that proxy process did not start properly or your firewall is blocking things.
Contents of ~/.invoker/config
:
---
:http_port: 23401
:https_port: 23402
I am able to telnet to port 23401:
$ telnet 127.0.0.1 23401
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Not sure if I should be able to telnet to port 80, but I cannot:
$ telnet 127.0.0.1 80
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
On Ubuntu, I have ufw installed (Uncomplicated Firewall). I don't have it running and have even reset and disabled it through the GUI. No change in behavior.
Invoker does run and start the process, it just isn't getting the port proxied.
Thanks for all the help so far.
PS> Didn't mean to close it. :P Habit I guess.
thank you. can you also post /etc/rinetd.conf
file output?
Sure... I didn't customize anything here:
$ cat /etc/rinetd.conf
#
# this is the configuration file for rinetd, the internet redirection server
#
# you may specify global allow and deny rules here
# only ip addresses are matched, hostnames cannot be specified here
# the wildcards you may use are * and ?
#
# allow 192.168.2.*
# deny 192.168.2.1?
#
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress bindport connectaddress connectport
# logging information
logfile /var/log/rinetd.log
# uncomment the following line if you want web-server style logfile format
# logcommon
0.0.0.0 80 0.0.0.0 23401
0.0.0.0 443 0.0.0.0 23402
I'm seeing the same issue on OS X 10.10 (Yosemite) when installing from master. Not sure where I'd find rinetd.conf
on OS X though or if this should be opened as a new issue.
The OSX issue may be separate one and I am currently using invoker master on mavericks and it is working just fine. May be a 10.10 problem, which we will look more closely if one of us gets hold of a 10.10
release. In meanwhile patches welcome. :-)
@brainlid it appears to be rinetd
configuration problem. For some reason rinetd
is not able to listen on port 80
and 443
on your machine. If I were you - I would look into - /var/log/syslog
or try to debug what is causing the probem. I have tried reproducing the problem on Ubuntu 13.10
and I can't. It works just fine.
I have a similar problem on 14.04. I think it might be an RVM issue or maybe zsh? those are really the only variables on my machine that are different. note I can't even get to site:port... although it works if I use localhost:port
Update: Scratch the almost the same problem, I am having the exact save problem as this issue. On Ubuntu 14.04 with rvm and zsh. The almost the same problem I was seeing was because I was connected to my work Cisco VPN. When I shut down the VPN I have the same issue as above, although I need the VPN up to work, so this may be a deal breaker.
+1 to described problem. I can access site from http://site.dev:9001, but can't from http://site.dev. However on the other machine with the same configuration everything works just fine (Ubuntu 14.04).
I am also using RVM, if that is a factor in the problem.
@brainlid I guess last resort is, giving one of us access to the boxes where this is problematic. cc @szyablitsky
@gnufied It is my development laptop, so that isn't an option.
Same problem here unfortunately :(
i will re-check this issue on ubuntu, and update this thread, thanks.
@iffyuva sorry scratch me from that list, I thought I was affected, turns out I had a subtle typo in the .dev URL. Error reporting may be improved tehre but definitely my fault.
Is there any update on this? I'm having the same issue on Ubuntu 14.04.3 with RVM and zsh.
Can anyone try this with latest master and let me know? However, latest master will not work on Ubuntu 14.04 because now Invoker only supports Linux distributions that use systemd.
I've found what caused my issue. It was related to prax and his firewall iptables nat rules. If someone has the same issue just do
iptables -t nat -L -n -v
to preview the rules. If there are any redirections on ports 80(http) and 443(https) then do this command to clean your rules
iptables -t nat -F
After this you could use invoker http .dev domains.
Anyway @gnufied I'm using 1.4.1 version of invoker on Ubuntu 14.04.3 and it works fine. Can you guys at least make a special branch for Ubuntu 14.04 users when you update the gem to a version that uses systemd?
Just wanted to add here that I'm experiencing similar issues on Sierra 10.12.5 . I understand this might be different because it's not Unix specific.
Can not access via myapp.dev
, I must specify the port, https://myapp.dev:9000
.
cat ~/.invoker/config
---
:http_port: 23403
:https_port: 23404
:tld: dev
:dns_port: 23400
telnet 127.0.0.1 23403
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
I'm curious if anyone knew any other things I could check out. I'd love to contribute to this repo.
I still have this issue as well on Ubuntu 16.x
I would love to help contribute to this fix.