New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: not a boolean : [:] #220

Closed
ypujante opened this Issue Apr 29, 2013 · 10 comments

Comments

Projects
None yet
2 participants
@ypujante
Member

ypujante commented Apr 29, 2013

As described in the forum thread:

http://glu.977617.n3.nabble.com/Error-on-console-server-upgrade-from-4-5-0-to-5-0-0-td4025673.html

2013-04-29 19:43:03,281 [qtp2104354711-20] ERROR errors.GrailsExceptionResolver  - IllegalArgumentException occurred when processing request: [GET] /console/agents 
not a boolean : [:]. Stacktrace follows: 
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <cl:whenFeatureEnabled>: not a boolean : [:] 
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448) 
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:195) 
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) 
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) 
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575) 
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) 
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) 
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) 
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) 
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) 
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) 
        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:276) 
        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) 
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) 
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) 
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) 
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) 
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) 
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) 
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) 
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) 
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) 
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) 
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) 
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) 
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) 
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) 
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) 
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) 
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) 
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) 
        at org.eclipse.jetty.server.Server.handle(Server.java:368) 
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) 
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) 
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) 
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) 
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) 
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) 
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) 
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) 
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) 
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) 
        at java.lang.Thread.run(Thread.java:722) 
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <cl:whenFeatureEnabled>: not a boolean : [:] 
        at gsp_console_agentslist_gsp$_run_closure2.doCall(gsp_console_agentslist_gsp.groovy:37) 
        at gsp_console_agentslist_gsp.run(gsp_console_agentslist_gsp.groovy:53) 
        ... 58 more 
Caused by: java.lang.IllegalArgumentException: not a boolean : [:] 
        at org.linkedin.groovy.util.config.Config.getOptionalBoolean(Config.groovy:64) 
        at org.linkedin.glu.grails.utils.ConsoleConfig.isFeatureEnabled(ConsoleConfig.groovy:71) 
        at ConsoleTagLib$_closure40.doCall(ConsoleTagLib.groovy:1228) 
        ... 60 more 
@gospodinbodurov

This comment has been minimized.

gospodinbodurov commented Apr 30, 2013

Actually, I have the features section in my glu-console-webapp.groovy. Can you provide another suggestion?

@ypujante

This comment has been minimized.

Member

ypujante commented Apr 30, 2013

Can you post the content of your file?

@gospodinbodurov

This comment has been minimized.

gospodinbodurov commented Apr 30, 2013

Yes, wait a minute to obfuscate the critical data.

@gospodinbodurov

This comment has been minimized.

gospodinbodurov commented Apr 30, 2013

Here is the file.

/*
 * Copyright (c) 2010-2010 LinkedIn, Inc
 * Portions Copyright (c) 2011-2013 Yan Pujante
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

console.sslEnabled=true

def keysDir = System.properties['org.linkedin.glu.console.keys.dir'] ?: "${System.properties['user.dir']}/keys"

console.keystorePath="${keysDir}/console.keystore"
console.keystorePassword = '********'
console.keyPassword = '*******'

console.secretkeystorePath="${keysDir}/console.secretkeystore"

console.truststorePath="${keysDir}/agent.truststore"
console.truststorePassword = '*******'

/*def dataSourceUrl =
  System.properties['org.linkedin.glu.console.dataSource.url'] ?:
  "jdbc:hsqldb:file:${System.properties['user.dir']}/database/prod;shutdown=true"

// specify the database connection string
dataSource.dbCreate = "update"
dataSource.url = dataSourceUrl
*/

def dataSourceUrl = "jdbc:mysql://localhost/glu"
dataSource.dbCreate = "update"
dataSource.url = dataSourceUrl
dataSource.logSql=false // set to true for details (+ open trace logging level)
dataSource.dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
dataSource.driverClassName = "com.mysql.jdbc.Driver"
dataSource.username= "******" // user created previously
dataSource.password = "******" // password assigned previously
dataSource.properties.validationQuery = "SELECT 1"
dataSource.properties.testWhileIdle = false
dataSource.properties.timeBetweenEvictionRunsMillis = 1800000
dataSource.properties.minEvictableIdleTimeMillis = 1800000
dataSource.properties.numTestsPerEvictionRun = 3
dataSource.properties.testOnBorrow = true
dataSource.properties.testOnReturn = false

grails.serverURL = "http://${InetAddress.getLocalHost().canonicalHostName}:8080/console"

// path to the root of the unrestricted location (empty means no restriction)
// this property is used by StreamFileContentPlugin
plugins.StreamFileContentPlugin.unrestrictedLocation = ''

// role for unrestricted
plugins.StreamFileContentPlugin.unrestrictedRole = 'ADMIN'

// to mask the content of the file (remove passwords when reading log files)
plugins.StreamFileContentPlugin.maskFileContent = true

// define the plugins as a Map, or a class name or an array of class names
orchestration.engine.plugins = [
  'org.linkedin.glu.orchestration.engine.plugins.builtin.StreamFileContentPlugin'
]

// commands
def commandsDir =
  System.properties['org.linkedin.glu.console.commands.dir'] ?: "${System.properties['user.dir']}/commands"

// storage type supported right now are 'filesystem' and 'memory'
console.commandsService.storageType = 'filesystem'

// when storage is filesystem => where the commands are stored
console.commandsService.commandExecutionIOStorage.filesystem.rootDir = commandsDir

// when storage is memory => how many elements maximum to store (then start evicting...)
console.commandsService.commandExecutionIOStorage.memory.maxNumberOfElements = 25
// The following property limits how many (leaf) steps get executed in parallel during a deployment
// By default (undefined), it is unlimited
// console.deploymentService.deployer.planExecutor.leafExecutorService.fixedThreadPoolSize = 100

log4j = {
    appenders {
        file name:'file',
      file:'logs/console.log',
      layout:pattern(conversionPattern: '%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] %m%n')
    }

    root {
      info 'file'
      additivity = false
    }

    error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
               'org.codehaus.groovy.grails.web.pages', //  GSP
               'org.codehaus.groovy.grails.web.sitemesh', //  layouts
               'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
               'org.codehaus.groovy.grails.web.mapping', // URL mapping
               'org.codehaus.groovy.grails.commons', // core / classloading
               'org.codehaus.groovy.grails.plugins', // plugins
               'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
               'org.springframework',
               'org.hibernate'

    info 'grails',
         'org.linkedin'

    //debug 'com.linkedin.glu.agent.tracker', 'com.linkedin.glu.zookeeper.client'

    //trace 'org.hibernate.SQL', 'org.hibernate.type'

    warn   'org.mortbay.log', 'org.restlet.Component.LogService', 'org.restlet'
}

/******************************************************
 * This is how to configure ldap
 ******************************************************/
//ldap.server.url="ldaps://ldap.host:3269"
//ldap.search.base="dc=gluos"
//ldap.search.user="cn=Artifactoryr,ou=Pseudo-Users,dc=gluos"
//ldap.search.pass="*****"
//ldap.username.attribute="sAMAccountName"


console.defaults =
  [
      // customCss can be a String (use """ notation in order to make it easy) or a URI
      customCss: null,

      // set to true if you want the agent links on the dashboard to go to the individual agent
      // page rather than adding a filter
      dashboardAgentLinksToAgent: false,

      dashboard:
      [
        [ name: "mountPoint", source: "mountPoint" ],
        [ name: "agent",      source: "agent"],
        [ name: "tags",       source: "tags",       groupBy: "uniqueVals"],
        [ name: "container",  source: "metadata.container.name"],
        [ name: "version",    source: "metadata.version"],
        [ name: "product",    source: "metadata.product"],
        [ name: "cluster",    source: "metadata.cluster"],
        [ name: "status",     source: "status" ],
        [ name: "statusInfo", source: "statusInfo", groupBy: "vals", visible: false],
        [ name: "state",      source: "state",                       visible: false]
      ],

    tags:
    [
      'webapp': [background: '#ec7000', color: '#fff0e1'],
      'frontend': [background: '#006633', color: '#f1f5ec'],
      'backend': [background: '#5229a3', color: '#e0d5f9'],
    ],

      model:
      [
          agent: [name: 'agent'],
          'tags.webapp': [name: 'webapp'],
         'metadata.container.name': [name: 'container'],
          'metadata.product': [name: 'product'],
          'metadata.version': [name: 'version'],
          'metadata.cluster': [name: 'cluster']
      ],

      shortcutFilters:
      [
          [
              name: 'product',
              source: 'metadata.product',
              header: ['version']
          ]
      ],

    // set this value to true if you don't want to allow for model update (the text area)
    // meaning you can only load a new model
    disableModelUpdate: false,


      header:
      [
          metadata: ['drMode']
      ],

    // map which defines the actions available for a given mountPoint (agents page)
    //
    // - key is "state of the mountPoint" (meaning, if the state of the mountPoint is "<key>" then
    //   display the actions defined by the value)
    //   * The key "-" is special and is reserved for the actions to display when the state does
    //     not have an entry (in this example, everything besides running).
    //   * The key "*" is special and is reserved for the actions to display all the time.
    //
    // - value is a map defining what to do (ex: bounce, undeploy) as well as extra informations
    //
    // This example represents the default values used if not defined
/*
    mountPointActions: [
      running: [
        [planType: "transition", displayName: "Stop", state: "stopped"],
        [planType: "bounce", displayName: "Bounce"],
      ],

      // all other states
      "-": [
        [planType: "transition", displayName: "Start", state: "running"],
      ],

      // actions to include for all states
      "*": [
        [planType: "undeploy", displayName: "Undeploy"],
        [planType: "redeploy", displayName: "Redeploy"],
      ]
    ],
*/

    // array which defines the actions available (as well as the order) on the 'Plans' subtab
    //
    // each item in the array is of the same type as the value in the mountPointActions definition
    //
    // This example represents the default values used if not defined
/*
    plans: [
      [planType: "deploy"],
      [planType: "bounce"],
      [planType: "redeploy"],
      [planType: "undeploy"],
      [planType: "transition", displayName: "Stop", state: "stopped"],
    ],
*/
    // features that can be turned on and off
    features:
    [
      commands: true
    ],

  ]
@gospodinbodurov

This comment has been minimized.

gospodinbodurov commented Apr 30, 2013

If you want, I can provide version of the mysql jetty library, too.

@ypujante

This comment has been minimized.

Member

ypujante commented Apr 30, 2013

Hmmm.. I am a bit puzzled. Your config file looks fine. Could you describe the exact steps you took to go from 4.5.0 to 5.0.0? Maybe that will give me a clue. Also, when I get a chance I will try to reproduce using your config file.

A couple of things to check:

  • are you sure you don't have another config file as glu is trying to load several:
[ "${System.properties['user.dir']}/conf/glu-console-webapp.groovy",
  "${userHome}/.org.linkedin.glu/glu-console-webapp.groovy"].each { String filename ->
  • can you boot the console and copy/paste the boot sequence from the console.log file
@gospodinbodurov

This comment has been minimized.

gospodinbodurov commented Apr 30, 2013

Actually I found the problem it is the same as this one in Amazon, which I reported 7 or 8 months ago. The console server was not able to find its own hostname. The machine was on included in the DNS records and this lovely java function getLocalHost thrown an exception again. It will be a good idea to investigate what to happen in such condition, maybe you can add some kind of check whether the correct localhost is found?

Best,
Gospodin

@ypujante

This comment has been minimized.

Member

ypujante commented Apr 30, 2013

I am a bit puzzled that the console would boot if getLocalHost throws an exception and then fail later. I will implement a fix for the not a boolean error message, but the root of the problem is totally different and related to issue #164 Would you mind posting how you worked around the exception?

@gospodinbodurov

This comment has been minimized.

gospodinbodurov commented May 7, 2013

Hi sorry for being late, but here was Easter during the last week. Actually, I created DNS server and added a record for console server machine. This solved the problem. I am sure, but this problem can be related to reading the config files via localhost? getLocalHost exception was treated like a WARNING by the jetty server and I am not sure what will be the state of localhost variable in glu after ignoring this warning.

@ypujante

This comment has been minimized.

Member

ypujante commented Jul 27, 2013

In regards to the getLocalHost() issue, glu 5.1.0 now has the concept of externalHost that can be defined in the meta model (https://github.com/pongasoft/glu/blob/master/provisioner/org.linkedin.glu.provisioner-core/src/main/java/org/pongasoft/glu/provisioner/core/metamodel/ConsoleMetaModel.java#L80)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment