Guacamole配置guacamole.properties无效

最近在学习Guacamole,搭建远程服务器,我是用了cas、jdbc-mysql等实现了同一认证和mysql用户,并且在guacamole.properties配置中可以切换数据库,但是在里面配置诸如:

  • 语言选择:available-languages: en, de
  • 会话超时api-session-timeout: 1

等配置不会生效,我在guacamole0.9.14和1.1.0版本都尝试过了,都是不生效的,请问可以帮忙解答一下吗?
与维护人员取得联系,解决了上面的两个问题
1.语言选择应为allowed-languages:en 他们给出的回复是文档存在问题 正确的字段是allowed-languages
1.会话超时,得到的回复是,当用户断开所有远程连接后,停留在index/home界面的会话有效时间,假设1分钟内未登录任何服务器,则需要重新验证身份,并不是我所认为的创建连接后1分钟内不活跃会强制重新认证

遇到了新的问题 ,添加某个用户后登录报错

问题详情

en
在这里插入图片描述
zh
在这里插入图片描述
查看war包找到对应的错误代码为ERROR_CLIENT_207

查看日志

guacamole0.9.14查看日志只有

23:44:33.241 [http-nio-8080-exec-9] INFO  o.a.g.tunnel.TunnelRequestService - User "***" connected to connection "1338".
23:44:33.257 [http-nio-8080-exec-2] INFO  o.a.g.tunnel.TunnelRequestService - User "***" disconnected from connection "1338". Duration: 15 milliseconds

guacamole1.1.0查看日志发现

23:44:33.102 [http-nio-8080-exec-1] INFO  o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".
23:44:33.241 [http-nio-8080-exec-9] INFO  o.a.g.tunnel.TunnelRequestService - User "***" connected to connection "1338".
23:44:33.257 [http-nio-8080-exec-2] INFO  o.a.g.tunnel.TunnelRequestService - User "***" disconnected from connection "1338". Duration: 15 milliseconds
23:44:33.315 [http-nio-8080-exec-3] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error: 
### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND  
        (
            guacamole_connection_permission.entity_id = 85
     ' at line 19
### The error may exist in org/apache/guacamole/auth/jdbc/connection/ConnectionMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT             guacamole_connection.connection_id,             guacamole_connection.connection_name,             parent_id,             protocol,             max_connections,             max_connections_per_user,             proxy_hostname,             proxy_port,             proxy_encryption_method,             connection_weight,             failover_only,             MAX(start_date) AS last_active         FROM guacamole_connection         JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id         LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id         WHERE guacamole_connection.connection_id IN                           AND           (             guacamole_connection_permission.entity_id = ?                       )                   AND permission = 'READ'         GROUP BY guacamole_connection.connection_id;          SELECT primary_connection_id, guacamole_sharing_profile.sharing_profile_id         FROM guacamole_sharing_profile         JOIN guacamole_sharing_profile_permission ON guacamole_sharing_profile_permission.sharing_profile_id = guacamole_sharing_profile.sharing_profile_id         WHERE primary_connection_id IN                           AND           (             entity_id = ?                       )                   AND permission = 'READ';          SELECT             guacamole_connection_attribute.connection_id,             attribute_name,             attribute_value         FROM guacamole_connection_attribute         JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection_attribute.connection_id         WHERE guacamole_connection_attribute.connection_id IN                           AND           (             entity_id = ?                       )                   AND permission = 'READ';
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND  
        (
            guacamole_connection_permission.entity_id = 85
     ' at line 19

追溯相关代码,在org/apache/guacamole/auth/jdbc/connection/ConnectionMapper.xml此文件中找到,相关代码如下,但是不明原因;

<select id="selectReadable" resultMap="ConnectionResultMap"
            resultSets="connections,sharingProfiles,arbitraryAttributes">

        SELECT
            guacamole_connection.connection_id,
            guacamole_connection.connection_name,
            parent_id,
            protocol,
            max_connections,
            max_connections_per_user,
            proxy_hostname,
            proxy_port,
            proxy_encryption_method,
            connection_weight,
            failover_only,
            MAX(start_date) AS last_active
        FROM guacamole_connection
        JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
        LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
        WHERE guacamole_connection.connection_id IN
            <foreach collection="identifiers" item="identifier"
                     open="(" separator="," close=")">
                #{identifier,jdbcType=VARCHAR}
            </foreach>
            AND <include refid="org.apache.guacamole.auth.jdbc.base.EntityMapper.isRelatedEntity">
                <property name="column"   value="guacamole_connection_permission.entity_id"/>
                <property name="entityID" value="#{user.entityID,jdbcType=INTEGER}"/>
                <property name="groups"   value="effectiveGroups"/>
            </include>
            AND permission = 'READ'
        GROUP BY guacamole_connection.connection_id;

        SELECT primary_connection_id, guacamole_sharing_profile.sharing_profile_id
        FROM guacamole_sharing_profile
        JOIN guacamole_sharing_profile_permission ON guacamole_sharing_profile_permission.sharing_profile_id = guacamole_sharing_profile.sharing_profile_id
        WHERE primary_connection_id IN
            <foreach collection="identifiers" item="identifier"
                     open="(" separator="," close=")">
                #{identifier,jdbcType=VARCHAR}
            </foreach>
            AND <include refid="org.apache.guacamole.auth.jdbc.base.EntityMapper.isRelatedEntity">
                <property name="column"   value="entity_id"/>
                <property name="entityID" value="#{user.entityID,jdbcType=INTEGER}"/>
                <property name="groups"   value="effectiveGroups"/>
            </include>
            AND permission = 'READ';

        SELECT
            guacamole_connection_attribute.connection_id,
            attribute_name,
            attribute_value
        FROM guacamole_connection_attribute
        JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection_attribute.connection_id
        WHERE guacamole_connection_attribute.connection_id IN
            <foreach collection="identifiers" item="identifier"
                     open="(" separator="," close=")">
                #{identifier,jdbcType=VARCHAR}
            </foreach>
            AND <include refid="org.apache.guacamole.auth.jdbc.base.EntityMapper.isRelatedEntity">
                <property name="column"   value="entity_id"/>
                <property name="entityID" value="#{user.entityID,jdbcType=INTEGER}"/>
                <property name="groups"   value="effectiveGroups"/>
            </include>
            AND permission = 'READ';

    </select

分析The error may involve defaultParameterMap:没有找到冲突的参数,和这个连接信息相似的(IP不同)都是可以正常连接的
分析 The error occurred while setting parameters: 参数设置异常,我的mysql表是使用guacmole升级脚本自动执行的,并且没有报错

希望有遇到相关问题或者看明白的大佬指点一下

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值