cairis-platform / cairis

Computer Aided Integration of Requirements and Information Security - Server
https://cairis.org
Apache License 2.0
147 stars 57 forks source link

CAIRIS Mysql Error #675

Closed sh1nnyboy closed 4 months ago

sh1nnyboy commented 4 months ago

When I try to create an environment, I always encounter this error on my local machine. I then checked demo.cairis.org and it seems you're experiencing the same issue as my local setup.

MySQLdb._exceptions.ProgrammingError)` (1146, "Table 'test_at_test_dot_com_default.object_name' doesn't exist") [SQL: call nameExists(%s,%s)] [parameters: ('Production Environment On Prem', 'environment')] (Background on this error at: https://sqlalche.me/e/20/f405)

My Installation:

NET=cairisnet
docker network create -d bridge $NET
docker run --name cairis-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest --thread_stack=256K --max_sp_recursion_depth=255 --log_bin_trust_function_creators=1
docker network connect $NET cairis-mysql
docker run --name CAIRIS -d -P -p 80:8000 --net=$NET shamalfaily/cairis

docker exec -t `docker ps | grep shamalfaily/cairis | head -1 | cut -d ' ' -f 1` /addAccount.sh test@test.com test TestUser
docker run --name cairis-docs -d -v cairisDocumentation:/tmpDocker -v cairisImage:/images -t shamalfaily/cairis-docs
failys commented 4 months ago

Sorry for taking forever to get back to you.

If you're working with Docker, can you please try pulling the latest container I've just pushed? The one that was on there hadn't been updated for a while and, in the meantime, there have been a number of changes to Python and MySQL which broke a few things. After a few changes, the live demo is looking good again now, so hopefully your problem has been resolved too.

sh1nnyboy commented 4 months ago

Thank you for the update. I have tested it on the demo website, and it's already working fine. However, when I try to do it locally using my installation steps above, it still has the issue.

failys commented 4 months ago

In the 3rd line when you run up cairis-mysql, replace ‘mysql:latest’ with ‘mysql:8.0’ and see if that helps.

sh1nnyboy commented 4 months ago

Thank you for the update. It's already working now.