Git Product home page Git Product logo

Comments (6)

colearendt avatar colearendt commented on July 24, 2024 1

Sorry for missing this comment! Thanks for reaching out!

Unfortunately, there is not a way to "stop Connect" inside of the container as it is currently built because the container has Connect running as the primary process, and if that process dies, the container dies.

However, a couple of ways around this:

  • Certain parts of Connect's configuration can be "reloaded" by sending a SIGHUP to the main Connect process. There are not a lot of these, but for certain items (i.e. email settings) it can be helpful. I doubt this helps your case though.
kill -SIGHUP ${CONNECTPID}
  • The requirements on stopping Connect for various management tasks is relaxed when you are using a postgres database. For containers, it may be beneficial to migrate Connect to postgres so that you do not have this problem with stopping / starting. There are some pretty simple patterns for this out there on the web (even having Postgres in its own container), which we might ought to show more specifically in this repo.
  • In the future, we hope to remove the requirement for stopping Connect for these various management tasks.
  • This is a docker thing, but oftentimes it is possible to run the same container with a different "command." The default "command" starts Connect, licensing, etc., however if you replace this command with (say) sleep 999999, then the container will start and you get an interactive shell without Connect started.

I'd love to hear your feedback to these handful of items, and to know if / where other pain points exist!

from rstudio-docker-products.

colearendt avatar colearendt commented on July 24, 2024 1

Ugh. You're right - I'm sorry about that. I was mixing up the rscadmin tool with the usermanager. usermanager works while Connect is running if using a postgres database - rscadmin does not 😞 This is definitely something we need to fix.

What execution environment are you using for docker? Is it possible to do something like this (with any volumes / etc. for persistent data included)? You can run this alongside an existing node now that you are using postgres

docker run -it --privileged rstudio/rstudio-connect:1.8.6 /opt/rstudio-connect/bin/rscadmin configure --encrypt-config-value

from rstudio-docker-products.

colearendt avatar colearendt commented on July 24, 2024

Also, if you'd rather talk more specifically about your environment, you are always welcome to open a support ticket at [email protected] to help discuss your options for getting Connect migrated / etc.

from rstudio-docker-products.

Mishco avatar Mishco commented on July 24, 2024

@colearendt thanks for you comments. In the meantime I moved to postgresql database however I am still struggling with this stop/restart of application. Current problem is using password's in config file.

Is there any other way?
Maybe there is a way in the current settings to encrypt the string value in another tool and pass only this encrypted value to the configuration?

Thanks

from rstudio-docker-products.

Mishco avatar Mishco commented on July 24, 2024

Hi @colearendt any updates on this issue ?

I was able to run your command and encrypt password for postgres in configuration file:

[Database]
Provider = postgres

[Postgres]
URL = "postgres://{username}:{long-encrypted-string}@{our-database}.database.azure.com/{table}"

However when I used this configuration I am not able to start this container with the same license.

...
Deactivating license ...
/usr/local/bin/startup.sh: line 15: /opt/rstudio-connect/bin/license-manager: No such file or directory
+ deactivate
+ echo 'Deactivating license ...'
+ /opt/rstudio-connect/bin/license-manager deactivate

Is there any other way to put encrypted password in config file ?

Thanks

from rstudio-docker-products.

colearendt avatar colearendt commented on July 24, 2024

@Mishco Thanks for checking in! Unfortunately no updates in the product yet that will resolve this issue!

In the meantime, I am happy to help you get this working. It seems to me that there may be something going awry here, the /opt/rstudio-connect/bin/license-manager: No such file or directory error is quite concerning, as it suggests that Connect is not installed or a volume is masking the /opt/rstudio-connect directory (which will cause all manner of problems)

It may be easier to handle this as a support ticket - would you mind emailing [email protected] , mentioning me / this issue, and including what information you can about your environment? (how things are architected / run - using compose, kubernetes, how you are running the containers, etc.)

Also, I believe you should put the "Password" into the Postgres.Password configuration field, rather than embedding it in the URL. This makes things simpler, and may be important to this mechanism functioning properly.

https://docs.rstudio.com/connect/admin/appendix/configuration/#Postgres.Password

Finally, are you using a command like this to mount the configuration file, once you have modified it (from the README)?

docker run -it --privileged \
    -p 3939:3939 \
    -v $PWD/data/rsc:/data \
    -v $PWD/connect/rstudio-connect.gcfg:/etc/rstudio-connect/rstudio-connect.gcfg \
    -e RSC_LICENSE=$RSC_LICENSE \
    rstudio/rstudio-connect:1.8.6.2

from rstudio-docker-products.

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.