Mitchell Bregman
04/10/2020, 10:28 PMflow.register
but nothing seems to be showing upChris White
04/10/2020, 10:50 PMflow.register
and what URL is printed?
- have you run prefect backend server
to ensure your are pointed to your local server vs. Cloud?Mitchell Bregman
04/10/2020, 10:53 PMprefect backend server
before setting up the prefect local server (i.e. prefect start server
).. When I call flow.register
, this is the result:
$ python <http://flow.py|flow.py>
Result Handler check: OK
Flow: <http://localhost:8080/flow/9a703825-7ade-4d92-afc9-d3f8019bf933>
To note: I exposed port 8080
on AWS so that I can access the URL. On the backend, after running the flow registration, I end up seeing nothing being scheduled, i.e.
scheduler_1 | [2020-04-10 22:49:59,153] INFO - prefect-server.Scheduler | Scheduled 0 flow runs.
scheduler_1 | [2020-04-10 22:49:59,254] DEBUG - prefect-server.Scheduler | Sleeping for 300.0 seconds...
Chris White
04/10/2020, 10:54 PMfrom prefect import Client; c = Client()
print(c.api_server)
print(c.graphql("query{flow{name}}")
Mitchell Bregman
04/10/2020, 10:56 PMPython 3.7.7 (default, Mar 26 2020, 15:48:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from prefect import Client; c = Client()
>>>
>>> print(c.api_server)
<http://localhost:4200/graphql/alpha>
>>> print(c.graphql("query{flow{name}}"))
{'data': {'flow': [{'name': 'ETL'}, {'name': 'ETL'}]}, 'extensions': {'tracing': {'version': 1, 'startTime': '2020-04-10T22:55:38.693Z', 'endTime': '2020-04-10T22:55:38.700Z', 'duration': 6503370, 'execution': {'resolvers': [{'path': ['flow'], 'parentType': 'Query', 'fieldName': 'flow', 'returnType': '[flow!]!', 'startOffset': 145955, 'duration': 6268650}, {'path': ['flow', 0, 'name'], 'parentType': 'flow', 'fieldName': 'name', 'returnType': 'String!', 'startOffset': 6435474, 'duration': 27895}, {'path': ['flow', 1, 'name'], 'parentType': 'flow', 'fieldName': 'name', 'returnType': 'String!', 'startOffset': 6477149, 'duration': 12499}]}}}}
>>>
Chris White
04/10/2020, 10:56 PMMitchell Bregman
04/10/2020, 10:57 PMChris White
04/10/2020, 10:59 PMMitchell Bregman
04/10/2020, 11:00 PMChris White
04/10/2020, 11:01 PMMitchell Bregman
04/10/2020, 11:03 PMtmux
screen and am running the flow in anotherChris White
04/10/2020, 11:04 PMquery{
flow{ name }
}
does anything show up?Mitchell Bregman
04/10/2020, 11:05 PM{
"graphQLErrors": [],
"networkError": {},
"message": "Network error: Failed to fetch"
}
Chris White
04/10/2020, 11:05 PMMitchell Bregman
04/10/2020, 11:06 PMname
gets substituted with ETL
? regardless, same result in that queryChris White
04/10/2020, 11:07 PMMitchell Bregman
04/10/2020, 11:07 PMChris White
04/10/2020, 11:08 PMprefect server start
with no configuration?Mitchell Bregman
04/10/2020, 11:08 PMChris White
04/10/2020, 11:08 PMlocalhost:4200
which isn’t connected to your EC2Mitchell Bregman
04/10/2020, 11:09 PMChris White
04/10/2020, 11:10 PMMitchell Bregman
04/10/2020, 11:13 PM8080
-- do i need to run anything before restarted the server?Chris White
04/10/2020, 11:13 PMMitchell Bregman
04/10/2020, 11:14 PM4201
?Chris White
04/10/2020, 11:15 PMMitchell Bregman
04/10/2020, 11:16 PMChris White
04/14/2020, 5:19 PMlocalhost:4200
on the machine it’s running on, so I believe that is the root cause. @nicholas might have some more insight here though and can confirm / deny my theorynicholas
04/14/2020, 5:30 PM/etc/hosts
file to direct localhost:4200
traffic to your EC2/etc/hosts
file an entry that looks like this:
your.ec2.endpoint localhost:4200
You can do that nicely with this command:
echo 'your.ec2.endpoint localhost:4200' >> /etc/hosts
If you're on Windows, I believe the location of the hosts file is C:\windows\system32\drivers\etc\hosts
Manuel Aristarán
04/14/2020, 8:13 PM/etc/hosts
it’s for name resolution only AFAIK — I’m using socat
for redirecting localhost traffic to my ECS service/etc/hosts
won’t worknicholas
04/14/2020, 9:56 PM/etc/hosts
hack isn't a great solution - working on a PR that will address this!Mary Clair Thompson
04/20/2020, 6:31 PMnicholas
04/20/2020, 6:38 PMChris White
04/20/2020, 6:38 PMMary Clair Thompson
04/20/2020, 6:39 PMMitchell Bregman
04/21/2020, 7:39 PMAdrien Boutreau
05/08/2020, 3:14 PM{
"graphQLErrors": [],
"networkError": {},
"message": "Network error: NetworkError when attempting to fetch resource."
}
nicholas
05/08/2020, 3:21 PMAdrien Boutreau
05/08/2020, 3:22 PM