Skip to content
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

Unable to initialize tigase in docker #45

Open
josephgeorgek opened this issue Jul 24, 2020 · 4 comments
Open

Unable to initialize tigase in docker #45

josephgeorgek opened this issue Jul 24, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@josephgeorgek
Copy link

We are setting Tigase within Docker container.
However, we are unable to perform initialization activities such as setting predefined API KEY for tigase in docker without accessing GUI. With GUI, means we need to restart other application servers which consumes this API key. Hence GUI is not an option. Please advice how this can be accomplished .. for instance is there any way such as REST api or DB scripts or file property update that can be performed during the docker start up.

@woj-tek
Copy link
Contributor

woj-tek commented Jul 24, 2020

We do have a REST API however it's not possible to manage API Keys before creating just one (for example using installer).

If your case, where the aim is to have unattended setup, you have following options:

  • connect using XMPP client and execute ad-hoc command (see XEP-0050: Ad-Hoc Commands) on REST module of HTTP-API component to add API key (same ad-hocs are used in Web AdminUI)
  • in the repository add user rest@http and for that user add (in tig_pairs bridged via tig_nodes as explained in Tigase Schema documentation property with key = api-keys and value being XML representation, e.g.: <api-key owner="admin@awesome-tigase.org" key="a2751e90-178b-461c-adf4-39c6315a52e4"/>
  • create your own implementation of ApiKeyRepository (tigase.http.modules.rest.ApiKeyRepository) that would retrieve API keys from desired source (file storage or other database/repository)

@woj-tek
Copy link
Contributor

woj-tek commented Jul 24, 2020

You can also use Tigase Command Line Management Tool which internally is an XMPP client, but allows you to manage Tigase from the command line.

@agustino-lim
Copy link

Hello @woj-tek ,

I encounter similar issue. I tried to run this script in the docker https://github.com/tigase/tigase-docker-support/blob/master/8.0.0/scripts/start.sh. It performs upgade-schema operation, but adminJID is not created in the schema. So I am not able to login into admin page after the server is started.

Can you please advise why adminJID is not created?

Thanks

@woj-tek
Copy link
Contributor

woj-tek commented Jul 27, 2020

@agustino-lim I assume you don't want to to use WebInstaller (as described in QuickStart guide)?

And you do provide your configuration config.tdsl so that the schema is correctly created? In that case, after you start the server you can simply use jabber:iq:register and register account with JID matching one configured in config.tdsl file.

@woj-tek woj-tek added the bug Something isn't working label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants