Forum Discussion

willianmsantos's avatar
willianmsantos
Frequent Visitor
9 years ago
Solved

Postgresql: Exception while reading from stream

 

 

Hello Dear Community!

 

Has anyone ever got this message while trying to connect to a Postgre DB? What was the workaround? 

 

Thanks in advance!

Will

 

 

  •  

    Hello Community!

     

    That was definelty some firewalls dropping packages between the server I have the client installed and the database. I asked firewall team to open the route between source and destination and It worked properly.

    Thanks for your insights!

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Go to Edit Queries->Advanced Editor-> add timeout in the connection

     

    Source = PostgreSQL.Database("server_name", "database_name", [CommandTimeout=#duration(5, 0, 0, 0)]),

    • kkk93's avatar
      kkk93
      Frequent Visitor

      Does this step have to be done for all the tables? Or is this there a way where I can apply this timeout to all the tables? Once I open the advanced editor, it has the query for that particular table which is open.

  • Jake_Roesler's avatar
    Jake_Roesler
    Frequent Visitor

    Bad news. This may well be the first of many errors you'll get trying to connect to a Postgresql data source. 

     

    I've been banging my head against a Certificate error for a week. 

    • willianmsantos's avatar
      willianmsantos
      Frequent Visitor

      That's sad, I've spent most of day yesterday struggling over this issue. I hope to get back with some good news. :)

       

    • willianmsantos's avatar
      willianmsantos
      Frequent Visitor

       

      Hello Community!

       

      That was definelty some firewalls dropping packages between the server I have the client installed and the database. I asked firewall team to open the route between source and destination and It worked properly.

      Thanks for your insights!

      • maxianren's avatar
        maxianren
        New Member

        how to "open the route between source and destination"? could you please give me some details? thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    This error may happen when connection string is lacking port number. Try using server:port in connection string to Postgres database.

    • Anonymous's avatar
      Anonymous
      Not applicable

      How to do that? 

      I have the same problem. I can't connect Postgres DB to Power BI 😥

  • In my case the problem was that I misspelled the name of my database...The name is defined as XXXXDb and I was passing XXXXDB.