Coder Social home page Coder Social logo

ifcb-dashboard's People

Contributors

eepeacock avatar joefutrelle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mapsa

ifcb-dashboard's Issues

Under Vagrant, supervisor workers die because startup runs before /vagrant is mounted

The accession and acquisition workers fail to start when the Vagrant VM boots, because they set their PYTHONPATH to /vagrant, but that occurs during the Ubuntu boot process before /vagrant is mounted.

A workaround is to include this extra provisioning line at the end of Vagrantfile to restart the supervisor workers after /vagrant is mounted:

config.vm.provision :shell, :inline => "sudo supervisorctl restart all", run: "always"

Vagrantfile maps PostgreSQL port

This is mostly useful for debugging and shouldn't be enabled in a production environment; it should be commented out with a reasonable explanation.

multithreaded workflow service does not handle concurrency

the workflow service configuration includes this stanza:

WSGIDaemonProcess workflow threads=6

Typical operations against the workflow service cause IntegrityError exceptions, which are not handled properly, and result in ORM sessions getting into unrecoverable states.

This is especially a problem for accession.

A workaround is simply to set threads to 1, and that should be done immediately. Long-term there needs to be a solution where concurrency works. I believe the bug was introduced when switching from SQLite to PostgreSQL, which have differing concurrency behaviors.

Packages missing

/var/log/apache2/error.log complains about missing packages, stating "Target WSGI script /vagrant/dashboard.wsgi cannot be loaded as Python Module.

Workaround
pip install emails
pip install email_validator
service apache2 restart

pyOpenSSL error

Python is completely broken if pyOpenSSL is installed:

sudo python -m easy_install --upgrade pyOpenSSL

I commented this line but there are still errors with missing dependencies (email_validator and emails already reported in a previous issue). Even if you try to install them after the machine was created gives some errors.

Any help appreciated.

Dashboard not functioning properly - errors with dashboard.wsgi

This error appears every time I try loading the dashboard.

[Wed May 20 06:18:15.509757 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] mod_wsgi (pid=66): Exception occurred processing WSGI script '/vagrant/dashboard.wsgi'.
[Wed May 20 06:18:15.509802 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] Traceback (most recent call last):
[Wed May 20 06:18:15.509823 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1836, in call
[Wed May 20 06:18:15.510232 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] return self.wsgi_app(environ, start_response)
[Wed May 20 06:18:15.510248 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
[Wed May 20 06:18:15.510268 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] response = self.make_response(self.handle_exception(e))
[Wed May 20 06:18:15.510278 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
[Wed May 20 06:18:15.510291 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] reraise(exc_type, exc_value, tb)
[Wed May 20 06:18:15.510298 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
[Wed May 20 06:18:15.510309 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] response = self.full_dispatch_request()
[Wed May 20 06:18:15.510316 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
[Wed May 20 06:18:15.510326 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] rv = self.handle_user_exception(e)
[Wed May 20 06:18:15.510332 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
[Wed May 20 06:18:15.510342 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] reraise(exc_type, exc_value, tb)
[Wed May 20 06:18:15.510348 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
[Wed May 20 06:18:15.510358 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] rv = self.dispatch_request()
[Wed May 20 06:18:15.510364 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
[Wed May 20 06:18:15.510388 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] return self.view_functionsrule.endpoint
[Wed May 20 06:18:15.510399 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] File "/vagrant/oii/ifcb2/dashboard/app.py", line 537, in nearest
[Wed May 20 06:18:15.510734 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] resp = canonicalize_bin(bin)
[Wed May 20 06:18:15.510754 2020] [wsgi:error] [pid 66:tid 139854026680064] [remote 172.17.0.1:37964] UnboundLocalError: local variable 'bin' referenced before assignment

If I click on Metrics or other links next to View, I receive an Internal Server Error message with a similar error message in error.logs

local variable 'b' referenced before assignment

Service status no longer reported correctly in bin/do/do_wait.sh

In Xenial, service status is no longer reported the same way, so do_wait.sh is completely broken.

New status output looks like this:

* postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2017-03-28 16:40:58 UTC; 4min 15s ago
  Process: 749 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 749 (code=exited, status=0/SUCCESS)

Mar 28 16:40:23 vagrant systemd[1]: Starting PostgreSQL RDBMS...
Mar 28 16:40:23 vagrant systemd[1]: Started PostgreSQL RDBMS.
Mar 28 16:40:58 vagrant systemd[1]: Stopped PostgreSQL RDBMS.
Mar 28 16:43:11 vagrant systemd[1]: Stopped PostgreSQL RDBMS.

looks easier to parse, should be easy fix.

fix /etc/fstab instructions in documentation

Using sudo cat to modify /etc/fstab results in permission denied. I fixed this by using this instead, but it might be overkill:

sudo bash -c 'cat < /etc/fstab/ <<EOF
//{path-to-mount} /mnt/ifcb cifs username={username},password={password} 0 0
EOF'

ORM initialization and session management out of sync

In the before_first_request hook of the dashboard app, the ORM is initialized, and then on the first request a session is used to query against the ORM which throws up errors that the tables in the ORM schema don't exist.

The session is probably stale and needs to be refreshed after the metadata.create_all call, because if I just restart Apache everything works on restart, which means there's nothing wrong with the way the session is set up except maybe the order of execution.

permissions issue with interactive backend tools

The behavior is that interactive backend tools will not run, giving a permissions error. This may be platform-specific as it has been observed on a Mac. It likely results from git's behavior during cloning.

A potential workaround is to set permissions on those scripts during provisioning.

support trusty32 box

The trusty32 box apparently has a different directory layout (no /vagrant directory) so the provisioning script fails if you just change the box to trusty32. That could be addressed in several ways including making a separate Vagrantfile, or making the provisioning section "smart" and have it detect which directory layout is in use.

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.