Connect to Postgres Mac OS

I installed a single node on my Mac (Mojave 10.14.6) using Docker. Service started, was able to create account, etc. but cannot connect to a Postgres Database running on localhost. I just get “Failure while configuring source [postgres].” I know there’s no issues with the Postgres Database because I can connect to it in local DB clients.

Any ideas?

Hello @enimga,

What do the Dremio server.log report when you get this error in the UI?

I am struggling to find the server.log on my machine. Where is this normally located?

Apologies, I didn’t realize you’re using docker.

How are you running the container? If you just use docker run <image> then the logs will print to your terminal.

If you are using Kubernetes then you’d use kubectl logs <dremio pod> and that would pipe your terminal output.

I’m not sure how much is necessary, but here’s part of where the errors occur.

Alternatively, I would prefer not run Dremio in Docker but can’t seem to find a downloadble .dmg to run Dremio in Mac OSx as an application

[18/Sep/2019:21:03:54 +0000] "GET /api/v3/source/type/POSTGRES HTTP/1.1" 200 1403 "http://localhost:9047/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:69.0) Gecko/20100101 Firefox/69.0" 2019-09-18 21:04:42,505 [Plugin Startup: Postgres] ERROR c.d.e.store.jdbc.JdbcStoragePlugin - Connection is not valid. java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2327) ~[commons-dbcp2-2.2.0.jar:2.2.0] at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2056) ~[commons-dbcp2-2.2.0.jar:2.2.0] at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) ~[commons-dbcp2-2.2.0.jar:2.2.0] at com.dremio.exec.store.jdbc.CloseableDataSource$DatasourceWrapper.getConnection(CloseableDataSource.java:87) ~[dremio-ce-jdbc-plugin-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.store.jdbc.JdbcStoragePlugin.getState(JdbcStoragePlugin.java:360) ~[dremio-ce-jdbc-plugin-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.ManagedStoragePlugin.setLocals(ManagedStoragePlugin.java:455) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.ManagedStoragePlugin.access$600(ManagedStoragePlugin.java:81) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.ManagedStoragePlugin$1.run(ManagedStoragePlugin.java:258) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.RenamingRunnable.run(RenamingRunnable.java:36) [dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.SingletonRunnable.run(SingletonRunnable.java:41) [dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.SafeRunnable.run(SafeRunnable.java:40) [dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.Runnables$1.run(Runnables.java:45) [dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] Caused by: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:280) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.Driver.makeConnection(Driver.java:454) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.Driver.connect(Driver.java:256) ~[postgresql-42.2.5.jar:42.2.5] at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp2-2.2.0.jar:2.2.0] at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:260) ~[commons-dbcp2-2.2.0.jar:2.2.0] at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2337) ~[commons-dbcp2-2.2.0.jar:2.2.0] at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2323) ~[commons-dbcp2-2.2.0.jar:2.2.0] ... 11 common frames omitted Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_222] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_222] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_222] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_222] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_222] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_222] at org.postgresql.core.PGStream.<init>(PGStream.java:70) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91) ~[postgresql-42.2.5.jar:42.2.5] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.5.jar:42.2.5] ... 19 common frames omitted 2019-09-18 21:04:42,603 [qtp2070960493-92] INFO c.d.exec.catalog.CatalogServiceImpl - User Error Occurred [ErrorId: 6644c48a-b92a-4d8a-9084-214edd10edac] com.dremio.common.exceptions.UserException: Failure while configuring source [Postgres]. at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:776) ~[dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.CatalogServiceImpl.createOrUpdateSource(CatalogServiceImpl.java:671) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.CatalogServiceImpl.createSource(CatalogServiceImpl.java:406) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.CatalogServiceImpl.access$600(CatalogServiceImpl.java:105) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.CatalogServiceImpl$SourceModifier.createSource(CatalogServiceImpl.java:1023) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.CatalogImpl.createSource(CatalogImpl.java:608) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.SourceAccessChecker.createSource(SourceAccessChecker.java:245) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.exec.catalog.DelegatingCatalog.createSource(DelegatingCatalog.java:206) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.dac.service.source.SourceService.registerSourceWithRuntime(SourceService.java:157) [dremio-dac-backend-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.dac.service.source.SourceService.registerSourceWithRuntime(SourceService.java:148) [dremio-dac-backend-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.dac.service.source.SourceService.registerSourceWithRuntime(SourceService.java:144) [dremio-dac-backend-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.dac.resource.PutSourceResource.putSource(PutSourceResource.java:80) [dremio-dac-backend-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222] at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.25.1.jar:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.25.1.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.25.1.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.25.1.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.25.1.jar:na] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.25.1.jar:na] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.25.1.jar:na] at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [jersey-container-servlet-core-2.25.1.jar:na] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [jersey-container-servlet-core-2.25.1.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [jersey-container-servlet-core-2.25.1.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [jersey-container-servlet-core-2.25.1.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [jersey-container-servlet-core-2.25.1.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at com.dremio.dac.server.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:52) [dremio-dac-backend-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:51) [jetty-servlets-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.Server.handle(Server.java:502) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) [jetty-io-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [jetty-io-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [jetty-io-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222] Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: Unavailable: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:500) ~[guava-20.0.jar:na] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:401) ~[guava-20.0.jar:na] at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:83) ~[guava-20.0.jar:na] at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:68) ~[guava-20.0.jar:na] at com.google.common.util.concurrent.AbstractCheckedFuture.checkedGet(AbstractCheckedFuture.java:104) ~[guava-20.0.jar:na] at com.dremio.exec.catalog.CatalogServiceImpl.createOrUpdateSource(CatalogServiceImpl.java:659) [dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] ... 66 common frames omitted Caused by: java.lang.Exception: Unavailable: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) at com.dremio.exec.catalog.ManagedStoragePlugin$1.run(ManagedStoragePlugin.java:263) ~[dremio-sabot-kernel-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.RenamingRunnable.run(RenamingRunnable.java:36) ~[dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.SingletonRunnable.run(SingletonRunnable.java:41) ~[dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.SafeRunnable.run(SafeRunnable.java:40) ~[dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071] at com.dremio.concurrent.Runnables$1.run(Runnables.java:45) ~[dremio-common-4.0.0-201909121834570395-c7a5071.jar:4.0.0-201909121834570395-c7a5071]

Hi @enimga,

Firstly, it looks like maybe the host:port you’re trying to connect to for Postgres are wrong(?), so you might want to double check:

Caused by: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Secondly, we no longer provide a Mac .dmg nor a Windows installer, but you can easily deploy with the Tarball.

From the On Prem Deploy page of Dremio.com, click on “Evaluate via TAR” which will start the Tarball download. You can just unzip this, cd to the bin directory and start Dremio with ./dremio start

You’ll need Java 8 installed. https://docs.dremio.com/deployment/system-requirements.html#java-development-kit