Topics

Exception: ERROR: permission denied for table show

Tian Isaac
 

I installed cuebot and postgres in container,
 When I try to execute those commands:
 >>> import opencue 
>>> import outline 
>>> [show.name() for show in opencue.api.getShows()]
I got those error: 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/pycue-0.2.31-py2.7.egg/opencue/util.py", line 59, in _decorator
    "Server caught an internal exception. {}".format(details)))
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/pycue-0.2.31-py2.7.egg/opencue/util.py", line 44, in _decorator
    return grpcFunc(*args, **kwargs)
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/pycue-0.2.31-py2.7.egg/opencue/api.py", line 191, in getShows
    show_pb2.ShowGetShowsRequest(), timeout=Cuebot.Timeout).shows
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/grpc/_channel.py", line 533, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/grpc/_channel.py", line 467, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
opencue.exception.CueInternalErrorException: Server caught an internal exception. org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT show.*,COALESCE(vs_show_stat.int_pending_count,0) AS int_pending_count,COALESCE(vs_show_stat.int_running_count,0) AS int_running_count,COALESCE(vs_show_stat.int_dead_count,0) AS int_dead_count,COALESCE(vs_show_resource.int_cores,0) AS int_cores, COALESCE(vs_show_stat.int_job_count,0) AS int_job_count FROM show LEFT JOIN vs_show_stat ON (vs_show_stat.pk_show = show.pk_show) LEFT JOIN vs_show_resource ON (vs_show_resource.pk_show=show.pk_show) WHERE 1 = 1 ]; nested exception is org.postgresql.util.PSQLException: ERROR: permission denied for table show
StatementCallback; bad SQL grammar [SELECT show.*,COALESCE(vs_show_stat.int_pending_count,0) AS int_pending_count,COALESCE(vs_show_stat.int_running_count,0) AS int_running_count,COALESCE(vs_show_stat.int_dead_count,0) AS int_dead_count,COALESCE(vs_show_resource.int_cores,0) AS int_cores, COALESCE(vs_show_stat.int_job_count,0) AS int_job_count FROM show LEFT JOIN vs_show_stat ON (vs_show_stat.pk_show = show.pk_show) LEFT JOIN vs_show_resource ON (vs_show_resource.pk_show=show.pk_show) WHERE 1 = 1 ]; nested exception is org.postgresql.util.PSQLException: ERROR: permission denied for table show

But when l try to run those SQL commands at the host machine directly, that works fine.
Does anybody have any clues?

Greg Denton
 

Hi,

It sounds like either the DB_USER was created with insufficient privileges when configuring the database or there's some other problem with user/password combination when starting up cuebot. Here are a few things to verify...

1.) Make sure that steps 1 & 2 were performed as described in the "Creating the database" section of https://www.opencue.io/docs/getting-started/setting-up-the-database/
     As noted in the "Important" section, if the database tables were created before altering the user privileges, you will need to run the "GRANT ALL PRIVILEGES..." command.

2.) Ensure that the DB_NAME, DB_USER, and DB_PASS environment variables are all correctly set to match the values specified when creating the database. Be sure to run the cuebot container specifying the additional "--datasource" flags used to specify the username and password as described in the "Installing and Running Cuebot" section of https://www.opencue.io/docs/getting-started/deploying-cuebot/.

3.) If you are still running into problems, check the logs for any additional error messages in the cuebot startup. See the "Verifying your install" section of https://www.opencue.io/docs/getting-started/deploying-cuebot/.

I hope that helps get you started. Please let us know if you continue to run into any issues.

Thanks,
Greg

On Mon, Jul 8, 2019 at 4:06 AM Tian Isaac <isaac4job@...> wrote:
I installed cuebot and postgres in container,
 When I try to execute those commands:
 >>> import opencue 
>>> import outline 
>>> [show.name() for show in opencue.api.getShows()]
I got those error: 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/pycue-0.2.31-py2.7.egg/opencue/util.py", line 59, in _decorator
    "Server caught an internal exception. {}".format(details)))
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/pycue-0.2.31-py2.7.egg/opencue/util.py", line 44, in _decorator
    return grpcFunc(*args, **kwargs)
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/pycue-0.2.31-py2.7.egg/opencue/api.py", line 191, in getShows
    show_pb2.ShowGetShowsRequest(), timeout=Cuebot.Timeout).shows
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/grpc/_channel.py", line 533, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/apps/shared/ddp/opencuelib/0.0.1/site-packages/grpc/_channel.py", line 467, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
opencue.exception.CueInternalErrorException: Server caught an internal exception. org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT show.*,COALESCE(vs_show_stat.int_pending_count,0) AS int_pending_count,COALESCE(vs_show_stat.int_running_count,0) AS int_running_count,COALESCE(vs_show_stat.int_dead_count,0) AS int_dead_count,COALESCE(vs_show_resource.int_cores,0) AS int_cores, COALESCE(vs_show_stat.int_job_count,0) AS int_job_count FROM show LEFT JOIN vs_show_stat ON (vs_show_stat.pk_show = show.pk_show) LEFT JOIN vs_show_resource ON (vs_show_resource.pk_show=show.pk_show) WHERE 1 = 1 ]; nested exception is org.postgresql.util.PSQLException: ERROR: permission denied for table show
StatementCallback; bad SQL grammar [SELECT show.*,COALESCE(vs_show_stat.int_pending_count,0) AS int_pending_count,COALESCE(vs_show_stat.int_running_count,0) AS int_running_count,COALESCE(vs_show_stat.int_dead_count,0) AS int_dead_count,COALESCE(vs_show_resource.int_cores,0) AS int_cores, COALESCE(vs_show_stat.int_job_count,0) AS int_job_count FROM show LEFT JOIN vs_show_stat ON (vs_show_stat.pk_show = show.pk_show) LEFT JOIN vs_show_resource ON (vs_show_resource.pk_show=show.pk_show) WHERE 1 = 1 ]; nested exception is org.postgresql.util.PSQLException: ERROR: permission denied for table show

But when l try to run those SQL commands at the host machine directly, that works fine.
Does anybody have any clues?