# I then got rid of those with docker stop $(docker ps -aq) and docker rm $(docker ps -aq)
# I tried building the server using 3.10, but "book" would not build -- it requires 3.11
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ docker compose --profile basic up -d db
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_SERVER" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_LOGIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
[+] Running 1/1
✔ Container rs-db-1 Started 0.3s
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ docker compose run rsmanage rsmanage initdb
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_SERVER" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_LOGIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
INFO - 2024-07-09 01:36:54,394 - Settings - Error path is /usr/books/tickets
You may want to define the DC_DEV_DBURL environment variable
You may want to define the DC_DBURL environment variable
Using configuration: development
Using database: runestone_dev
Checking database connection
postgresql+asyncpg://runestone:runestone@db/runestone_dev
Database connection successful
You may want to define the DC_DEV_DBURL environment variable
You may want to define the DC_DBURL environment variable
Initializing the database
/usr/local/lib/python3.10/site-packages/pydantic/main.py:308: UserWarning: Pydantic serializer warnings:
Expected `bool` but got `ColumnDefault` - serialized value may not be as expected
return self.__pydantic_serializer__.to_python(
ERROR - 2024-07-09 01:36:56,546 - read_key - No Key file is found will default to settings.jwt_secret
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ alembic stamp head
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running stamp_revision -> 526d79dc9a8f
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ docker compose --profile basic up
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_SERVER" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_LOGIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
[+] Running 8/8
✔ Container rs-redis-1 Created 0.1s
✔ Container rs-jobe-1 Created 0.1s
✔ Container rs-rsmanage-1 Created 0.1s
✔ Container rs-db-1 Running 0.0s
✔ Container rs-assignment-1 Created 0.1s
✔ Container rs-book-1 Created 0.1s
✔ Container rs-runestone-1 Created 0.1s
✔ Container rs-nginx-1 Created 0.1s
Attaching to assignment-1, book-1, db-1, jobe-1, nginx-1, redis-1, rsmanage-1, runestone-1
redis-1 | 1:C 09 Jul 2024 01:38:32.637 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1 | 1:C 09 Jul 2024 01:38:32.637 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1 | 1:C 09 Jul 2024 01:38:32.637 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-1 | 1:M 09 Jul 2024 01:38:32.638 * monotonic clock: POSIX clock_gettime
redis-1 | 1:M 09 Jul 2024 01:38:32.638 * Running mode=standalone, port=6379.
redis-1 | 1:M 09 Jul 2024 01:38:32.638 # Server initialized
redis-1 | 1:M 09 Jul 2024 01:38:32.638 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see
https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-1 | 1:M 09 Jul 2024 01:38:32.638 * Ready to accept connections
jobe-1 | [Tue Jul 09 01:38:33.013469 2024] [core:warn] [pid 8] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
jobe-1 | [Tue Jul 09 01:38:33.015928 2024] [mpm_prefork:notice] [pid 8] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
jobe-1 | [Tue Jul 09 01:38:33.015946 2024] [core:notice] [pid 8] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
rsmanage-1 exited with code 0
nginx-1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx-1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx-1 | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx-1 | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
nginx-1 | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx-1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: using the "epoll" event method
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: nginx/1.25.3
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: OS: Linux 5.15.0-113-generic
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: start worker processes
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: start worker process 28
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: start worker process 29
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: start worker process 30
nginx-1 | 2024/07/09 01:38:33 [notice] 1#1: start worker process 31
runestone-1 | [2024-07-09 01:38:33 +0000] [9] [DEBUG] Current configuration:
runestone-1 | config: ./
gunicorn.conf.pyrunestone-1 | wsgi_app: None
runestone-1 | bind: ['
0.0.0.0:8112']
runestone-1 | backlog: 2048
runestone-1 | workers: 3
runestone-1 | worker_class: sync
runestone-1 | threads: 1
runestone-1 | worker_connections: 1000
runestone-1 | max_requests: 0
runestone-1 | max_requests_jitter: 0
runestone-1 | timeout: 30
runestone-1 | graceful_timeout: 30
runestone-1 | keepalive: 2
runestone-1 | limit_request_line: 4094
runestone-1 | limit_request_fields: 100
runestone-1 | limit_request_field_size: 8190
runestone-1 | reload: False
runestone-1 | reload_engine: auto
runestone-1 | reload_extra_files: []
runestone-1 | spew: False
runestone-1 | check_config: False
runestone-1 | print_config: False
runestone-1 | preload_app: False
runestone-1 | sendfile: None
runestone-1 | reuse_port: False
runestone-1 | chdir: /usr/src/app
runestone-1 | daemon: False
runestone-1 | raw_env: []
runestone-1 | pidfile: None
runestone-1 | worker_tmp_dir: None
runestone-1 | user: 0
runestone-1 | group: 0
runestone-1 | umask: 0
runestone-1 | initgroups: False
runestone-1 | tmp_upload_dir: None
runestone-1 | secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
runestone-1 | forwarded_allow_ips: ['127.0.0.1']
runestone-1 | accesslog: None
runestone-1 | disable_redirect_access_to_syslog: False
runestone-1 | access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
runestone-1 | errorlog: -
runestone-1 | loglevel: debug
runestone-1 | capture_output: False
runestone-1 | logger_class: gunicorn.glogging.Logger
runestone-1 | logconfig: None
runestone-1 | logconfig_dict: {}
runestone-1 | logconfig_json: None
runestone-1 | syslog_addr: udp://localhost:514
runestone-1 | syslog: False
runestone-1 | syslog_prefix: None
runestone-1 | syslog_facility: user
runestone-1 | enable_stdio_inheritance: False
runestone-1 | statsd_host: None
runestone-1 | dogstatsd_tags:
runestone-1 | statsd_prefix:
runestone-1 | proc_name: None
runestone-1 | default_proc_name: rsptx.web2py_server.wsgihandler:application
runestone-1 | pythonpath: None
runestone-1 | paste: None
runestone-1 | on_starting: <function OnStarting.on_starting at 0x7f829787ce50>
runestone-1 | on_reload: <function OnReload.on_reload at 0x7f829787cf70>
runestone-1 | when_ready: <function WhenReady.when_ready at 0x7f829787d090>
runestone-1 | pre_fork: <function Prefork.pre_fork at 0x7f829787d1b0>
runestone-1 | post_fork: <function Postfork.post_fork at 0x7f829787d2d0>
runestone-1 | post_worker_init: <function PostWorkerInit.post_worker_init at 0x7f829787d3f0>
runestone-1 | worker_int: <function WorkerInt.worker_int at 0x7f829787d510>
runestone-1 | worker_abort: <function WorkerAbort.worker_abort at 0x7f829787d630>
runestone-1 | pre_exec: <function PreExec.pre_exec at 0x7f829787d750>
runestone-1 | pre_request: <function PreRequest.pre_request at 0x7f829787d870>
runestone-1 | post_request: <function PostRequest.post_request at 0x7f829787d900>
runestone-1 | child_exit: <function ChildExit.child_exit at 0x7f829787da20>
runestone-1 | worker_exit: <function WorkerExit.worker_exit at 0x7f829787db40>
runestone-1 | nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7f829787dc60>
runestone-1 | on_exit: <function OnExit.on_exit at 0x7f829787dd80>
runestone-1 | ssl_context: <function NewSSLContext.ssl_context at 0x7f829787dea0>
runestone-1 | proxy_protocol: False
runestone-1 | proxy_allow_ips: ['127.0.0.1']
runestone-1 | keyfile: None
runestone-1 | certfile: None
runestone-1 | ssl_version: 2
runestone-1 | cert_reqs: 0
runestone-1 | ca_certs: None
runestone-1 | suppress_ragged_eofs: True
runestone-1 | do_handshake_on_connect: False
runestone-1 | ciphers: None
runestone-1 | raw_paste_global_conf: []
runestone-1 | strip_header_spaces: False
runestone-1 | [2024-07-09 01:38:33 +0000] [9] [INFO] Starting gunicorn 21.2.0
runestone-1 | [2024-07-09 01:38:33 +0000] [9] [DEBUG] Arbiter booted
runestone-1 | [2024-07-09 01:38:33 +0000] [9] [INFO] Listening at:
http://0.0.0.0:8112 (9)
runestone-1 | [2024-07-09 01:38:33 +0000] [9] [INFO] Using worker: sync
runestone-1 | [2024-07-09 01:38:33 +0000] [10] [INFO] Booting worker with pid: 10
book-1 | INFO: Uvicorn running on
http://0.0.0.0:8111 (Press CTRL+C to quit)
book-1 | INFO: Started parent process [1]
runestone-1 | [2024-07-09 01:38:34 +0000] [11] [INFO] Booting worker with pid: 11
assignment-1 | INFO: Uvicorn running on
http://0.0.0.0:8113 (Press CTRL+C to quit)
assignment-1 | INFO: Started parent process [1]
runestone-1 | [2024-07-09 01:38:34 +0000] [12] [INFO] Booting worker with pid: 12
runestone-1 | [2024-07-09 01:38:34 +0000] [9] [DEBUG] 3 workers
runestone-1 | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1 | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1 | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1 | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1 | web2py Web Framework
runestone-1 | Created by Massimo Di Pierro, Copyright 2007-2024
runestone-1 | Version 2.23.1-stable+timestamp.2023.01.31.08.01.46
runestone-1 | Database drivers available: sqlite3, psycopg2, imaplib
runestone-1 | tickets2db.py:40: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at:
https://sqlalche.me/e/b8d9)
runestone-1 | traceback = Table("traceback", meta, autoload=True, autoload_with=engine)
assignment-1 | INFO - 2024-07-09 01:38:37,500 - Settings - Error path is /usr/books/tickets
assignment-1 | INFO - 2024-07-09 01:38:37,503 - Settings - Error path is /usr/books/tickets
assignment-1 | INFO - 2024-07-09 01:38:37,507 - Settings - Error path is /usr/books/tickets
assignment-1 | INFO - 2024-07-09 01:38:40,499 - <module> - Serving books from /usr/books.
assignment-1 |
assignment-1 | INFO - 2024-07-09 01:38:40,499 - <module> - Serving books from /usr/books.
assignment-1 |
assignment-1 | INFO - 2024-07-09 01:38:40,500 - <module> - Serving books from /usr/books.
assignment-1 |
assignment-1 | INFO: Started server process [8]
assignment-1 | INFO: Waiting for application startup.
assignment-1 | INFO: Application startup complete.
assignment-1 | INFO: Started server process [9]
assignment-1 | INFO: Waiting for application startup.
assignment-1 | INFO: Started server process [7]
assignment-1 | INFO: Application startup complete.
assignment-1 | INFO: Waiting for application startup.
assignment-1 | INFO: Application startup complete.
book-1 | INFO - 2024-07-09 01:38:42,374 - <module> - Serving books from /usr/books.
book-1 |
book-1 | INFO - 2024-07-09 01:38:42,379 - <module> - Serving books from /usr/books.
book-1 |
book-1 | INFO - 2024-07-09 01:38:42,387 - <module> - Serving books from /usr/books.
book-1 |
book-1 | INFO - 2024-07-09 01:38:42,400 - <module> - Serving books from /usr/books.
book-1 |
book-1 | INFO: Started server process [8]
book-1 | INFO: Waiting for application startup.
book-1 | INFO - 2024-07-09 01:38:42,421 - lifespan - Book Server is Starting Up
book-1 | INFO: Application startup complete.
book-1 | INFO: Started server process [11]
book-1 | INFO: Waiting for application startup.
book-1 | INFO - 2024-07-09 01:38:42,424 - lifespan - Book Server is Starting Up
book-1 | INFO: Application startup complete.
book-1 | INFO: Started server process [10]
book-1 | INFO: Waiting for application startup.
book-1 | INFO - 2024-07-09 01:38:42,430 - lifespan - Book Server is Starting Up
book-1 | INFO: Application startup complete.
book-1 | INFO: Started server process [12]
book-1 | INFO: Waiting for application startup.
book-1 | INFO: Application startup complete.
book-1 | INFO - 2024-07-09 01:38:42,453 - lifespan - Book Server is Starting Up
book-1 | INFO - 2024-07-09 01:38:42,469 - <module> - Serving books from /usr/books.
book-1 |
book-1 | INFO: Started server process [9]
book-1 | INFO: Waiting for application startup.
book-1 | INFO - 2024-07-09 01:38:42,496 - lifespan - Book Server is Starting Up
book-1 | INFO: Application startup complete.
nginx-1 | 172.20.0.1 - - [09/Jul/2024:01:39:36 +0000] "GET /runestone/static/js/jquery.js HTTP/1.1" 200 89476 "
http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1 | 172.20.0.1 - [09/Jul/2024:01:39:36 +0000] Request: "GET /runestone/static/js/jquery.js HTTP/1.1" Status: 200 Bytes: 89476 RequestTime: 0.002 Referrer: "
http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1 | 172.20.0.1 - - [09/Jul/2024:01:39:36 +0000] "GET /runestone/static/js/web2py.js HTTP/1.1" 200 4768 "
http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1 | 172.20.0.1 - [09/Jul/2024:01:39:36 +0000] Request: "GET /runestone/static/js/web2py.js HTTP/1.1" Status: 200 Bytes: 4768 RequestTime: 0.002 Referrer: "
http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1 | 2024/07/09 01:39:36 [notice] 28#28: *5 "^/ads.txt" does not match "/runestone/static/images/RAIcon.png", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/images/RAIcon.png HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
nginx-1 | 2024/07/09 01:39:36 [notice] 28#28: *5 "^/runestone/static/JavaReview/(\w+)/(.*)$" does not match "/runestone/static/images/RAIcon.png", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/images/RAIcon.png HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
nginx-1 | 2024/07/09 01:39:36 [notice] 28#28: *5 "^/runestone/static/csawesome/(\w+)/(.*)$" does not match "/runestone/static/images/RAIcon.png", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/images/RAIcon.png HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
runestone-1 | [2024-07-09 01:39:36 +0000] [11] [DEBUG] GET /runestone/static/images/RAIcon.png
nginx-1 | 172.20.0.1 - - [09/Jul/2024:01:39:36 +0000] "GET /runestone/static/images/RAIcon.png HTTP/1.1" 200 153187 "
http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1 | 172.20.0.1 - [09/Jul/2024:01:39:36 +0000] Request: "GET /runestone/static/images/RAIcon.png HTTP/1.1" Status: 200 Bytes: 153187 RequestTime: 0.001 Referrer: "
http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1 | 2024/07/09 01:39:37 [notice] 28#28: *5 "^/ads.txt" does not match "/runestone/static/favicon.ico", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/favicon.ico HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
nginx-1 | 2024/07/09 01:39:37 [notice] 28#28: *5 "^/runestone/static/JavaReview/(\w+)/(.*)$" does not match "/runestone/static/favicon.ico", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/favicon.ico HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
nginx-1 | 2024/07/09 01:39:37 [notice] 28#28: *5 "^/runestone/static/csawesome/(\w+)/(.*)$" does not match "/runestone/static/favicon.ico", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/favicon.ico HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
runestone-1 | [2024-07-09 01:39:37 +0000] [12] [DEBUG] GET /runestone/static/favicon.ico
nginx-1 | 172.20.0.1 - - [09/Jul/2024:01:39:37 +0000] "GET /runestone/static/favicon.ico HTTP/1.1" 200 15086 "
http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1 | 172.20.0.1 - [09/Jul/2024:01:39:37 +0000] Request: "GET /runestone/static/favicon.ico HTTP/1.1" Status: 200 Bytes: 15086 RequestTime: 0.003 Referrer: "
http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1 | 2024/07/09 01:39:38 [notice] 30#30: *7 "^/ads.txt" does not match "/ns/books/index", client: 172.20.0.1, server: runestonemobile.local, request: "GET /ns/books/index HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
nginx-1 | 2024/07/09 01:39:38 [notice] 30#30: *7 "^/runestone/static/JavaReview/(\w+)/(.*)$" does not match "/ns/books/index", client: 172.20.0.1, server: runestonemobile.local, request: "GET /ns/books/index HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
nginx-1 | 2024/07/09 01:39:38 [notice] 30#30: *7 "^/runestone/static/csawesome/(\w+)/(.*)$" does not match "/ns/books/index", client: 172.20.0.1, server: runestonemobile.local, request: "GET /ns/books/index HTTP/1.1", host: "localhost", referrer: "
http://localhost/user/login"
book-1 | DEBUG - 2024-07-09 01:39:38,913 - get_session_object - In timezone middleware cookie is None
db-1 | 2024-07-09 01:39:38.951 UTC [80] ERROR: column library.social_url does not exist at character 256
db-1 | 2024-07-09 01:39:38.951 UTC [80] STATEMENT: SELECT
library.id, library.title, library.subtitle, library.description, library.authors, library.shelf_section, library.basecourse, library.build_system, library.for_classes, library.is_visible, library.main_page, library.last_build, library.github_url, library.social_url
db-1 | FROM library
db-1 | WHERE library.is_visible = $1::varchar ORDER BY library.shelf_section, library.title
book-1 | ERROR - 2024-07-09 01:39:38,952 - generic_error_handler - UNHANDLED ERROR
book-1 | ERROR - 2024-07-09 01:39:38,952 - generic_error_handler - (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: column library.social_url does not exist
book-1 | [SQL: SELECT
library.id, library.title, library.subtitle, library.description, library.authors, library.shelf_section, library.basecourse, library.build_system, library.for_classes, library.is_visible, library.main_page, library.last_build, library.github_url, library.social_url
book-1 | FROM library
book-1 | WHERE library.is_visible = %s ORDER BY library.shelf_section, library.title]
book-1 | [parameters: ('T',)]
book-1 | (Background on this error at:
https://sqlalche.me/e/14/f405)
book-1 | DEBUG - 2024-07-09 01:39:38,961 - create_traceback - dl[-2:]=[{'name': '_handle_exception', 'local_vars': {'self': <sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_cursor object at 0x7f813e4ab7d0>, 'error': UndefinedColumnError('column library.social_url does not exist')}}, {'name': '_handle_exception', 'local_vars': {'self': <AdaptedConnection <asyncpg.connection.Connection object at 0x7f813e335620>>, 'error': UndefinedColumnError('column library.social_url does not exist'), 'exception_mapping': {<class 'asyncpg.exceptions.IntegrityConstraintViolationError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.IntegrityError'>, <class 'asyncpg.exceptions._base.PostgresError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.Error'>, <class 'asyncpg.exceptions.SyntaxOrAccessError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.ProgrammingError'>, <class 'asyncpg.exceptions._base.InterfaceError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InterfaceError'>, <class 'asyncpg.exceptions.InvalidCachedStatementError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InvalidCachedStatementError'>, <class 'asyncpg.exceptions.InternalServerError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InternalServerError'>}, 'super_': <class 'asyncpg.exceptions.SyntaxOrAccessError'>, 'translated_error': ProgrammingError("<class 'asyncpg.exceptions.UndefinedColumnError'>: column library.social_url does not exist")}}]
db-1 | 2024-07-09 01:39:38.965 UTC [80] ERROR: value too long for type character varying(512)
db-1 | 2024-07-09 01:39:38.965 UTC [80] STATEMENT: INSERT INTO traceback (traceback, timestamp, err_message, path, query_string, post_body, hash, hostname) VALUES ($1::varchar, $2::timestamp, $3::varchar, $4::varchar, $5::varchar, $6::varchar, $7::varchar, $8::varchar) RETURNING
traceback.idbook-1 | ERROR: Exception in ASGI application
book-1 | Traceback (most recent call last):
nginx-1 | 172.20.0.1 - - [09/Jul/2024:01:39:38 +0000] "GET /ns/books/index HTTP/1.1" 500 32 "
http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 442, in _prepare_and_execute
book-1 | self._rows = await prepared_stmt.fetch(*parameters)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/asyncpg/prepared_stmt.py", line 176, in fetch
book-1 | data = await self.__bind_execute(args, 0, timeout)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/asyncpg/prepared_stmt.py", line 241, in __bind_execute
book-1 | data, status, _ = await self.__do_execute(
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/asyncpg/prepared_stmt.py", line 230, in __do_execute
book-1 | return await executor(protocol)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
book-1 | asyncpg.exceptions.StringDataRightTruncationError: value too long for type character varying(512)
book-1 |
book-1 | The above exception was the direct cause of the following exception:
book-1 |
nginx-1 | 172.20.0.1 - [09/Jul/2024:01:39:38 +0000] Request: "GET /ns/books/index HTTP/1.1" Status: 500 Bytes: 32 RequestTime: 0.064 Referrer: "
http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
book-1 | Traceback (most recent call last):
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
book-1 | self.dialect.do_execute(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
book-1 | cursor.execute(statement, parameters)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 479, in execute
book-1 | self._adapt_connection.await_(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
book-1 | return current.driver.switch(awaitable)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
book-1 | value = await result
book-1 | ^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 454, in _prepare_and_execute
book-1 | self._handle_exception(error)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 389, in _handle_exception
book-1 | self._adapt_connection._handle_exception(error)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 682, in _handle_exception
book-1 | raise translated_error from error
book-1 | sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.Error: <class 'asyncpg.exceptions.StringDataRightTruncationError'>: value too long for type character varying(512)
book-1 |
book-1 | The above exception was the direct cause of the following exception:
book-1 |
book-1 | Traceback (most recent call last):
book-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
book-1 | result = await app(self.scope, self.receive, self.send)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
book-1 | return await
self.app(scope, receive, send)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 292, in __call__
book-1 | await super().__call__(scope, receive, send)
book-1 | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
book-1 | await self.middleware_stack(scope, receive, send)
book-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 174, in __call__
book-1 | response = await self.handler(request, exc)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 652, in go
book-1 | await self.trans.__aexit__(type_, value, traceback)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 716, in __aexit__
book-1 | await greenlet_spawn(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 128, in greenlet_spawn
book-1 | result = context.switch(value)
book-1 | ^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/util.py", line 235, in __exit__
book-1 | with util.safe_reraise():
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
book-1 | compat.raise_(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
book-1 | raise exception
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/util.py", line 233, in __exit__
book-1 | self.commit()
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 832, in commit
book-1 | self._prepare_impl()
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 811, in _prepare_impl
book-1 | self.session.flush()
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
book-1 | self._flush(objects)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
book-1 | with util.safe_reraise():
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
book-1 | compat.raise_(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
book-1 | raise exception
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
book-1 | flush_context.execute()
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute
book-1 | rec.execute(self)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
book-1 | util.preloaded.orm_persistence.save_obj(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
book-1 | _emit_insert_statements(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py", line 1238, in _emit_insert_statements
book-1 | result = connection._execute_20(
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
book-1 | return meth(self, args_10style, kwargs_10style, execution_options)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
book-1 | return connection._execute_clauseelement(
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
book-1 | ret = self._execute_context(
book-1 | ^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
book-1 | self._handle_dbapi_exception(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
book-1 | util.raise_(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
book-1 | raise exception
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
book-1 | self.dialect.do_execute(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
book-1 | cursor.execute(statement, parameters)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 479, in execute
book-1 | self._adapt_connection.await_(
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
book-1 | return current.driver.switch(awaitable)
book-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
book-1 | value = await result
book-1 | ^^^^^^^^^^^^
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 454, in _prepare_and_execute
book-1 | self._handle_exception(error)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 389, in _handle_exception
book-1 | self._adapt_connection._handle_exception(error)
book-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 682, in _handle_exception
book-1 | raise translated_error from error
book-1 | sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.StringDataRightTruncationError'>: value too long for type character varying(512)
book-1 | [SQL: INSERT INTO traceback (traceback, timestamp, err_message, path, query_string, post_body, hash, hostname) VALUES (%s, %s, %s, %s, %s, %s, %s, %s) RETURNING
traceback.id]
book-1 | [parameters: (' File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__\n await
self.app(scope, receive, _send)\n ... (7512 characters truncated) ... sError\'>, \'translated_error\': ProgrammingError("<class \'asyncpg.exceptions.UndefinedColumnError\'>: column library.social_url does not exist")}}]', datetime.datetime(2024, 7, 9, 1, 39, 38, 961410), "(sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: column library.social_url does not exist ... (310 characters truncated) ... ry.is_visible = %s ORDER BY library.shelf_section, library.title]\n[parameters: ('T',)]\n(Background on this error at:
https://sqlalche.me/e/14/f405)", '/books/index', '', None, 'f266cfe024125bfe85d86f89421d9b86', '942d51b93b48')]
book-1 | (Background on this error at:
https://sqlalche.me/e/14/dbapi)
book-1 | INFO:
172.20.0.5:39964 - "GET /books/index HTTP/1.1" 500 Internal Server Error
david@david-IdeaPad:~$ psql --host=localhost --port=2345 --username=runestone runestone_dev
Password for user runestone:
psql (14.12 (Ubuntu 14.12-0ubuntu0.22.04.1), server 13.12 (Debian 13.12-1.pgdg120+1))
Type "help" for help.
runestone_dev=# \dt
runestone_dev=# \d library
Table "public.library"
Column | Type | Collation | Nullable | Default
---------------+-----------------------------+-----------+----------+-------------------------------------
id | integer | | not null | nextval('library_id_seq'::regclass)
title | character varying(512) | | not null |
subtitle | character varying(512) | | |
description | text | | |
authors | text | | |
shelf_section | character varying(512) | | |
basecourse | character varying(512) | | not null |
build_system | character varying(20) | | |
for_classes | character(1) | | |
is_visible | character(1) | | |
main_page | character varying(512) | | |
last_build | timestamp without time zone | | |
github_url | character varying(255) | | |
Indexes:
"library_pkey" PRIMARY KEY, btree (id)
"library_basecourse_key" UNIQUE CONSTRAINT, btree (basecourse)
Foreign-key constraints:
"library_basecourse_fkey" FOREIGN KEY (basecourse) REFERENCES courses(course_name)
Referenced by:
TABLE "book_author" CONSTRAINT "book_author_book_fkey" FOREIGN KEY (book) REFERENCES library(basecourse)
# And here's the code in components/rsptx/db/models.py
class Library(Base, IdMixin):
__tablename__ = "library"
title = Column(String(512), nullable=False)
subtitle = Column(String(512))
description = Column(Text)
authors = Column(Text)
shelf_section = Column(String(512))
basecourse = Column(
String(512), ForeignKey("courses.course_name"), nullable=False, unique=True
)
build_system = Column(String(20))
for_classes = Column(Web2PyBoolean)
is_visible = Column(Web2PyBoolean, default="T")
github_url = Column(String(512))
main_page = Column(String(512), default="index.html")
last_build = Column(DateTime)
github_url = Column(String(255))
social_url = Column(String(255)) # link to group for instructors