修改rsession.conf配置文件后,无法登陆Rstudio|修改rsession.conf配置文件后,无法登陆Rstudio server解决办法
写在前面
问题经常有,今年特别多。
也不知道是不是因为centos系统的原因,为啥明明我还在跑着程序,2个小时后,RStudio server自动退出登陆界面了。于是通过查询得知,可以通过修改/etc/rstudio/rsession.conf文件,让用户session 将不会suspend,一直运行。
正文
修改rsession.conf文件
vim /etc/rstudio/rsession.conf
添加session-timeout-minutes=0#会话超时时间
接着我尝试重启Rstudio server让其生效
rstudio-server restart #重启
后来就遇到了发现登不进Rstudio server了,但是xshell均正常。
检查Rstudio server 状态
sudo systemctl status rstudio-server###报错信息
● rstudio-server.service - RStudio Server
Loaded: loaded (/usr/lib/systemd/system/rstudio-server.service;
enabled;
vendor preset: disabled)
Active: failed (Result: start-limit) since 一 2021-04-12 09:05:11 CST;
3min 52s ago
Process: 170465 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
Process: 217615 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 217616 (code=exited, status=1/FAILURE)
Tasks: 1
CGroup: /system.slice/rstudio-server.service
└─147061 /usr/lib/rstudio-server/bin/rserver4月 12 09:05:11 localhost.localdomain systemd[1]: Unit rstudio-server.service entered failed state.
4月 12 09:05:11 localhost.localdomain systemd[1]: rstudio-server.service failed.
4月 12 09:05:11 localhost.localdomain systemd[1]: rstudio-server.service holdoff time over, scheduling restart.
4月 12 09:05:11 localhost.localdomain systemd[1]: Stopped RStudio Server.
4月 12 09:05:11 localhost.localdomain systemd[1]: start request repeated too quickly for rstudio-server.service
4月 12 09:05:11 localhost.localdomain systemd[1]: Failed to start RStudio Server.
4月 12 09:05:11 localhost.localdomain systemd[1]: Unit rstudio-server.service entered failed state.
4月 12 09:05:11 localhost.localdomain systemd[1]: rstudio-server.service failed.
[root@localhost rstudio]# sudo systemctl stop rstudio-server
[root@localhost rstudio]# sudo systemctl start rstudio-server
[root@localhost rstudio]# sudo systemctl status rstudio-server
● rstudio-server.service - RStudio Server
Loaded: loaded (/usr/lib/systemd/system/rstudio-server.service;
enabled;
vendor preset: disabled)
Active: failed (Result: start-limit) since 一 2021-04-12 09:10:24 CST;
1s ago
Process: 170465 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
Process: 218168 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 218169 (code=exited, status=1/FAILURE)
Tasks: 1
CGroup: /system.slice/rstudio-server.service
└─147061 /usr/lib/rstudio-server/bin/rserver
【修改rsession.conf配置文件后,无法登陆Rstudio|修改rsession.conf配置文件后,无法登陆Rstudio server解决办法】去google了比较多帖子,都没有找到一个合适的办法,最终在Stack Overflow里面找到解决办法
原因解析
The reason why you can not restart rstudio-server is that the PORT 8787 was been using by previous rserver. After knowing this, the solution is easy. First, check the pid that was using PORT 8787简单来说就是原8787端口被其他资源占用了,把占用的程序kill掉就解决了
解决办法
#查看占用端口
sudo netstat -anp | grep 8787
# tcp00 0.0.0.0:87870.0.0.0:*LISTENpid/rserver#Second, kill this pid (use your pid)
sudo kill -9 #Third, restart rstudio-server or reinstall resutio server package
rstudio-server restart #重启
至此,问题解决, RStudio Server也顺利登陆。
推荐阅读
- java|java b2b2c shop 多用户商城系统源码- config 修改配置
- iOS富文本为html时,修改默认字体颜色
- react-navigation|react-navigation 动态修改 tabBar 样式
- 8、Flask构建弹幕微电影网站-搭建后台页面-密码修改、主页控制面板
- javascript|vue使用js-xlsx导出excel,可修改格子样式,例如背景颜色、字体大小、列宽等
- minifilter中获取对文件修改属性的操作
- Android免Root|Android免Root 修改程序运行时内存指令逻辑(Hook系统函数)
- hadoop三个配置文件的参数含义说明(转)
- 数据库|python 添加修改mysql
- python|【Python】全局变量的使用,全局变量的修改