question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pg2b3dm: Exception while connecting

See original GitHub issue

What im doing wrong? Use docker on Win10 with PowerShell

same error for a wrong ip or without -h 127.0.0.1

docker run -it -v ${PWD}/output:/app/output geodan/pg2b3dm -h 127.0.0.1 -U postgres -c geom -t lod2 -d postgres -i id --shaderscolumn color
tool: pg2b3dm 0.10.0.0
password for user postgres:
start processing....
input table:  lod2
input geometry column:  geom
output directory:  ./output/tiles
geometric errors: 500,0
Unhandled exception. Npgsql.NpgsqlException (0x80004005): Exception while connecting
 ---> System.Net.Sockets.SocketException (111): Connection refused
   at Npgsql.NpgsqlConnector.Connect(NpgsqlTimeout timeout)
   at Npgsql.NpgsqlConnector.Connect(NpgsqlTimeout timeout)
   at Npgsql.NpgsqlConnector.RawOpen(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.ConnectorPool.AllocateLong(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Npgsql.NpgsqlConnection.Open()
   at B3dm.Tileset.BoundingBoxRepository.GetBoundingBox3DForTable(NpgsqlConnection conn, String geometry_table, String geometry_column, String query) in /src/b3dm.tileset/BoundingBoxRepository.cs:line 31
   at pg2b3dm.Program.<>c.<Main>b__1_0(Options o) in /src/pg2b3dm/Program.cs:line 88
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at pg2b3dm.Program.Main(String[] args) in /src/pg2b3dm/Program.cs:line 24

SELECT st_astext(geom), id, color FROM public.lod2;

geom: POLYHEDRALSURFACE Z (((7.582985649336324 51.53392380052991 77.314,7.583014764087601 51.5338475198775 77.314,7.583042164344734 51.533891913092894 82.256,7.582985649336324 51.53392380052991 77.314)),((7.583212412682651 51.53387713581456 77.314,7.583183422196508 51.533953139253995 77.314,7.583155959927464 51.53390888020825 82.256,7.583212412682651 51.53387713581456 77.314)),((7.583014764087601 51.5338475198775 77.314,7.583212412682651 51.53387713581456 77.314,7.583155959927464 51.53390888020825 82.256,7.583014764087601 51.5338475198775 77.314)),((7.583042164344734 51.533891913092894 82.256,7.583014764087601 51.5338475198775 77.314,7.583155959927464 51.53390888020825 82.256,7.583042164344734 51.533891913092894 82.256)),((7.583183422196508 51.533953139253995 77.314,7.582985649336324 51.53392380052991 77.314,7.583042164344734 51.533891913092894 82.256,7.583183422196508 51.533953139253995 77.314)),((7.583155959927464 51.53390888020825 82.256,7.583183422196508 51.533953139253995 77.314,7.583042164344734 51.533891913092894 82.256,7.583155959927464 51.53390888020825 82.256)),((7.583212412682651 51.53387713581456 77.314,7.583014764087601 51.5338475198775 77.314,7.583014764087601 51.5338475198775 70.424,7.583212412682651 51.53387713581456 77.314)),((7.583212412682651 51.53387713581456 70.424,7.583212412682651 51.53387713581456 77.314,7.583014764087601 51.5338475198775 70.424,7.583212412682651 51.53387713581456 70.424)),((7.583014764087601 51.5338475198775 77.314,7.582985649336324 51.53392380052991 77.314,7.582985649336324 51.53392380052991 70.424,7.583014764087601 51.5338475198775 77.314)),((7.583014764087601 51.5338475198775 70.424,7.583014764087601 51.5338475198775 77.314,7.582985649336324 51.53392380052991 70.424,7.583014764087601 51.5338475198775 70.424)),((7.582985649336324 51.53392380052991 77.314,7.583183422196508 51.533953139253995 77.314,7.583183422196508 51.533953139253995 70.424,7.582985649336324 51.53392380052991 77.314)),((7.582985649336324 51.53392380052991 70.424,7.582985649336324 51.53392380052991 77.314,7.583183422196508 51.533953139253995 70.424,7.582985649336324 51.53392380052991 70.424)),((7.583183422196508 51.533953139253995 77.314,7.583212412682651 51.53387713581456 77.314,7.583212412682651 51.53387713581456 70.424,7.583183422196508 51.533953139253995 77.314)),((7.583183422196508 51.533953139253995 70.424,7.583183422196508 51.533953139253995 77.314,7.583212412682651 51.53387713581456 70.424,7.583183422196508 51.533953139253995 70.424)),((7.583183422196508 51.533953139253995 70.424,7.583014764087601 51.5338475198775 70.424,7.582985649336324 51.53392380052991 70.424,7.583183422196508 51.533953139253995 70.424)),((7.583183422196508 51.533953139253995 70.424,7.583212412682651 51.53387713581456 70.424,7.583014764087601 51.5338475198775 70.424,7.583183422196508 51.533953139253995 70.424)))

color: #f5f5f5 id: helloWorld

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
enersis-pstcommented, Mar 10, 2021

yes without it works 😃. Maybe because i only use color value and not a json object.

0reactions
berttcommented, Mar 10, 2021

yes it needs to be a json object

Read more comments on GitHub >

github_iconTop Results From Across the Web

Geodan/pg2b3dm: Tool for converting from PostGIS to b3dm ...
Tool for converting 3D geometries from PostGIS to 3D Tiles/b3dm tiles. This software started as a port of py3dtiles (https://github.com/Oslandia/py3dtiles) for ...
Read more >
pg2b3dm: Exception while connecting - githubmemory
looks like it coudnt connect to my local db. With a docker included db it could connect. ${PWD} works in Powershell. now i...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found