Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rstudio not connect to the r session #17533

Closed
1 task done
ericlesvieira opened this issue Jan 24, 2024 · 8 comments · Fixed by #27283
Closed
1 task done

Rstudio not connect to the r session #17533

ericlesvieira opened this issue Jan 24, 2024 · 8 comments · Fixed by #27283
Labels
bug Something isn't working

Comments

@ericlesvieira
Copy link

App Name

Could not connect to the r session

Operating System

TrueNAS SCALE 22.12.4.1 or prior

App Version

4.3.2

Application Events

2024-01-24 09:48:38
Created container rstudio
2024-01-24 09:48:38
Started container rstudio
2024-01-24 09:48:32
Container image "rocker/rstudio:4.3.2@sha256:ca8f94e1c482afe7c72c9904b4bdf79b6fdf2edf44a5c30b53469bb5f390e38f" already present on machine
2024-01-24 09:48:31
Add eth0 [172.16.8.205/16] from ix-net
2024-01-24 09:48:30
Scaled up replica set rstudio-798f7b8999 to 1
2024-01-24 09:48:30
Created pod: rstudio-798f7b8999-v6zzx
2024-01-24 09:48:30
Successfully assigned ix-rstudio/rstudio-798f7b8999-v6zzx to ix-truenas
2024-01-24 09:48:16
Readiness probe failed: Get "http://172.16.8.204:8787/": dial tcp 172.16.8.204:8787: connect: connection refused
2024-01-24 09:48:15
Scaled down replica set rstudio-7bc9969d99 to 0 from 1
2024-01-24 09:48:15
Deleted pod: rstudio-7bc9969d99-6r4dd
2024-01-24 09:48:15
Stopping container rstudio
2024-01-24 09:45:51
Created container rstudio
2024-01-24 09:45:51
Started container rstudio
2024-01-24 09:45:47
Container image "rocker/rstudio:4.3.2@sha256:ca8f94e1c482afe7c72c9904b4bdf79b6fdf2edf44a5c30b53469bb5f390e38f" already present on machine
2024-01-24 09:45:46
Add eth0 [172.16.8.204/16] from ix-net
2024-01-24 09:45:45
Scaled up replica set rstudio-7bc9969d99 to 1
2024-01-24 09:45:45
Created pod: rstudio-7bc9969d99-6r4dd
2024-01-24 09:45:45
Successfully assigned ix-rstudio/rstudio-7bc9969d99-6r4dd to ix-truenas
2024-01-24 09:45:36
Readiness probe failed: Get "http://172.16.8.202:8787/": dial tcp 172.16.8.202:8787: connect: connection refused
2024-01-24 09:45:28
Scaled down replica set rstudio-65c4f8f7d9 to 0 from 1
2024-01-24 09:45:28
Deleted pod: rstudio-65c4f8f7d9-6htj6
2024-01-24 09:45:28
Stopping container rstudio
2024-01-24 09:43:31
Created container rstudio
2024-01-24 09:43:31
Started container rstudio
2024-01-24 09:43:27
Add eth0 [172.16.8.202/16] from ix-net
2024-01-24 09:43:27
Container image "rocker/rstudio:4.3.2@sha256:ca8f94e1c482afe7c72c9904b4bdf79b6fdf2edf44a5c30b53469bb5f390e38f" already present on machine
2024-01-24 09:43:26
Successfully assigned ix-rstudio/rstudio-65c4f8f7d9-6htj6 to ix-truenas
2024-01-24 09:43:25
Updated LoadBalancer with new IPs: [] -> [192.168.3.27]
2024-01-24 09:43:24
Successfully provisioned volume pvc-bc35daba-0ba8-4f9e-8742-04dab8876819
2024-01-24 09:43:23
Successfully provisioned volume pvc-d12cf75e-3003-4fe0-b9af-c1465b303a6e
2024-01-24 09:43:23
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
2024-01-24 09:43:18
External provisioner is provisioning volume for claim "ix-rstudio/rstudio-workspace"
2024-01-24 09:43:18
External provisioner is provisioning volume for claim "ix-rstudio/rstudio-config"
2024-01-24 09:43:18
Ensuring load balancer
2024-01-24 09:43:18
waiting for a volume to be created, either by external provisioner "zfs.csi.openebs.io" or manually created by system administrator
2024-01-24 09:43:18
There are no available nodes for LoadBalancer
2024-01-24 09:43:18
Applied LoadBalancer DaemonSet kube-system/svclb-rstudio-2b05674c
2024-01-24 09:43:18
Scaled up replica set rstudio-65c4f8f7d9 to 1
2024-01-24 09:43:18
Created pod: rstudio-65c4f8f7d9-6htj6
2024-01-24 09:43:18
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
2024-01-24 09:43:18
waiting for a volume to be created, either by external provisioner "zfs.csi.openebs.io" or manually created by system administrator
2024-01-24 09:40:28
Readiness probe failed: Get "http://172.16.8.33:8787/": dial tcp 172.16.8.33:8787: connect: connection refused
2024-01-24 09:40:19
Stopping container rstudio

