Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port forwarding is not working #62

Closed
royatatl opened this issue Jan 7, 2018 · 12 comments
Closed

Port forwarding is not working #62

royatatl opened this issue Jan 7, 2018 · 12 comments

Comments

@royatatl
Copy link

royatatl commented Jan 7, 2018

Hello guys,

I followed the instructions from #12
I found out that the port forwarding is not working.
When I typed http://[local_ip of my direct TV]:8080/remote/processKey?key=pause&hold=keyPress in the internet browser, my tv actually paused.
Then I typed http://192.168.1.254:8080/remote/processKey?key=pause&hold=keyPress in the browser, it shows "safari could not connect to the server".
So I logged in my modem http://192.168.1.254, and allowed the port forwarding with port 8080.

untitled copy

Ideally, that should allow the port forwarding. But it did not help.

I telnet the ip of modem with port 8080, it was refused, while telnetting direct tv is connected.

untitled1

Any suggestion?

Thanks,

@vmweaver
Copy link
Collaborator

vmweaver commented Jan 7, 2018 via email

@royatatl
Copy link
Author

royatatl commented Jan 7, 2018

@mawrew19 Thank you so much for your response.
I tried https://[External IP]8080/remote/processKey?key=pause&hold=keyPress on my mobile phone through LTE. That actually worked.

Then I tested https:///info/getLocations. However, it did not get any response. Any suggestion?

@royatatl
Copy link
Author

royatatl commented Jan 7, 2018

BTW, here are the test logs
untitled2

@bklavet
Copy link
Owner

bklavet commented Jan 7, 2018

http://192.168.1.254/info/getLocations for local lan

replace with wan if you want to do it from outside your network.

@vmweaver
Copy link
Collaborator

vmweaver commented Jan 7, 2018

@bklavet I don't believe this will work since the NAT isn't likely on the internal interface as well as the external. 192.168.1.254 is the inside address of the router, I believe.

@royatatl If the pause worked from your mobile on LTE, then your NAT config looks to be good.
I should have been more specific. You can try "http://[externalAddress]:8080/info/getLocations"

The "index" file should include this "[external address]" on line 8.

Are there any more detailed messages on the errors you post? Was this when attempting to upload the project?

@royatatl
Copy link
Author

royatatl commented Jan 7, 2018

@mawrew19 "http://[externalAddress]:8080/info/getLocations" on my phone finally works
It shows
{
"locations": [{
"clientAddr": "0",
"locationName": "LR"
}],
"status": {
"code": 200,
"commandResult": 0,
"msg": "OK.",
"query": "/info/getLocations"
}
}

Did you mean the format of IP address in the index file is like var local_ip = "xx.xx.xxx.xxx" instead of var local_ip = 'xx.xx.xxx.xxx' ?

Here are the detailed error messages after I configured a test event on https://console.aws.amazon.com

02:53:50
START RequestId: fd4e5bba-f355-11e7-8d83-67d313b0b20e Version: $LATEST
START RequestId: fd4e5bba-f355-11e7-8d83-67d313b0b20e Version: $LATEST

02:53:50
Unable to import module 'index': Error at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19)
Unable to import module 'index': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

02:53:51
END RequestId: fd4e5bba-f355-11e7-8d83-67d313b0b20e
END RequestId: fd4e5bba-f355-11e7-8d83-67d313b0b20e

02:53:51
REPORT RequestId: fd4e5bba-f355-11e7-8d83-67d313b0b20e Duration: 50.65 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB
REPORT RequestId: fd4e5bba-f355-11e7-8d83-67d313b0b20e Duration: 50.65 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB

@vmweaver
Copy link
Collaborator

vmweaver commented Jan 7, 2018

Good news on the NAT!

No. I was more clarifying which address you should put on line 8. This should be your EXTERNAL Address.
The "index" file should be inside a ZIP file which is then uploaded. If you are attempting to upload just the index file, it will fail. This may be the error you are experiencing. @bklavet has some GREAT tutorial videos that you should review, if you haven't already.

@royatatl
Copy link
Author

royatatl commented Jan 7, 2018

My bad.
http://[externalAddress]:8080/info/getLocations works
The index file zipped up with the AlexaSkill file as I did follow b Money's tutorial video.
:(

@vmweaver
Copy link
Collaborator

vmweaver commented Jan 7, 2018 via email

@royatatl
Copy link
Author

royatatl commented Jan 7, 2018

No error when I upload and save it.

@bklavet
Copy link
Owner

bklavet commented Jan 7, 2018

Hey royatatl! What happens when you test from the service simulator in the developer site?

@royatatl
Copy link
Author

royatatl commented Jan 7, 2018

I figured out the reason.
When I zip the files, I actually zip the directory, not the content of the directory.
I think it could a Mac thing.

It is working now!!!!! I am so glad. Thank you folks so much for your help and patience.

Have a wonderful weekend!

@royatatl royatatl closed this as completed Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants