Hi all, I got this error returned from client.regi...
# ask-community
e
Hi all, I got this error returned from client.register() with prefect==0.15.9: expected one of the values edge_pkey for type "edge_constraint", but found "edge_flow_id_task_ids_key". what does it mean?
k
Hi @E Li, I’m not sure. Could you show me a code sample here?
e
hi Kevin, i am not sure if this is related to the server i set up -- linux machine with prefect images. In interactive API, i see core_version = 0.15.7, and when i start agent, i see the agent is running with 0.15.9, which version should i have on my local?
linux has prefect==0.15.9
k
I don’t think the local version should matter. Registration should work for all versions. But in general, agent version must be higher than flow registration version
e
ok, 'cause flow.run() works fine, i suspect it's something related to version, maybe i should try 0.15.7 for flow registration
k
Why are you using
client.register()
instead of
flow.register()
?
e
how do i specify server and port with flow.register()?
k
If you do
prefect backend server
and set your
config.toml
to point to the server API,
flow.register()
will use that API endpoiunt
The bottom of this blog shows how to point to Server
e
thank you, will check that out
hi Kevin, I have server and UI up and running, but got this error when registering: ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it, any thoughts?
i am using flow.register() and my machine's IP in config.toml
k
Yeah did you start your server with the expose flag?
prefect server start --expose
e
ah no
permission denied
k
Docker denied it? What is the error?
e
Traceback (most recent call last):  File "/home/monjuu-g/miniconda3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen    httplib_response = self._make_request(  File "/home/monjuu-g/miniconda3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request    conn.request(method, url, **httplib_request_kw)  File "/home/monjuu-g/miniconda3/lib/python3.8/http/client.py", line 1255, in request    self._send_request(method, url, body, headers, encode_chunked)  File "/home/monjuu-g/miniconda3/lib/python3.8/http/client.py", line 1301, in _send_request    self.endheaders(body, encode_chunked=encode_chunked)  File "/home/monjuu-g/miniconda3/lib/python3.8/http/client.py", line 1250, in endheaders    self._send_output(message_body, encode_chunked=encode_chunked)  File "/home/monjuu-g/miniconda3/lib/python3.8/http/client.py", line 1010, in _send_output    self.send(msg)  File "/home/monjuu-g/miniconda3/lib/python3.8/http/client.py", line 950, in send    self.connect()  File "/home/monjuu-g/miniconda3/lib/python3.8/site-packages/docker/transport/unixconn.py", line 30, in connect    sock.connect(self.unix_socket) PermissionError: [Errno 13] Permission denied
k
So
prefect server start
works but
prefect server start --expose
does not to start the server? This error looks like Docker is off?
e
prefect server start doesn;t work either
same error
so i did docker-compose up and docker-compose start
k
Did
docker-compose start
give you errors also?
e
no, they work fine
k
You are on ubuntu right?
e
no, on red hat
k
What happens if you do
docker run hello-world
?
e
unable to find the image "hello-world:latest' locally
i did docker pull to get the images i need, like ui/graphql/server/etc
k
Is the docker service running?
sudo service docker status
Actually ignore the last command it didnt work for me. Try
docker info
e
ok, that returns info
Containers: 12 Running: 6 Paused: 0 Stopped: 6 Images: 10 Server Version: 1.13.1 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: journald Cgroup Driver: systemd Plugins: Volume: local Network: bridge host macvlan null overlay Authorization: rhel-push-plugin Swarm: active NodeID: siyqi5sja5oqee5f8egsx37j5 Is Manager: true ClusterID: juqa0vbb8n81rr2k2py8krh7f Managers: 1 Nodes: 2 Orchestration:  Task History Retention Limit: 5 Raft:  Snapshot Interval: 10000  Number of Old Snapshots to Retain: 0  Heartbeat Tick: 1  Election Tick: 3 Dispatcher:  Heartbeat Period: 5 seconds CA Configuration:  Expiry Duration: 3 months Node Address: 10.65.0.202 Manager Addresses:   10.65.0.202:2377 Runtimes: docker-runc runc Default Runtime: docker-runc Init Binary: /usr/libexec/docker/docker-init-current containerd version: (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1) runc version: 66aedde759f33c190954815fb765eedc1d782dd9 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f) init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574) Security Options: seccomp  WARNING: You're not using the default seccomp profile  Profile: /etc/docker/seccomp.json userns Kernel Version: 3.10.0-1160.45.1.el7.x86_64 Operating System: Red Hat Enterprise Linux OSType: linux Architecture: x86_64 Number of Docker Hooks: 3 CPUs: 8 Total Memory: 62.4 GiB Name: eun027811 ID: 4EJHFEXUSQGB5TPDPVACULOXN5VPPQDGBZC64DVPX7H4:TNVB Docker Root Dir: /container/32875.1200751 Debug Mode (client): false Debug Mode (server): false
k
I think you need to add the permissions like this, but note there are security considerations. You can look in the links at the bottom of this Stackoverflow post
e
hi Kevin, i made it work with docker swarm for now. i am able to register the flow, but can't find it on FLOWS tab, i can only find it by look up for flow id in search box. and when the job is completed, i don't see the logs and the state of task runs are all blank
k
Could you show me a screen shot of what you see on the flow run page?
Can you try using the Interactive and API and see if it works? It sounds like you might have issues connecting to the API?
e
sorry i was caught on a call, i attached 2 s/s of what i see on UI
i realized i don't see containers for apollo when running docker container ls, you think that might be the issue?
k
yeah there is something wrong with retrieving stuff from the API I think. If you track the console, maybe you will find API errors?
e
where is it located?
k
the console? I mean try using your browser and then “Inspecting” the page and then you might see the errors
e
yeah, i see it's Graphql execution errors for all flow-related queries, i double checked the graphql service, it's up and running though