Application Logs

2024-01-24 09:48:38.455926-03:00[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2024-01-24 09:48:39.996864-03:00[s6-init] ensuring user provided files have correct perms...exited 0.
2024-01-24 09:48:40.009122-03:00[fix-attrs.d] applying ownership & permissions fixes...
2024-01-24 09:48:40.013738-03:00[fix-attrs.d] done.
2024-01-24 09:48:40.020728-03:00[cont-init.d] executing container initialization scripts...
2024-01-24 09:48:40.030089-03:00[cont-init.d] 01_set_env: executing... 
2024-01-24 09:48:40.090839-03:00skipping /var/run/s6/container_environment/HOME
2024-01-24 09:48:40.203104-03:00skipping /var/run/s6/container_environment/PASSWORD
2024-01-24 09:48:40.271727-03:00skipping /var/run/s6/container_environment/RSTUDIO_VERSION
2024-01-24 09:48:40.379273-03:00[cont-init.d] 01_set_env: exited 0.
2024-01-24 09:48:40.400973-03:00[cont-init.d] 02_userconf: executing... 
2024-01-24 09:48:40.418977-03:000 is less than 1000
2024-01-24 09:48:40.424642-03:00setting minimum authorised user to 499
2024-01-24 09:48:40.827693-03:002024-01-24T09:48:40.827693444-03:00
2024-01-24 09:48:40.829329-03:002024-01-24T09:48:40.829329650-03:00
2024-01-24 09:48:40.829255-03:00tput: No value for $TERM and no -T specified
2024-01-24 09:48:40.832461-03:00Settings by �[31m`-e USER=<new username>`�[39m is now deprecated and will be removed in the future.
2024-01-24 09:48:40.832557-03:00Please do not use the USER environment variable.
2024-01-24 09:48:40.833058-03:00tput: No value for $TERM and no -T specified
2024-01-24 09:48:40.840126-03:002024-01-24T09:48:40.840126797-03:00
2024-01-24 09:48:40.840172-03:002024-01-24T09:48:40.840172939-03:00
2024-01-24 09:48:40.840191-03:00deleting the default user
2024-01-24 09:48:45.548509-03:00creating new admin with UID 0
2024-01-24 09:48:45.560427-03:00useradd: UID 0 is not unique
2024-01-24 09:48:45.584590-03:00chown: invalid user: ‘admin’
2024-01-24 09:48:45.592488-03:00usermod: user 'admin' does not exist
2024-01-24 09:48:45.592555-03:00id: ‘admin’: no such user
2024-01-24 09:48:45.595986-03:00Modifying primary group 
2024-01-24 09:48:45.600368-03:00id: ‘admin’: no such user
2024-01-24 09:48:45.622137-03:00groupmod: group '' does not exist
2024-01-24 09:48:45.622171-03:00Primary group ID is now custom_group 568
2024-01-24 09:48:45.623681-03:00chpasswd: (user admin) pam_chauthtok() failed, error:
2024-01-24 09:48:45.623746-03:00Authentication token manipulation error
2024-01-24 09:48:45.623765-03:00chpasswd: (line 1, user admin) password not changed
2024-01-24 09:48:46.207129-03:00adduser: The user `admin' does not exist.
2024-01-24 09:48:46.208761-03:00admin added to sudoers
2024-01-24 09:48:46.497085-03:00[cont-init.d] 02_userconf: exited 0.
2024-01-24 09:48:46.500835-03:00[cont-init.d] done.
2024-01-24 09:48:46.506955-03:00[services.d] starting services
2024-01-24 09:48:46.552524-03:00[services.d] done.

Application Configuration

I attempted a default install

Describe the bug

When i config User name and User password i have a login page, but i have Error: Incorrect or invalid username/password.

When i config to disable auth i have a error for could not connect to the R session on Rstudio.

To Reproduce

1 - default install = incorrect username /password.
2 - with no auth it shows the error could not connect to the r session

Expected Behavior

the user and password configured in app config run in the login page.
the no auth checked box run the rstudio with no auth and conect to rbase

Screenshots

Captura de Tela 2024-01-23 às 21 39 39
Captura de Tela 2024-01-24 às 10 24 24

Additional Context

none

I've read and agree with the following

  • I've checked all open and closed issues and my issue is not there.
@ericlesvieira ericlesvieira added the bug Something isn't working label Jan 24, 2024
@StevenMcElligott
Copy link
Collaborator

Just want to confirm you’re not actually using 22.12.4.2 or prior for SCALE

@ericlesvieira
Copy link
Author

Just want to confirm you’re not actually using 22.12.4.2 or prior for SCALE

yes, i`m using Version:
TrueNAS-SCALE-23.10.1.1

@damienjmiller
Copy link

damienjmiller commented Mar 27, 2024

I think this is related to the issue of persistence, I also had the same problem. Adding the user "rstudio" user add rstudio and if using auth adding a password with passwd rstudio this issue temporarily goes away. If you're bypassing auth then you don't even need to give the user a password.

However, when you restart the container your data does not persist therefor you have to do this on every reboot. I have a temporary work around by forking the repo and adding a script to do this on startup but this needs a proper solution as there's a bunch more stuff that I think should persist with reboot too.

@truecharts-admin
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@truecharts-admin truecharts-admin added the stale Categorises a PR or issue that has not been active for a specified time. label Sep 23, 2024
@damienjmiller
Copy link

Not stale, just hasn’t been fixed yet. Issue still exists and has to be worked around.

@stavros-k stavros-k removed the stale Categorises a PR or issue that has not been active for a specified time. label Sep 24, 2024
@alfi0812
Copy link
Collaborator

alfi0812 commented Oct 4, 2024

Closing as SCALE isnt a supported platform any longer. Feel free to open a new Issue if the issue persists on one of the currently supported platforms.

@alfi0812 alfi0812 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
@alfi0812
Copy link
Collaborator

alfi0812 commented Oct 4, 2024

Fix will be available on all Kubernetes Platforms. But as SCALE is no longer supported. This fix wont reach SCALE users

kqmaverick pushed a commit that referenced this issue Oct 4, 2024
**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  #17533

Container deletes default user and tries to create new user with this
UID. So can't be root (0).
Container still needs root as it uses s6-overlay

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->
Tested on my local talos-cluster

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [x] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):` or `chore(chart-name):`

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: alfi0812 <43101280+alfi0812@users.noreply.github.com>
@truecharts-admin
Copy link
Collaborator

This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists

@truecharts truecharts locked and limited conversation to collaborators Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants