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

Builds sometimes work, sometimes not (with no changes to anything). It seems random. #2271

Closed
ttmc opened this issue Jun 21, 2016 · 18 comments
Closed
Labels
Needed: more information A reply from issue author is required

Comments

@ttmc
Copy link

ttmc commented Jun 21, 2016

Details

Expected Result

Build Passed

Actual Result

Build Failed or Build Passed. It's impossible to predict which will happen.

Our "solution" has been to just keep doing the build until it passes. That is silly. The failed builds always seem to be caused by the same thing. Here's example output from a failed build:

Installing collected packages: requests, readthedocs-sphinx-ext, pytz
  Found existing installation: requests 2.9.0
    Uninstalling requests-2.9.0:
      Successfully uninstalled requests-2.9.0
  Found existing installation: readthedocs-sphinx-ext 0.5.4
    Uninstalling readthedocs-sphinx-ext-0.5.4:
      Successfully uninstalled readthedocs-sphinx-ext-0.5.4
  Running setup.py install for readthedocs-sphinx-ext: started
    Running setup.py install for readthedocs-sphinx-ext: finished with status 'done'
  Found existing installation: pytz 2015.7
    Uninstalling pytz-2015.7:
      Successfully uninstalled pytz-2015.7
Successfully installed pytz readthedocs-sphinx-ext requests
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/__init__.py", line 221, in main
    return command.main(cmd_args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/basecommand.py", line 252, in main
    pip_version_check(session)
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/utils/outdated.py", line 102, in pip_version_check
    installed_version = get_installed_version("pip")
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/utils/__init__.py", line 848, in get_installed_version
    working_set = pkg_resources.WorkingSet()
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 619, in __init__
    self.add_entry(entry)
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 675, in add_entry
    for dist in find_distributions(entry, True):
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1942, in find_eggs_in_zip
    if metadata.has_metadata('PKG-INFO'):
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1463, in has_metadata
    return self.egg_info and self._has(self._fn(self.egg_info, name))
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1824, in _has
    return zip_path in self.zipinfo or zip_path in self._index()
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1704, in zipinfo
    return self._zip_manifests.load(self.loader.archive)
  File "/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1644, in load
    mtime = os.stat(path).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/bigchaindb/envs/latest/lib/python3.4/site-packages/pytz-2015.7-py3.4.egg'

It can't find some file associated with pytz (World Timezone Definitions for Python).

@agjohnson
Copy link
Contributor

Sounds like this is an issue of one or more of the virtualenvs having out of date dependencies? Have you tried wiping the versions from the admin dashboard?

@agjohnson agjohnson reopened this Jun 24, 2016
@agjohnson agjohnson added the Support Support question label Jun 24, 2016
@ttmc
Copy link
Author

ttmc commented Jul 4, 2016

I wiped the "latest" version but builds of that version still fail randomly.

@agjohnson
Copy link
Contributor

Is this still an issue? I haven't seen any other cases of this happening, but I'm at a loss as to what this is if it is still an issue.

@ttmc ttmc closed this as completed Feb 14, 2017
@agjohnson agjohnson removed the Support Support question label Feb 14, 2017
@stuartaccent
Copy link

hi, have been seeing this loads recently. No idea what causing it but noticed someone else doing something to try to fix it. I have replicated the same thing and so far it seems ok.

Build is from using virtualenv and setup.py.

This is the commit ive added to try to fix it AccentDesign/wagtailstreamforms@c486de3

My latest seems to build fine with this and stable still randomly fails. So though i have no idea what the cause is, it seems to help :)

Not much use but you may get some insight.

the error is when it tries to install the package, says its not there:

FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/wagtailstreamforms/envs/stable/lib/python3.5/site-packages/wagtailstreamforms-1.2.0-py3.5.egg'

Stu

@RichardLitt
Copy link
Member

Thanks @stuartaccent. @agjohnson Not sure if this is the same issue, looking at it. It might make sense to open a new one for tracking this.

@RichardLitt RichardLitt reopened this Oct 21, 2017
@humitos
Copy link
Member

humitos commented Dec 28, 2017

Some work has been done in the build code in the last months and errors should be reported in a better way also. I'd like to know if you are still experience these errors and in what projects/builds/versions etc so we can try to reproduce them and fix them.

Otherwise, please close the issue. Thanks!

@ttmc
Copy link
Author

ttmc commented Jan 4, 2018

@stuartaccent Are you still having that problem? Can we close this issue?

@humitos humitos added the Needed: more information A reply from issue author is required label Jan 4, 2018
@shubham76
Copy link
Contributor

Hello! I faced the similar issue when I tried doing it locally.
I tried building a sample template repository doc forking it into my account.
It fails to build even after trying 4-5 times.
It gives OSError: [Errno 2] No such file or directory
What should be done?

(I am a newbie here and trying to learn the project so that I could contribute. Thanks for your help!)

@humitos
Copy link
Member

humitos commented Feb 19, 2018

@shubham76 can you provide more information regarding the steps you are following?

Besides, are you able to build completely one/another project without errors and see the docs?

@shubham76
Copy link
Contributor

shubham76 commented Feb 20, 2018

@humitos

can you provide more information regarding the steps you are following?

I tried running it on a different port. I go to my projects->click on import our own projects for demo
Now the expected result is 'build is successful'. But it doesn't happen. it says it's building and it's stuck! It shows the build is triggered.

Besides, are you able to build completely one/another project without errors and see the docs?

No. I couldn't build a single project yet.

I tried changing the port as it was suggested in "Installation Guide".
I did it by going to readthedocs.org/settings/dev.py. (Although it says file name as 'local_settings.py' in installation guide.) & then running command python manage.py runserver 127.0.0.1:8888 .

@shubham76
Copy link
Contributor

@humitos Do I need to have Github account connected before building the project?
In that case, I am not able to connect to my Github account in localhost.
I am getting this as error: SocialApp matching query does not exist.
What do you think is the problem?

@stsewd
Copy link
Member

stsewd commented Feb 21, 2018

@shubham76 You don't need to setup the social account part for building a project :)

@shubham76
Copy link
Contributor

@stsewd

[20/Feb/2018 22:55:05] readthedocs.doc_builder.environments:117[8970]: INFO Running: 'pdflatex -interaction=nonstopmode /home/shubham/virtualenv/rtd/checkouts/readthedocs.org/user_builds/shubham-demo/checkouts/stable/docs/_build/latex/ReadtheDocsTemplate.tex' [/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/user_builds/shubham-demo/checkouts/stable/docs/_build/latex]
[20/Feb/2018 22:55:06] "POST /api/v2/command/ HTTP/1.1" 201 764
[20/Feb/2018 22:55:06] readthedocs.doc_builder.environments:463[8970]: WARNING (Build) [shubham-demo:stable] Command pdflatex -interaction=nonstopmode /home/shubham/virtualenv/rtd/checkouts/readthedocs.org/user_builds/shubham-demo/checkouts/stable/docs/_build/latex/ReadtheDocsTemplate.tex failed:
Traceback (most recent call last):
  File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/doc_builder/environments.py", line 151, in run
    env=environment,
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Also,

`Traceback (most recent call last):
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/celery/app/trace.py", line 374, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 1067, in sync_callback
    update_search(version_pk, commit=commit)
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/celery/local.py", line 191, in __call__
    return self._get_current_object()(*a, **kw)
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/celery/app/task.py", line 380, in __call__
    return self.run(*args, **kwargs)
  File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 780, in update_search
    delete=delete_non_commit_files,
  File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/restapi/utils.py", line 118, in index_search_request
    'weight': project_scale,
  File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/search/indexes.py", line 156, in index_document
    self.es.index(**kwargs)
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 254, in index
    _make_path(index, doc_type, id), params=params, body=body)
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 85, in perform_request
    raise ConnectionError('N/A', str(e), e)
ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f3d40e29950>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f3d40e29950>: Failed to establish a new connection: [Errno 111] Connection refused)

I am getting these errors while buildiing any sample demo project. I also tried changing the ports as it was suggested in installation guide.
Please help me through this.
Thanks :)

@stsewd
Copy link
Member

stsewd commented Feb 21, 2018

@shubham76 I think the first error is because some missing libs for pdf compilation, you can try uncheccking the pdf and epub generation on the advanced settings of the project and see if the build success.

The other problem is because elastic search is missing, but that's "normal", nothing that makes the build to fail.

@shubham76
Copy link
Contributor

@stsewd Yes. That was the problem. I unchecked PDF & EPUB options in advanced settings.
It is working now. Thank you :)

@agjohnson
Copy link
Contributor

Closing this due to inactivity on the question raised by @stuartaccent. Unrelated discussion can be brought to a new ticket.

@kripnerl
Copy link

I am experiencing the same error with https://readthedocs.org/projects/pleque/
It seems it is triggered due to the use of pkg_resources. There are two possibilities of the build :

  • First is initiated by git clone https://github.com/kripnerl/pleque.git . and it passes.
  • Second is initiated by git remote set-url origin https://github.com/kripnerl/pleque.gitand it raises:
git remote set-url origin https://github.com/kripnerl/pleque.git
git fetch --tags --prune
git checkout --force origin/doc2
git clean -d -f -f
git branch -r
python3.5 -mvirtualenv --system-site-packages --no-download /home/docs/checkouts/readthedocs.org/user_builds/pleque/envs/doc2
Using base prefix '/usr'
New python executable in /home/docs/checkouts/readthedocs.org/user_builds/pleque/envs/doc2/bin/python3.5
Not overwriting existing python script /home/docs/checkouts/readthedocs.org/user_builds/pleque/envs/doc2/bin/python (you must use /home/docs/checkouts/readthedocs.org/user_builds/pleque/envs/doc2/bin/python3.5)
Installing setuptools, pip, wheel...
  Complete output from command /home/docs/checkouts...s/doc2/bin/python3.5 - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 26, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 27, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
  File "/usr/local/lib/python3.5/dist-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
AttributeError: '_NamespacePath' object has no attribute 'sort'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 2328, in <module>
    main()
  File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 945, in create_environment
    download=download,
  File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/docs/checkouts...s/doc2/bin/python3.5 - setuptools pip wheel failed with error code 1
Command time: 1s Return: 1

@stsewd
Copy link
Member

stsewd commented Oct 28, 2018

@kripnerl please see #4808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: more information A reply from issue author is required
Projects
None yet
Development

No branches or pull requests

8 participants