Projects tigase _server tigase-http-api Issues #40
setup module is not compatible with 7.2.0 (#40)
wojciech.kapcia@tigase.net opened 8 years ago
Due Date
2017-04-06
2017-02-14 19:18:08.321 [main]             AbstractBeanConfigurator.configure()  WARNING: Can't prepare value of property 'admin-credentials' of bean 'setup': 'admin:tigase'
tigase.kernel.KernelException: Unknown bean 'setup#KERNEL'.
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:380)
        at tigase.kernel.beans.config.AbstractBeanConfigurator.configure(AbstractBeanConfigurator.java:88)
        at tigase.component.DSLBeanConfiguratorWithBackwardCompatibility.configure(DSLBeanConfiguratorWithBackwardCompatibility.java:48)
        at tigase.kernel.beans.config.AbstractBeanConfigurator.configure(AbstractBeanConfigurator.java:164)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:137)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:578)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:759)
        at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1334)
        at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1003)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:146)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:578)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:384)
        at tigase.server.Bootstrap.start(Bootstrap.java:110)
        at tigase.server.XMPPServer.start(XMPPServer.java:138)
        at tigase.server.XMPPServer.main(XMPPServer.java:119)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Andrzej Wójcik (Tigase) commented 8 years ago

While working on setup module we need to take into account changes in default behaviour described in #4888 in comment #33

Andrzej Wójcik (Tigase) commented 8 years ago

I've fixed this issue during work on #4880. In fact wrong fields were annotated with @ConfigField and now it should be set as:

http () {
    setup () {
        'admin-user' = 'admin'
	'admin-password' = 'tigase'
    }
}

so for starting with scratch - we have no configuration and we want to launch setup - following config should be used:

'config-mode' = 'setup'

http () {
    setup () {
        'admin-user' = 'admin'
	'admin-password' = 'tigase'
    }
}
wojciech.kapcia@tigase.net commented 8 years ago

There seems to be something wrong with Kernel as latest nightly doesn't start with the provided config:

wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists/tigase-server-7.2.0-SNAPSHOT-b4759 $ less logs/tigase-console.log
wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists/tigase-server-7.2.0-SNAPSHOT-b4759 $ cat etc/init.properties
'config-mode' = 'setup'

http () {
    setup () {
        'admin-user' = 'admin'
        'admin-password' = 'tigase'
    }
}
wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists/tigase-server-7.2.0-SNAPSHOT-b4759 $ cat logs/tigase-console.log
STARTED Tigase Wed Apr  5 13:05:09 -03 2017
componentInfo{Title=Tigase XMPP Server, Version=7.2.0-SNAPSHOT-b4759/e7432aa7 (2017-04-04/23:10:36), Class=tigase.xml.XMLUtils}
componentInfo{Title=Tigase XMPP Server, Version=7.2.0-SNAPSHOT-b4759/e7432aa7 (2017-04-04/23:10:36), Class=tigase.util.ClassUtil}
componentInfo{Title=Tigase XMPP Server, Version=7.2.0-SNAPSHOT-b4759/e7432aa7 (2017-04-04/23:10:36), Class=tigase.server.XMPPServer}
2017-04-05 13:05:09.794 [main]             ConfiguratorAbstract.parseArgs()        CONFIG:   Setting defaults: --property-file = etc/init.properties
2017-04-05 13:05:11.767 [main]             DNSResolverDefault.<init>()             WARNING:  Resolving default host name: localhost took: 11

Please see complete logs (attachment:logs.tar.gz) for details.

Andrzej Wójcik (Tigase) commented 8 years ago

Yes, I was writting this config from memory as it was faster than copying from file. It should be:

'config-type' = 'setup'

http () {
    setup () {
        'admin-user' = 'admin'
    'admin-password' = 'tigase'
    }
}

so config-type - not @config-mode@.

wojciech.kapcia@tigase.net commented 8 years ago

WIth the updated config I receive:

404 Not Found

No context found for request

At any rate:

  • we should avoid flooding logs: #5208

  • before assigning the issue back for check please try next complete nightly build if it works for you.

wojciech.kapcia@tigase.net commented 8 years ago

OK, after a little chat - in setup mode only setup context is available (hence above error while navigating to http://localhost:8080/) - it works with http://localhost:8080/setup/

I think in setup mode we should have automatic redirect to the setup context.

And possibly in the log print information something like "please setup server at

Andrzej Wójcik (Tigase) commented 8 years ago

I've added information about how to access setup when server is started in setup mode and added automatic redirection from root context to setup if setup mode is active.

wojciech.kapcia@tigase.net commented 8 years ago

It's perfect now! Thank you.

wojciech.kapcia@tigase.net commented 8 years ago

Eric, can you close this as well?

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
4896
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-http-api#40
Please wait...
Page is in error, reload to recover