Сергей Романкевич
08/10/2021, 5:19 AMrsv@srv-etl:~/flow$ /bin/python /home/rsv@comandor.local/flow/Test.py
Traceback (most recent call last):
File "/home/rsv@comandor.local/flow/Test.py", line 13, in <module>
flow.register(project_name='Test')
File "/usr/local/lib/python3.7/dist-packages/prefect/core/flow.py", line 1734, in register
idempotency_key=idempotency_key,
File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 1081, in register
project = self.graphql(query_project).data.project # type: ignore
File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 534, in graphql
retry_on_api_error=retry_on_api_error,
File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 452, in post
retry_on_api_error=retry_on_api_error,
File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 696, in _request
session=session, method=method, url=url, params=params, headers=headers
File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 605, in _send_request
response.raise_for_status()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 407 Client Error: Proxy Authentication Required for url: <http://localhost:4200/graphql>
"config_overrides": {},
"env_vars": [],
"system_information": {
"platform": "Linux-4.19.0-14-amd64-x86_64-with-debian-10.8",
"prefect_backend": "server ",
" prefect_version ":" 0.15.0 ",
" python_version ":" 3.7.3 "
Test.py
from prefect import task, Flow, Parameter
@task(log_stdout=True)
def say_hello(name):
print("Hello, {}!".format(name))
with Flow("My First Flow") as flow:
name = Parameter('name')
say_hello(name)
flow.register(project_name='Test')
Kevin Kho
08/10/2021, 1:43 PMnicholas
08/10/2021, 2:54 PMСергей Романкевич
08/10/2021, 3:47 PM[Unit]
Description = Prefect
[Service]
ExecStart = / usr / local / bin / prefect server start --no-postgres-port --use- volume
ExecStop = / usr / local / bin / prefect server stop
[Install]
WantedBy = multi-user.target
Prefect agent
[Unit]
Description = prefect-agent
[Service]
ExecStart = / usr / local / bin / prefect agent local start - -api http: //srv-etl.comandor.local: 4200
[Install]
WantedBy = multi-user.target
/tmp/flows/test.py is on the same Debian server. I run test.py in console through remote ssh visual studio code
prefect config
"debug": false,
"home_dir": "/home/rsv@comandor.local/.prefect",
"backend": "server",
"server": {
"host": "<http://localhost>",
"port": 4200,
"host_port": 4200,
"endpoint": "<http://localhost:4200>",
"database": {
"host": "localhost",
"port": 5432,
"host_port": 5432,
"name": "prefect_server",
"username": "prefect",
"password": "test-password",
"connection_url": "<postgresql://prefect>:test-password@localhost:5432/prefect_server",
"volume_path": "/home/rsv@comandor.local/.prefect/pg_data"
},
"graphql": {
"host": "0.0.0.0",
"port": 4201,
"host_port": 4201,
"debug": false,
"path": "/graphql/"
},
"hasura": {
"host": "localhost",
"port": 3000,
"host_port": 3000,
"admin_secret": "",
"claims_namespace": "hasura-claims",
"graphql_url": "<http://localhost:3000/v1alpha1/graphql>",
"ws_url": "<ws://localhost:3000/v1alpha1/graphql>",
"execute_retry_seconds": 10
},
"ui": {
"host": "<http://localhost>",
"port": 8080,
"host_port": 8080,
"endpoint": "<http://localhost:8080>",
"apollo_url": "<http://localhost:4200/graphql>"
}
nicholas
08/10/2021, 4:19 PMСергей Романкевич
08/10/2021, 4:28 PMnicholas
08/10/2021, 4:29 PMСергей Романкевич
08/10/2021, 4:31 PMnicholas
08/11/2021, 3:04 PM