Code Monkey home page Code Monkey logo

Comments (6)

gaborcsardi avatar gaborcsardi commented on July 30, 2024

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?

from processx.

latot avatar latot commented on July 30, 2024

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."))

from processx.

gaborcsardi avatar gaborcsardi commented on July 30, 2024

You still need to use stdout = "|", stderr = "|" to be able to read the standard output and error.

from processx.

latot avatar latot commented on July 30, 2024

Well, there is a weird things:

  • I notice there was a running docker in the same port, so the error tells me that
  • Using 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)
  • I don't get why we need platform from R, in the terminal all works fine without that param.

Instead kill, interrupt does the trick :)

Thx!

from processx.

gaborcsardi avatar gaborcsardi commented on July 30, 2024
  • Using 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.

from processx.

latot avatar latot commented on July 30, 2024

Hi, seems signal 15 does not close it, for now only works interrupt.

from processx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.