[ 
https://issues.apache.org/jira/browse/GUACAMOLE-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16820916#comment-16820916
 ] 

Don commented on GUACAMOLE-777:
-------------------------------

Ok I see that there was a major DB change requiring and update of the schema. 
Explained 
[HERE|https://guacamole.apache.org/releases/1.0.0/#deprecation--compatibility-notes]
 however that schema update is not applied automatically but even when it is 
done manually an error still occurs.

 

{{18-Apr-2019 09:36:56.215 INFO [main] 
org.apache.catalina.startup.Catalina.start Server startup in 4377 ms}}
{{09:37:04.106 [http-nio-8080-exec-2] ERROR o.a.g.rest.RESTExceptionMapper - 
Unexpected internal error: }}
{{### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: 
permission denied for relation guacamole_entity}}
{{### The error may exist in 
org/apache/guacamole/auth/jdbc/user/UserMapper.xml}}
{{### The error may involve defaultParameterMap}}
{{### The error occurred while setting parameters}}
{{### SQL: SELECT guacamole_user.user_id, guacamole_entity.entity_id, 
guacamole_entity.name, password_hash, password_salt, password_date, disabled, 
expired, access_window_start, access_window_end, valid_from, valid_until, 
timezone, full_name, email_address, organization, organizational_role, 
MAX(start_date) AS last_active FROM guacamole_user JOIN guacamole_entity ON 
guacamole_user.entity_id = guacamole_entity.entity_id LEFT JOIN 
guacamole_user_history ON guacamole_user_history.user_id = 
guacamole_user.user_id WHERE guacamole_entity.name = ? AND 
guacamole_entity.type = 'USER'::guacamole_entity_type GROUP BY 
guacamole_user.user_id, guacamole_entity.entity_id; SELECT 
guacamole_user_attribute.user_id, guacamole_user_attribute.attribute_name, 
guacamole_user_attribute.attribute_value FROM guacamole_user_attribute JOIN 
guacamole_user ON guacamole_user.user_id = guacamole_user_attribute.user_id 
JOIN guacamole_entity ON guacamole_user.entity_id = guacamole_entity.entity_id 
WHERE guacamole_entity.name = ? AND guacamole_entity.type = 
'USER'::guacamole_entity_type}}
{{### Cause: org.postgresql.util.PSQLException: ERROR: permission denied for 
relation guacamole_entity}}

 

 

How am I am supposed to upgrade the schema without rebuilding the database ?

> Upgrading Docker Image Breaks backend DB 
> -----------------------------------------
>
>                 Key: GUACAMOLE-777
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-777
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole
>    Affects Versions: 1.0.0
>            Reporter: Don
>            Priority: Major
>
> When pulling a newer guacamole  images from guacamole/guacamole:latest upon 
> restart there is a critical DB error.
>  
> {{18-Apr-2019 09:08:16.895 INFO [main] 
> org.apache.catalina.startup.Catalina.start Server startup in 4397 ms}}
> {{09:09:04.896 [http-nio-8080-exec-4] ERROR o.a.g.rest.RESTExceptionMapper - 
> Unexpected internal error: }}
> {{### Error querying database.  Cause: org.postgresql.util.PSQLException: 
> ERROR: relation "guacamole_entity" does not exist}}
> {{  Position: 571}}
> {{### The error may exist in 
> org/apache/guacamole/auth/jdbc/user/UserMapper.xml}}
> {{### The error may involve defaultParameterMap}}
> {{### The error occurred while setting parameters}}
> {{### SQL: SELECT             guacamole_user.user_id,             
> guacamole_entity.entity_id,             guacamole_entity.name,             
> password_hash,             password_salt,             password_date,          
>    disabled,             expired,             access_window_start,            
>  access_window_end,             valid_from,             valid_until,          
>    timezone,             full_name,             email_address,             
> organization,             organizational_role,             MAX(start_date) AS 
> last_active         FROM guacamole_user         JOIN guacamole_entity ON 
> guacamole_user.entity_id = guacamole_entity.entity_id         LEFT JOIN 
> guacamole_user_history ON guacamole_user_history.user_id = 
> guacamole_user.user_id         WHERE             guacamole_entity.name = ?    
>          AND guacamole_entity.type = 'USER'::guacamole_entity_type         
> GROUP BY guacamole_user.user_id, guacamole_entity.entity_id;          SELECT  
>            guacamole_user_attribute.user_id,             
> guacamole_user_attribute.attribute_name,             
> guacamole_user_attribute.attribute_value         FROM 
> guacamole_user_attribute         JOIN guacamole_user ON 
> guacamole_user.user_id = guacamole_user_attribute.user_id         JOIN 
> guacamole_entity ON guacamole_user.entity_id = guacamole_entity.entity_id     
>     WHERE             guacamole_entity.name = ?             AND 
> guacamole_entity.type = 'USER'::guacamole_entity_type}}
> {{### Cause: org.postgresql.util.PSQLException: ERROR: relation 
> "guacamole_entity" does not exist}}
> {{  Position: 571}}
>  
>  
>  
> There ought to be some sort of sanity check when upgrading the DB schema.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to