I am trying to copy the database of a project that is on Heroku, I pass the command that is on the same Heroku page to download the database
heroku pg:pull DATABASE_URL <Nombre_de_la_db_local> --app <Nombre_de_la_app_en_heroku>
And it starts to download the DB without problems, the error starts when it starts pg_dump: salvando las definiciones de la base de datos
and it throws me the following error
pg_restore: [archiver] versión no soportada (1.14) en el encabezado del archivo
pg_dump: extrayendo el contenido de la tabla «public.actividad_economicas»
events.js:187
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:150:25)
at writeGeneric (internal/stream_base_commons.js:141:3)
at Socket._writeGeneric (net.js:770:11)
at Socket._write (net.js:782:8)
at doWrite (_stream_writable.js:431:12)
at writeOrBuffer (_stream_writable.js:415:5)
at Socket.Writable.write (_stream_writable.js:305:11)
at Socket.ondata (_stream_readable.js:726:22)
at Socket.emit (events.js:210:5)
at addChunk (_stream_readable.js:308:12)
Emitted 'error' event on Socket instance at:
at errorOrDestroy (internal/streams/destroy.js:108:12)
at Socket.onerror (_stream_readable.js:758:7)
at Socket.emit (events.js:210:5)
at errorOrDestroy (internal/streams/destroy.js:108:12)
at onwriteError (_stream_writable.js:446:5)
at onwrite (_stream_writable.js:473:5)
at internal/streams/destroy.js:50:7
at Socket._destroy (net.js:663:5)
at Socket.destroy (internal/streams/destroy.js:38:8)
at afterWriteDispatched (internal/stream_base_commons.js:150:17) {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
}
I have Ruby 2.4.6 and Rails 4.2.8, note this error hasn't happened to me before!
I finally managed to solve all my problems! 1) I had Postgresql 11.5 and 12.1 installed at the same time (OS Ubuntu 18.4.3) so I removed Postgresql completely (Which was a bad idea, because I only had to remove either 11.5 or 12.1) I just reinstalled Postgresql 12.1, 2) Reinstall PGadmin4 but when I had problems with the connection, check as ROOT user who touched the port :80 that was failing me, I did it with
netstat -tulpn | grep :80
or alsonetstat -ntlp | grep :80
3) uninstall nginx that was using the port :80 and end its process withkill -9 495
y ready all good.