plamoni / SiriProxy

A (tampering) proxy server for Apple's Siri
GNU General Public License v3.0
2.12k stars 343 forks source link

i keep getting this error when starting siriproxy after i start dnsmasq #468

Closed matthewwatson70 closed 11 years ago

matthewwatson70 commented 11 years ago

Matthews-Mac:~ MatthewWatson$ rvmsudo siriproxy server Starting SiriProxy on 0.0.0.0:443.. /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.1/lib/eventmachine.rb:526:in start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError) from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.1/lib/eventmachine.rb:526:instart_server' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/lib/siriproxy.rb:20:in block in initialize' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.1/lib/eventmachine.rb:187:incall' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.1/lib/eventmachine.rb:187:in run_machine' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.1/lib/eventmachine.rb:187:inrun' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/lib/siriproxy.rb:16:in initialize' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/lib/siriproxy/command_line.rb:100:innew' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/lib/siriproxy/command_line.rb:100:in start_server' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/lib/siriproxy/command_line.rb:89:inrun_server' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/lib/siriproxy/command_line.rb:39:in initialize' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/bin/siriproxy:6:innew' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/gems/siriproxy-0.4.4/bin/siriproxy:6:in <top (required)>' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/bin/siriproxy:23:inload' from /Users/MatthewWatson/.rvm/gems/ruby-1.9.3-p385/bin/siriproxy:23:in `

'

bgottsch commented 11 years ago

try killall dnsmasq then killall ruby then sudo dnsmasq then start the server

matthewwatson70 commented 11 years ago

output: Matthews-Mac:~ MatthewWatson$ killall dnsmasq No matching processes belonging to you were found Matthews-Mac:~ MatthewWatson$ killall ruby No matching processes belonging to you were found Matthews-Mac:~ MatthewWatson$ sudo dnsmasq Password: Matthews-Mac:~ MatthewWatson$ rvmsudo siriproxy server Warning: can not check /etc/sudoers for secure_path, falling back to call via /usr/bin/env, this breaks rules from /etc/sudoers. export rvmsudo_secure_path=1 to avoid the warning.Starting SiriProxy on 0.0.0.0:443.. SiriProxy up and running.

after i do this i go to my device and say test siriproxy and it doesn't respond siriproxy is up and running. i think siriproxy is running on a port other than 0443. I dont know how to change siriproxy to use 0443. I'm not experienced with dnsmasq.

bgottsch commented 11 years ago

Check if the certificate is installed

bgottsch commented 11 years ago

Also to avoid this error input export rvmsudo_secure_path=1 before you start it

bgottsch commented 11 years ago

Do you at least get an iphone trying to connect?

matthewwatson70 commented 11 years ago

the certificate is installed and is there a way to get export rvmsudo_secure_path=1 to run automatically.

plamoni commented 11 years ago

Make sure you're doing sudo killall ruby, not just killall ruby (as you can see, there was a process that didn't belong to you -- probably belonged to root).

Siri uses port 443 by default, so no issue there.

If all you see is the SiriProxy is up and running output and nothing else then your phone isn't talking to SiriProxy. You should see output when you try to use Siri. If Siri is working on your phone (she should respond that she doesn't understand "Test Siri Proxy"), then you have a DNS issue. You need to make sure that your phone has its DNS server set to be the computer running DNSMasq (looks like your Mac). If you get an error when using Siri, it's likely a different DNS issue. You need to make sure that the IP address specified in your dnsmasq configuration for guzzoni.apple.com matches the IP address of your SiriProxy server (again, probably your Mac).

Also, make sure you're running the latest version of SiriProxy, as it has fewer issues with DNS.

Hope that helps!

matthewwatson70 commented 11 years ago

I am running the latest version i update everytime i can. I checked the dns on my phone and its like it normally is nothing has changed. so i changed it to my computers ip that i found in system preferences. I tried asking siri again and she said 'Is this thing on?'.

matthewwatson70 commented 11 years ago

The sudo killall commands worked too.

matthewwatson70 commented 11 years ago

i Already edited the config file.

plamoni commented 11 years ago

Sometimes Siri keeps the connection alive for a bit. So to flush the connection, turn on airplane mode for a few seconds then turn it off again. Then, before using Siri, go and make sure you're on your WiFi and that the DNS server setting is pointed to your Mac. Also make sure dnsmasq is running. The problem you're having is that you're not connecting to the Mac with Siri. So some basic troubleshooting on that should be all you need to get going.

matthewwatson70 commented 11 years ago

i did that the server starts good with no errors :) but my iphone still isn't connecting to it. Is the ip adress that i found in system preferences>Network the right adress to put in my iphones dns setting.

plamoni commented 11 years ago

Probably. It should be similar to the "Router" address that's also shown. For instance, your "Router" might be 192.168.1.1, while your Mac's IP (that should be the DNS entry) might be 192.168.1.102.

Also, make sure you did the override correctly in the DNSMasq config. You can determine if it's right by opening a terminal on your mac and typing nslookup guzzoni.apple.com X.X.X.X, where the X.X.X.X is replaced with your Mac's IP address. So if your Mac's IP is 192.168.1.102 then you'd type nslookup guzzoni.apple.com 192.168.1.102 and the result should be this:

Server:     192.168.1.102
Address:    192.168.1.102#53

Name:   guzzoni.apple.com
Address: 192.168.1.102

If it gives another address for guzzoni.apple.com (specifically one that starts with a 17.), then you're not overriding the DNS entry properly. Check your DNSMasq configuration.

matthewwatson70 commented 11 years ago

I ran that command and the server and adress was normal but then below that was this.

Non-authoritative answer: guzzoni.apple.com canonical name = origin.guzzoni-apple.com.akadns.net. origin.guzzoni-apple.com.akadns.net canonical name = nk31p01sa.guzzoni-apple.com.akadns.net. Name: nk31p01sa.guzzoni-apple.com.akadns.net

plamoni commented 11 years ago

Alright, that's good. You're getting the real address for Siri -- which explains your problem. You need to make sure that you have guzzoni.apple.com overridden in DNSMasq.

Watch the full installation video (at least up to getting DNSMasq set up). Or you can try just running these steps of the line-by-line installation gist:

https://gist.github.com/plamoni/1428474#file-gistfile1-sh-L19-L28

matthewwatson70 commented 11 years ago

i cant find the conf file. i have dnsmasq installed with homebrew. do u know where i could find it?

plamoni commented 11 years ago

try locate dnsmasq.conf

matthewwatson70 commented 11 years ago

I did and this happens

Matthews-Mac:~ MatthewWatson$ locate dnsmasq.conf

WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the following command:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Please be aware that the database can take some time to generate; once the database has been created, this message will no longer appear.

.

plamoni commented 11 years ago

Might be at /usr/local/etc/dnsmasq.conf ... did you check there?

matthewwatson70 commented 11 years ago

i just did and its not there.

plamoni commented 11 years ago

Well, you could try creating the locate database. Probably wouldn't hurt to have it for the future... Or if you're feeling lazy you could also do find / | grep dnsmasq.conf and eventually it will show up.

matthewwatson70 commented 11 years ago

ok i ran sudo find / | grep dnsmasq.conf because it needed the right priveleges. and i got a find at /usr/local/Cellar/dnsmasq/2.65/dnsmasq.conf.example is this the right one?

plamoni commented 11 years ago

Doesn't sound like it. Maybe you need to create it? I'm really not sure. This is a DNSMasq and Homebrew question, not a SiriProxy question. I suggest researching it as such.

matthewwatson70 commented 11 years ago

Ok Thanks very much for the help

matthewwatson70 commented 11 years ago

Ok if anyone else has this problem tell them to enable hidden files and go to usr/local/cellar/ dnsmasq and open what ever version they have there should be a dnsmasq.conf.example. tell them to copy the example and paste it in usr/local/etc and edit the name to dnsmasq.conf. then run rvmsudo siriproxy gencerts again after they have edited the contents of the .conf file

plamoni commented 11 years ago

Good to know, thanks!