Giter Club home page Giter Club logo

bitchan's People

Contributors

813492291816 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bitchan's Issues

SQLAlchemy 1.4.0 breakage

The issue in brief

Presently (2021-03-31) virgin docker builds result in a broken system. The key symptom is 502 Bad Gateway in nginx, but the actual cause is in the bitchan container. Root cause is a recent, incompatible version of SQLAlchemy being installed by default. Tentative fix is to pin SQLAlchemy version lower than the broken one.

Relevant log fragment:

docker logs bitchan

[2021-03-31 20:55:43 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2021-03-31 20:55:43 +0000] [1] [INFO] Listening at: unix:/usr/local/bitchan/bitchan.sock (1)
[2021-03-31 20:55:43 +0000] [1] [INFO] Using worker: sync
[2021-03-31 20:55:43 +0000] [8] [INFO] Booting worker with pid: 8
[2021-03-31 20:55:48 +0000] [8] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/bitchan/bitchan_flask.py", line 20, in <module>
    db.create_all()
  File "/usr/local/lib/python3.7/dist-packages/flask_sqlalchemy/__init__.py", line 1039, in create_all
    self._execute_for_all_tables(app, bind, 'create_all')
  File "/usr/local/lib/python3.7/dist-packages/flask_sqlalchemy/__init__.py", line 1031, in _execute_for_all_tables
    op(bind=self.get_engine(app, bind), **extra)
  File "/usr/local/lib/python3.7/dist-packages/flask_sqlalchemy/__init__.py", line 962, in get_engine
    return connector.get_engine()
  File "/usr/local/lib/python3.7/dist-packages/flask_sqlalchemy/__init__.py", line 555, in get_engine
    options = self.get_options(sa_url, echo)
  File "/usr/local/lib/python3.7/dist-packages/flask_sqlalchemy/__init__.py", line 570, in get_options
    self._sa.apply_driver_hacks(self._app, sa_url, options)
  File "/usr/local/lib/python3.7/dist-packages/flask_sqlalchemy/__init__.py", line 914, in apply_driver_hacks
    sa_url.database = os.path.join(app.root_path, sa_url.database)
AttributeError: can't set attribute
[2021-03-31 20:55:49 +0000] [8] [INFO] Worker exiting (pid: 8)
[2021-03-31 20:55:49 +0000] [1] [INFO] Shutting down: Master
[2021-03-31 20:55:49 +0000] [1] [INFO] Reason: Worker failed to boot.

Discussion and tentative fix

See https://stackoverflow.com/questions/66663963/flask-sqlalchemy-attributeerror-cant-set-attribute

Adding the following line at the top of requirements.txt fixed the problem for me:
SQLAlchemy<1.4.0

It's not an elegant nor future-proof solution, but it works around an upstream bug until it's fixed.

docker.io not found

While trying to install bitchan on whonix I had this message:

user@host:~$ sudo apt install build-essential docker.io docker-compose git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker.io is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker.io' has no installation candidate

Is there anything I can do?

Denied pull

Arch derivative gives the following error:

sudo docker-compose up --build -d  1 ✘  11.10.1 
[+] Running 0/2
⠿ bitchan_daemon Error 5.5s
⠿ bitchan_flask Error 5.5s
Error response from daemon: pull access denied for app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.