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

build v0.13.1, report exception #11441

Closed
5 tasks done
zhudemiao opened this issue Dec 7, 2024 · 4 comments
Closed
5 tasks done

build v0.13.1, report exception #11441

zhudemiao opened this issue Dec 7, 2024 · 4 comments
Labels
🐞 bug Something isn't working

Comments

@zhudemiao
Copy link

zhudemiao commented Dec 7, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.13.1

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

make build-api

✔️ Expected Behavior

build successfully

❌ Actual Behavior

report exception:
Step 14/40 : COPY pyproject.toml poetry.lock ./
 ---> b04a92c25834
Step 15/40 : RUN  poetry install --sync --no-cache --no-root
 ---> Running in 088e0657d45f
Creating virtualenv non-package-mode in /app/api/.venv
Installing dependencies from lock file

Package operations: 405 installs, 0 updates, 0 removals

  - Installing frozenlist (1.5.0)
  - Installing idna (3.10)
  - Installing multidict (6.1.0)
  - Installing pycparser (2.22)
  - Installing aiohappyeyeballs (2.4.4)
  - Installing aiosignal (1.3.1)
  - Installing attrs (23.2.0)
  - Installing cffi (1.17.1)
  - Installing charset-normalizer (3.4.0)
  - Installing certifi (2024.8.30)
  - Installing urllib3 (2.2.3)
  - Installing wrapt (1.17.0)
  - Installing yarl (1.9.11)
  - Installing zipp (3.21.0)

  TimeoutError

  The read operation timed out

  at /usr/local/lib/python3.12/ssl.py:1103 in read
      1099│         if self._sslobj is None:
      1100│             raise ValueError("Read on closed or unwrapped SSL socket.")
      1101│         try:
      1102│             if buffer is not None:
    → 1103│                 return self._sslobj.read(len, buffer)
      1104│             else:
      1105│                 return self._sslobj.read(len)
      1106│         except SSLError as x:
      1107│             if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:

The following error occurred when trying to handle this error:


  ReadTimeoutError

  HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

  at /usr/local/lib/python3.12/site-packages/urllib3/response.py:753 in _error_catcher
       749│
       750│             except SocketTimeout as e:
       751│                 # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
       752│                 # there is yet no clean way to get at it from this context.
    →  753│                 raise ReadTimeoutError(self._pool, None, "Read timed out.") from e  # type: ignore[arg-type]
       754│
       755│             except BaseSSLError as e:
       756│                 # FIXME: Is there a better way to differentiate between SSLErrors?
       757│                 if "read operation timed out" not in str(e):

The following error occurred when trying to handle this error:


  ConnectionError

  HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

  at /usr/local/lib/python3.12/site-packages/requests/models.py:826 in generate
       822│                     raise ChunkedEncodingError(e)
       823│                 except DecodeError as e:
       824│                     raise ContentDecodingError(e)
       825│                 except ReadTimeoutError as e:
    →  826│                     raise ConnectionError(e)
       827│                 except SSLError as e:
       828│                     raise RequestsSSLError(e)
       829│             else:
       830│                 # Standard file-like object.

Cannot install yarl.

The command '/bin/sh -c poetry install --sync --no-cache --no-root' returned a non-zero code: 1
make: *** [Makefile:16: build-api] Error 1
@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 7, 2024
Copy link

dosubot bot commented Dec 7, 2024

@zhudemiao 你好! 我是Dosu,一个可以帮你解决问题、回答你的疑问,并且成为贡献者的机器人。有什么我可以帮你的吗?

A similar issue has been discussed in the Dify repository, where a user encountered timeout errors while building a Docker image [1]. Although the discussion is unsolved, it might provide some context or potential leads.

For your specific issue, the timeout error during the poetry install process suggests a network-related problem. Here are some steps you can try to resolve it:

  1. Check Network Connectivity: Ensure that your network connection is stable and that there are no restrictions or firewalls blocking access to files.pythonhosted.org.

  2. Increase Timeout: You can try increasing the timeout for network operations by setting the POETRY_HTTP_TIMEOUT environment variable to a higher value, such as 120.

  3. Use a Proxy: If you're behind a corporate network or firewall, you might need to configure a proxy. Set the HTTP_PROXY and HTTPS_PROXY environment variables with your proxy details.

  4. Retry the Installation: Sometimes, simply retrying the installation can help if the issue was due to a temporary network glitch.

  5. Check for Local Network Issues: Ensure that there are no local network issues, such as DNS problems, that might be causing the timeout.

These steps should help mitigate the timeout errors during the build process.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@zhudemiao
Copy link
Author

if I modify api/Dockerfile from :
RUN poetry install --sync --no-cache --no-root
TO
RUN poetry config repositories.pypi https://pypi.tuna.tsinghua.edu.cn/simple/ && poetry install --sync --no-cache --no-root.
BUT also report error。

@zhudemiao
Copy link
Author

zhudemiao commented Dec 7, 2024

  - Installing mdurl (0.1.2)
  - Installing isodate (0.7.2)
  - Installing packaging (24.2)
  - Installing proto-plus (1.25.0)
  - Installing msal (1.31.1)
  - Installing pyparsing (3.2.0)
  - Installing referencing (0.35.1)
  - Installing requests-oauthlib (2.0.0)
  - Installing portalocker (2.10.1)
  - Installing sniffio (1.3.1)
  - Installing markupsafe (3.0.2)
  - Installing opentelemetry-semantic-conventions (0.49b2)

  TimeoutError

  The read operation timed out

  at /usr/local/lib/python3.12/ssl.py:1103 in read
      1099│         if self._sslobj is None:
      1100│             raise ValueError("Read on closed or unwrapped SSL socket.")
      1101│         try:
      1102│             if buffer is not None:
    → 1103│                 return self._sslobj.read(len, buffer)
      1104│             else:
      1105│                 return self._sslobj.read(len)
      1106│         except SSLError as x:
      1107│             if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:

The following error occurred when trying to handle this error:


  ReadTimeoutError

  HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

  at /usr/local/lib/python3.12/site-packages/urllib3/response.py:753 in _error_catcher
       749│
       750│             except SocketTimeout as e:
       751│                 # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
       752│                 # there is yet no clean way to get at it from this context.
    →  753│                 raise ReadTimeoutError(self._pool, None, "Read timed out.") from e  # type: ignore[arg-type]
       754│
       755│             except BaseSSLError as e:
       756│                 # FIXME: Is there a better way to differentiate between SSLErrors?
       757│                 if "read operation timed out" not in str(e):

The following error occurred when trying to handle this error:


  ConnectionError

  HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

  at /usr/local/lib/python3.12/site-packages/requests/models.py:826 in generate
       822│                     raise ChunkedEncodingError(e)
       823│                 except DecodeError as e:
       824│                     raise ContentDecodingError(e)
       825│                 except ReadTimeoutError as e:
    →  826│                     raise ConnectionError(e)
       827│                 except SSLError as e:
       828│                     raise RequestsSSLError(e)
       829│             else:
       830│                 # Standard file-like object.

Cannot install botocore.

Warning: The file chosen for install of rpds-py 0.22.1 (rpds_py-0.22.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl) is yanked. Reason for being yanked: https://github.com/PyO3/pyo3/issues/4757
The command '/bin/sh -c poetry config repositories.thu https://pypi.tuna.tsinghua.edu.cn/simple/ && poetry install --sync --no-cache --no-root' returned a non-zero code: 1
make: *** [Makefile:16: build-api] Error 1

@crazywoola
Copy link
Member

We do not provide help for building from source code, please figure it out yourself or you can ask help in discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants