Closed latot closed 1 year ago
I cannot reproduce this, for me the container is running happily. (I only had to add --platform=linux/amd64
on arm Linux.)
What do
postgres$get_exit_status()
postgres$read_error()
say?
Hi, I try put the param on docker, sadly, does not works, I should had provided more info.
I'm using Gentoo 64 (Linux)
> postgres <- processx::process$new(
"docker",
c(
"run",
"--rm",
"-p", "5433:5432",
"-e", "POSTGRES_USER=user",
"-e", "POSTGRES_PASSWORD=password",
"-e", "POSTGRES_DB=db",
"postgis/postgis",
"-c", "max_worker_processes=8",
"-c", "max_parallel_workers=7",
"-c", "max_parallel_workers_per_gather=7",
"-c", "max_parallel_maintenance_workers=7", "--platform=linux/amd64"
))
> postgres
PROCESS 'docker', running, pid 94310.
> postgres
PROCESS 'docker', running, pid 94310.
> postgres
PROCESS 'docker', running, pid 94310.
> postgres
PROCESS 'docker', finished.
> postgres
PROCESS 'docker', finished.
> postgres$get_exit_status()
[1] 125
> postgres$read_error()
Error in `process_get_error_connection(self, private)`:
! stderr is not a pipe.
Type .Last.error to see the more details.
> .Last.error
<rlib_error_3_0/rlib_error/error>
Error in `process_get_error_connection(self, private)`:
! stderr is not a pipe.
---
Backtrace:
1. postgres$read_error()
2. processx:::process_read_error(self, private, n)
3. processx:::process_get_error_connection(self, private)
4. processx:::throw(new_error("stderr is not a pipe."))
You still need to use stdout = "|", stderr = "|"
to be able to read the standard output and error.
Well, there is a weird things:
kill
on the process, literally kills it, don't close it, due to that, seems docker is not able to clean the container (is runing with --rm
)platform
from R, in the terminal all works fine without that param.Instead kill, interrupt
does the trick :)
Thx!
kill
on the process, literally kills it, don't close it, due to that, seems docker is not able to clean the container (is runing with --rm
)You can use $signal(15)
to send a SIGTERM
, that is better than SIGINT
and SIGKILL
.
I don't get why we need platform from R, in the terminal all works fine without that param.
You might not, I needed it, because I am on an arm machine, and this container seems to be amd64 only.
Hi, seems signal 15 does not close it, for now only works interrupt.
Hi, I'm trying to run a temporary container from this lib, the idea is can set it up, work, and then close the process, docker will clean the files:
This will setup temporary Postgres Database with Postgis support (spatial data):
Well, this is weird, because, first, I don't have any logs here, second, what I got is this:
So, for some reason it just finished.... D:
I tryied to use
read_output_lines()
but nothing.Thx!