docker run --name tigase-server -p 8080:8080 -p 5222:5222 tigase/tigase-xmpp-server:8.1.0
=====================
Could not initialize bean default (class: class tigase.db.beans.DataSourceBean$DataSourceMDConfigBean), skipping injection of this bean
RootCause:
-> java.lang.reflect.InvocationTargetException
[java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)]
-> java.lang.RuntimeException: java.lang.RuntimeException: Could not initialize tigase.db.jdbc.DataRepositoryImpl for name 'default'
[java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)]
-> java.lang.RuntimeException: Could not initialize tigase.db.jdbc.DataRepositoryImpl for name 'default'
[tigase.db.beans.MDPoolConfigBean.lambda$setInstances$0(MDPoolConfigBean.java:179)]
-> tigase.db.DBInitException: Database initialization failed
[tigase.db.jdbc.DataRepositoryImpl.initialize(DataRepositoryImpl.java:318)]
-> com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)]
-> java.net.ConnectException: Connection refused (Connection refused)
[java.base/java.net.PlainSocketImpl.socketConnect(Native Method)]
@HeroBarry please use English so more people can participate :-)
For people stumbling against this issue: the OP set up tigase-server in docker with database connection configured with localhost, which obviously is not provided within docker image.
Solution: use dedicated database instance (for example MySQL) and during setup provide it's hostname.
docker run --name tigase-server -p 8080:8080 -p 5222:5222 tigase/tigase-xmpp-server:8.1.0
始终不能初始化通过
要怎么设置数据库连接?
http://localhost:8080/setup 设置的内容为: