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

Error: Cannot get IP address: 407: [Master] Error: No running instance found #62

Closed
toanluongnhu1709 opened this issue Mar 19, 2017 · 23 comments

Comments

@toanluongnhu1709
Copy link

I have connected successfully to localhost:8889 to see the list of instances. But It shows " No instance found". So I have tried to test scrapoxy by the command: "scrapoxy test http://localhost:8888" and I got the error above response.
I have check on my Droplet and I know that images have been creating. I don't know what wrong from my config:
screen shot 2017-03-19 at 2 52 45 pm
index.js file: (I have no idea about value of port from instance).
screen shot 2017-03-19 at 2 54 17 pm
config.js file:
screen shot 2017-03-19 at 2 54 33 pm
Thank you so much!

@fabienvauchelles
Copy link
Owner

Hello,

Did you follow this tutorial :
http://docs.scrapoxy.io/en/master/standard/providers/digitalocean/index.html

In particular, the step 6 of this one :
http://docs.scrapoxy.io/en/master/standard/providers/digitalocean/create_image/index.html

Can you post full logs and configuration (without credentials)?

Thx

@toanluongnhu1709
Copy link
Author

toanluongnhu1709 commented Mar 19, 2017 via email

@2dogz
Copy link

2dogz commented May 11, 2017

2017-05-11T03:05:17.520Z - info: [Main] The selected provider is digitalocean 2017-05-11T03:05:17.542Z - debug: [Main] listen 2017-05-11T03:05:17.548Z - info: [Commander] GUI is available at http://localhost:8889 2017-05-11T03:05:17.551Z - debug: [Manager] start 2017-05-11T03:05:17.552Z - info: Proxy is listening at http://localhost:8888 2017-05-11T03:05:27.556Z - debug: [Manager] checkInstances 2017-05-11T03:05:29.009Z - debug: [Manager] adjustInstances: required:1 / actual:0 2017-05-11T03:05:29.009Z - debug: [Manager] adjustInstances: add 1 instances 2017-05-11T03:05:29.010Z - debug: [ProviderDigitalOcean] createInstances: count=1 2017-05-11T03:05:30.038Z - debug: [ProviderDigitalOcean] createInstances: actualCount=9 2017-05-11T03:05:37.580Z - debug: [Manager] checkInstances 2017-05-11T03:05:38.936Z - debug: [Manager] adjustInstances: required:1 / actual:0 2017-05-11T03:05:38.936Z - debug: [Manager] adjustInstances: add 1 instances 2017-05-11T03:05:38.936Z - debug: [ProviderDigitalOcean] createInstances: count=1 2017-05-11T03:05:39.933Z - debug: [ProviderDigitalOcean] createInstances: actualCount=10 2017-05-11T03:05:39.934Z - error: [Manager] Error: Cannot update or adjust instances: askedInstances=1, security=true 2017-05-11T03:05:47.582Z - debug: [Manager] checkInstances 2017-05-11T03:05:48.481Z - debug: [Manager] adjustInstances: required:1 / actual:0 2017-05-11T03:05:48.481Z - debug: [Manager] adjustInstances: add 1 instances 2017-05-11T03:05:48.481Z - debug: [ProviderDigitalOcean] createInstances: count=1 2017-05-11T03:05:49.726Z - debug: [ProviderDigitalOcean] createInstances: actualCount=10 2017-05-11T03:05:49.726Z - error: [Manager] Error: Cannot update or adjust instances: askedInstances=1, security=true

i seem to be having the same problem and i followed the tutorial, it will make 1 proxy on DO but wont register on instances "http://localhost:8889/"

@armenhajian
Copy link

armenhajian commented May 25, 2017

hi @fabienvauchelles I have similar issue but with AWS EC2.
After running scrapoxy it is working on :8889
but when I'm running scrapoxy test http://localhost:8888 it throws error rror: [Test] Error: Cannot get IP address: 407: [Master] Error: No running instance found

Here is the image of :8889
image

@fabienvauchelles
Copy link
Owner

Hello @armenhajian ,

In the snapshot, instances cannot be ping.

To better understand, did you successfully launch scrapoxy once ?

Thanks,
Fabien

@armenhajian
Copy link

armenhajian commented May 25, 2017

Nope @fabienvauchelles ,
This is the first time.
In AWS console I see successfully created and running instance(t2 micro),

And you're right can't ping to that instance via public IP,

Maybe something wrong on AWS *config side?

Cheers

@armenhajian
Copy link

I've tried to edit Security groups on AWS,

Now ping is open from anywhere, but on GUI cloud icon is red yet.

@freeztime
Copy link

Hello, I have same issue on DigitalOcean.
I follow instruction on: https://scrapoxy.readthedocs.io/en/master/standard/providers/digitalocean/index.html
until step 3, then power-on the droplet again, and continue with this:
https://scrapoxy.readthedocs.io/en/master/quick_start/index.html
start from step 3B.
When I Run "scrapoxy start conf.json -d" it gave me this errors:

info: [Main] The selected provider is digitalocean
debug: [Main] listen
info: [Commander] GUI is available at http://localhost:8889
debug: [Manager] start
info: Proxy is listening at http://localhost:8888
debug: [Manager] checkInstances
debug: [Manager] adjustInstances: required:1 / actual:0
debug: [Manager] adjustInstances: add 1 instances
debug: [ProviderDigitalOcean] createInstances: count=1
debug: [ProviderDigitalOcean] createInstances: actualCount=10
error: [Manager] Error: Cannot update or adjust instances: askedInstances=1, security=true

Thank you in advance.

@fabienvauchelles
Copy link
Owner

@armenhajian I think the port 3128 is not opened in your security group in AWS.

Do you confirm ?

@armenhajian
Copy link

I've done it like in scrapoxy.io tutorial
image

@fabienvauchelles
Copy link
Owner

@armenhajian, you must have only 1 rule and the source must be anywhere (not custom)

@armenhajian
Copy link

armenhajian commented May 26, 2017

@fabienvauchelles yes, I'm setup like that but after Save it is splitting the line to two custom parts and Anywhere converts to Custom.
I mean Anywhere 0.0.0.0/0, ::/0 equals to Custom 0.0.0.0/0 and Custom ::/0

@fabienvauchelles
Copy link
Owner

Did you set the forward-proxy in your scrapoxy configuration ?

@armenhajian
Copy link

yes, it is set by default.

@fabienvauchelles
Copy link
Owner

can you :
1/ start scrapoxy with 1 instance
2/ telnet the instance on 3128 port (to check if port is accessible) ?

@armenhajian
Copy link

no, can't telnet. I've done researches about AWS ec2 and tried many configurations on security groups but anyway can't telnet.

@fabienvauchelles
Copy link
Owner

@armenhajian that is a AWS configuration problem. Can you try to create an instance manually and access it ?

@armenhajian
Copy link

@fabienvauchelles I've created instance manually and add SSH with port 22 and Custom TCP Rule with port 3128 and source Anywhere in Security Groups but can't nc or telnet to 3128 (but 22 is works).

Can't solve this AWS config problem.

@armenhajian
Copy link

armenhajian commented May 27, 2017

hey @fabienvauchelles, I've solved the problem
just used My IP source on Security group rules and it works fine.
Don't know why AWS blocks the Anywhere source but now all works.

Thanks for this amazing tool.

Cheers

@fabienvauchelles
Copy link
Owner

Nice :)

You're welcome (By the way, do you joined the Slack Community)

@vhatzopoulos
Copy link

I have the exact same issue as the original post. After following the tutorial Droplets are created on digital ocean but they do not appear on the scraproxy GUI.

2017-06-03T09:43:49.176Z - info: [Main] The selected provider is digitalocean
2017-06-03T09:43:49.185Z - debug: [Main] listen
2017-06-03T09:43:49.188Z - info: [Commander] GUI is available at http://localhost:8889
2017-06-03T09:43:49.189Z - debug: [Manager] start
2017-06-03T09:43:49.190Z - info: Proxy is listening at http://localhost:8888
2017-06-03T09:43:59.191Z - debug: [Manager] checkInstances
2017-06-03T09:43:59.839Z - debug: [Manager] adjustInstances: required:1 / actual:0
2017-06-03T09:43:59.839Z - debug: [Manager] adjustInstances: add 1 instances
2017-06-03T09:43:59.840Z - debug: [ProviderDigitalOcean] createInstances: count=1
2017-06-03T09:44:00.360Z - debug: [ProviderDigitalOcean] createInstances: actualCount=1
2017-06-03T09:44:09.230Z - debug: [Manager] checkInstances
2017-06-03T09:44:10.188Z - debug: [Manager] adjustInstances: required:1 / actual:0
2017-06-03T09:44:10.188Z - debug: [Manager] adjustInstances: add 1 instances
2017-06-03T09:44:10.188Z - debug: [ProviderDigitalOcean] createInstances: count=1
2017-06-03T09:44:10.462Z - debug: [ProviderDigitalOcean] createInstances: actualCount=2
2017-06-03T09:44:19.236Z - debug: [Manager] checkInstances
2017-06-03T09:44:20.165Z - debug: [Manager] adjustInstances: required:1 / actual:0
2017-06-03T09:44:20.165Z - debug: [Manager] adjustInstances: add 1 instances
2017-06-03T09:44:20.166Z - debug: [ProviderDigitalOcean] createInstances: count=1
2017-06-03T09:44:20.421Z - debug: [ProviderDigitalOcean] createInstances: actualCount=3
2017-06-03T09:44:20.423Z - error: [Manager] Error: Cannot update or adjust instances: askedInstances=1, security=true

and in the config

 "instance": {
        "port": 3128,
        "scaling": {
            "min": 1,
            "max": 3
        }
    }
"providers": {
        "type": "digitalocean",
"digitalocean": {
            "token": "mytoken",
            "region": "LON1",
            "size": "512mb",
            "sshKeyName": "mykey",
            "imageName": "forward-proxy",
            "maxRunningInstances": 3
        },

@vhatzopoulos
Copy link

Not sure if it is related but also found that this middleware
'scrapoxy.downloadmiddlewares.scale.ScaleMiddleware':

causes this error

 yield runner.crawl(Spider)
TypeError: a bytes-like object is required, not 'str'

@chizzy123
Copy link

HI. I am having the exact same problem. Is this because my instance is in ap-southeast-2 (sydney)
it creates and destroys the instances but can not connect to them..
forward-proxy setup is as follows

3128 | tcp | 0.0.0.0/0

and scraproxy firewall is as follows
8888 | tcp | 0.0.0.0/0
8889 | tcp | 0.0.0.0/0
22| tcp | 0.0.0.0/0

not sure what i am missing to make this work?

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

7 participants