user3138166
user3138166

Reputation: 11

presto No factory for connector mysql

I clone presto from github and build the project. But when I tried to run PrestoServer, an exception was thrown as java.lang.IllegalArgumentException: No factory for connector mysql. The detailed output as follow:

2014-12-10T16:48:31.617+0800 INFO main org.eclipse.jetty.util.log Logging initialized @12338ms 2014-12-10T16:48:32.117+0800 WARN main io.airlift.jmx.JmxAgent Cannot determine if JMX agent is already running (not an Oracle JVM?). Will try to start it manually. 2014-12-10T16:48:33.024+0800
INFO main io.airlift.jmx.JmxAgent JMX agent started and listening on lin-virtual-machine:35776 2014-12-10T16:48:34.073+0800 ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (collector/general): Lookup of collector failed for http://myhost.com:8080/v1/service/collector/general 2014-12-10T16:48:34.112+0800 ERROR Discovery-2 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (presto/general): Lookup of presto failed for http://myhost.com:8080/v1/service/presto/general 2014-12-10T16:48:46.273+0800
INFO main org.eclipse.jetty.server.Server jetty-9.2.z-SNAPSHOT 2014-12-10T16:48:46.288+0800
WARN main org.eclipse.jetty.server.handler.AbstractHandler No Server set for org.eclipse.jetty.server.handler.ErrorHandler@4f6a5cc9 2014-12-10T16:48:55.883+0800
INFO main org.eclipse.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@420dde28{/,null,AVAILABLE,@http} 2014-12-10T16:48:56.001+0800
INFO main org.eclipse.jetty.server.ServerConnector Started http@712213ed{HTTP/1.1}{0.0.0.0:8080} 2014-12-10T16:48:56.002+0800
INFO main org.eclipse.jetty.server.Server Started @36725ms 2014-12-10T16:48:57.102+0800
INFO Discovery-3 io.airlift.discovery.client.CachingServiceSelector Discovery server connect succeeded for refresh (collector/general) 2014-12-10T16:48:57.116+0800
INFO Discovery-0 io.airlift.discovery.client.CachingServiceSelector Discovery server connect succeeded for refresh (presto/general) 2014-12-10T16:48:57.958+0800
INFO main io.airlift.bootstrap.LifeCycleManager Life cycle starting... 2014-12-10T16:48:57.958+0800
INFO main io.airlift.bootstrap.LifeCycleManager Life cycle startup complete. System ready. 2014-12-10T16:48:57.959+0800
INFO main com.facebook.presto.metadata.CatalogManager -- Loading catalog /home/lin/presto-server-0.86/etc/catalog/mysql.properties --

2014-12-10T16:48:57.973+0800 ERROR main com.facebook.presto.server.PrestoServer No factory for connector mysql java.lang.IllegalArgumentException: No factory for connector mysql at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[jar:rsrc:guava-18.0.jar!/:na] at com.facebook.presto.connector.ConnectorManager.createConnection(ConnectorManager.java:97) ~[rsrc:./:na] at com.facebook.presto.metadata.CatalogManager.loadCatalog(CatalogManager.java:88) ~[rsrc:./:na] at com.facebook.presto.metadata.CatalogManager.loadCatalogs(CatalogManager.java:70) ~[rsrc:./:na] at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:108) [rsrc:./:na] at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:60) [rsrc:./:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) [presto-main.jar:na] 2014-12-10T16:48:57.977+0800

INFO Thread-142 io.airlift.bootstrap.LifeCycleManager Life cycle stopping...

Upvotes: 1

Views: 1437

Answers (1)

nirali.gandhi
nirali.gandhi

Reputation: 221

I had the same issue. After viewing logs , got the issue. In properties file I was passing "mysql " instead of "mysql". It doesn't trim properties data.

Upvotes: 1

Related Questions