我删除了/usr/lib/mysql
,/etc/mysql
删除了mariadb,并使用yaourt -Rsn maraidb
卸载了mariadb服务器。
mariadb(mysqld)因重新安装mariadb导致丢失一些文件而失败。 日志是:
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
[Note] Recovering after a crash using mysql-bin
[Note] Starting crash recovery...
[Note] Crash recovery finished.
[Warning] Failed to load slave replication state from table
mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos>
[ERROR] Can't open and lock privilege tables: Table 'mysql.servers'
doesn't exist
[Note] Server socket created on IP: '::'.
[ERROR] Fatal error: Can't open and lock privilege tables: Table
'mysql.user' doesn't exist
似乎mariadb没有成功初始化,但我无法弄清楚如何修复它。 谁能帮我?非常感谢。
答案 0 :(得分:0)
安装后注意:
您需要在启动服务之前初始化MariaDB数据目录。这可以使用mysql_install_db命令完成,例如:
/usr/lib/jvm/java-8-oracle/bin/java -Dfile.encoding=UTF-8 -classpath /home/user/jsboss-install-dir/idea-IU-173.4548.28/lib/idea_rt.jar com.intellij.rt.execution.CommandLineWrapper /tmp/idea_classpath com.intellij.javaee.oss.process.JavaeeProcess 35135 com.intellij.javaee.oss.jboss.agent.JBoss71Agent
/home/user/jsboss-install-dir/EAP-6.4.0/bin/standalone.sh
[2018-03-23 12:18:15,364] Artifact my-app:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 9999
Detected server http port: 8080
JAVA_OPTS already set in environment; overriding default settings with values: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:40537,suspend=y,server=n -javaagent:/home/user/jsboss-install-dir/idea-IU-173.4548.28/lib/rt/debugger-agent.jar=/tmp/capture.props
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/user/jsboss-install-dir/EAP-6.4.0
JAVA: /usr/lib/jvm/java-8-oracle/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -verbose:gc -Xloggc:"/home/user/jsboss-install-dir/EAP-6.4.0/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:40537,suspend=y,server=n -javaagent:/home/user/jsboss-install-dir/idea-IU-173.4548.28/lib/rt/debugger-agent.jar=/tmp/capture.props
=========================================================================
Connected to the target VM, address: '127.0.0.1:40537', transport: 'socket'
12:18:15,746 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.6.Final-redhat-1
12:18:15,951 INFO [org.jboss.msc] (main) JBoss MSC version 1.1.5.Final-redhat-1
12:18:16,110 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015899: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) starting
12:18:17,193 INFO [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.13.GA-redhat-1
12:18:17,197 INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.13.GA-redhat-1
12:18:17,204 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
12:18:17,215 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.3.4.Final-redhat-1
12:18:17,276 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
12:18:17,282 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
12:18:17,317 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013371: Activating Security Subsystem
12:18:17,323 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 39) JBAS011800: Activating Naming Subsystem
12:18:17,326 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
12:18:17,332 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
12:18:17,335 INFO [org.jboss.as.security] (MSC service thread 1-5) JBAS013370: Current PicketBox version=4.1.1.Final-redhat-1
12:18:17,351 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 37) JBAS012615: Activated the following JSF Implementations: [main, 1.2]
12:18:17,359 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
12:18:17,420 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
12:18:17,421 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]
12:18:17,422 INFO [org.jboss.as.connector.logging] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.31.Final-redhat-1)
12:18:17,760 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
12:18:17,769 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
12:18:17,846 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
12:18:17,846 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/employee_storage]
12:18:17,872 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on 127.0.0.1:9999
12:18:17,873 INFO [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on 127.0.0.1:4447
12:18:17,888 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory /home/user/jsboss-install-dir/EAP-6.4.0/standalone/deployments
12:18:17,906 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.4.Final-redhat-1
Mar 23, 2018 12:18:17 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.13.GA-redhat-1
Mar 23, 2018 12:18:18 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.13.GA-redhat-1
Mar 23, 2018 12:18:18 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.3.4.Final-redhat-1
12:18:18,128 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
12:18:18,128 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
12:18:18,128 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 2657ms - Started 159 of 197 services (57 services are lazy, passive or on-demand)
Connected to server
[2018-03-23 12:18:18,519] Artifact my-app:war exploded: Artifact is being deployed, please wait...
12:18:18,668 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "my-app" (runtime-name: "my-app.war")
12:18:19,387 INFO [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011401: Read persistence.xml for employeeUnit
12:18:19,553 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named SingletonBeanImpl in deployment unit deployment "my-app.war" are as follows:
java:global/my-app/SingletonBeanImpl!com.egs.preparation.rest.service.SingletonBean
java:app/my-app/SingletonBeanImpl!com.egs.preparation.rest.service.SingletonBean
java:module/SingletonBeanImpl!com.egs.preparation.rest.service.SingletonBean
java:global/my-app/SingletonBeanImpl
java:app/my-app/SingletonBeanImpl
java:module/SingletonBeanImpl
12:18:19,553 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named TestServiceImpl in deployment unit deployment "my-app.war" are as follows:
java:global/my-app/TestServiceImpl!com.egs.preparation.rest.service.TestService
java:app/my-app/TestServiceImpl!com.egs.preparation.rest.service.TestService
java:module/TestServiceImpl!com.egs.preparation.rest.service.TestService
java:global/my-app/TestServiceImpl
java:app/my-app/TestServiceImpl
java:module/TestServiceImpl
12:18:19,706 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
12:18:19,707 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
12:18:19,729 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 25) JBAS011402: Starting Persistence Unit Service 'my-app#employeeUnit'
12:18:19,837 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 25) HCANN000001: Hibernate Commons Annotations {4.0.2.Final-redhat-1}
12:18:20,762 INFO [org.jboss.web] (ServerService Thread Pool -- 24) JBAS018210: Register web context: /my-app
12:18:20,907 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015859: Deployed "my-app" (runtime-name : "my-app.war")
[2018-03-23 12:18:20,935] Artifact my-app:war exploded: Artifact is deployed successfully
[2018-03-23 12:18:20,935] Artifact my-app:war exploded: Deploy took 2,416 milliseconds
12:18:26,750 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-app].[Jersey REST Service]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet Jersey REST Service threw exception: java.lang.NullPointerException
at com.egs.preparation.rest.controller.DocumentResourceBean.greeting(DocumentResourceBean.java:43) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [jersey-container-servlet-core-2.25.1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_161]
不要忘记它。