Hi everyone! After updating the server to version ...
# prefect-server
с
Hi everyone! After updating the server to version 15, I cannot register new flows. The server itself works fine and executes the already registered flows. When I try to run the code, I get the following error: requests.exceptions.HTTPError: 407 Client Error: Proxy Authentication Required for url: http: // localhost: 4200 / graphql How can I solve this error?
Copy code
rsv@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
Copy code
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')
k
Hey @Сергей Романкевич, will ask the team about this and get back to you.
n
Hi @Сергей Романкевич - can you help me understand your setup? That's an error code that's coming from a proxy you have setup between your machine and wherever Prefect Server is running
с
Thanks for your support, I was getting desperate.  Prefect was installed as standard pip install prefect on the Debian server under root  Prefect server was started by systemd service
Copy code
[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
Copy code
[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
Copy code
"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>"
        }
n
Do you have any VPN/Proxy set up for your network that might block requests? The 407 error isn't something I've seen thrown from Server before, since it requires no authentication
с
Let me clarify this question with colleagues from the network department tomorrow
n
Ok let us know what you find 👍
с
Thank you very much
@nicholas The main secret of help is in your correctly asked question! Thank you for the clue! It turned out that the reason of the error was that instead of http://localhost:4200 I should have specified the exact ip adress. Thank you so much! It's working now. Best regards from Siberia
n
Amazing, thanks for the update!