Comments (12)
Esther -
I've seen this before - I don't have this particular problem on Mac, but often on other platforms the permissions don't match correctly when the source is loaded from the host into the container.
There's a script in the root app directory called set_user_permissions.bash. It's configured to only run in production or staging modes, but if you comment out the if/then portions, it will always run. Essentially, it looks at the host OS and determines what the uid and guid are and modifies the internal app user to match that.
I'll file a ticket on my end to change this script to always run, as it won't harm anything on local installations to do this.
from single_cell_portal_core.
Getting the same error after I comment out the if/then in set_user_permission.bash. Do I need to run bin/boot_docker ... from \home\app\project\single_cell_portal_core-master directory ? Right now, I run it off from \home{myHomeDir}\project \single_cell_portal_core-master directory...
Thanks for your helps, Esther
from single_cell_portal_core.
Sorry - you'll need to rebuild the docker image and restart first. I omitted that earlier. The bash script gets copied into /etc/my_init.d as part of the build (line 10 in Dockerfile).
from single_cell_portal_core.
Rebuild the docker image helps. However, I am getting the following error....
...
*** RUNNING PENDING MIGRATIONS ***
== SetDeliverEmailsForStudies: migrating =====================================
rake aborted!
StandardError: An error has occurred, 20171108152947 and all later migrations canceled:
No such file or directory @ rb_sysopen - /home/app/webapp/single-cell
/home/app/webapp/app/models/fire_cloud_client.rb:103:in `initialize'
....
I manually created /home/app/webapp/single-cell directory and rebuilt the docker image, but it doesn't help. Any thoughts ?
Thanks for your help,
Esther
from single_cell_portal_core.
So line 103 is looking for the service account JSON keyfile. You need to provide the fully-qualified filepath including the name of the JSON file itself (not just the directory). It's trying to find your credentials and can't find them.
from single_cell_portal_core.
still getting error with the fully qualified file path with JSON file name. Here is what I ran:
chees01@ndhsinnl145:~/project/single_cell_portal_core-master$ bin/boot_docker -u xxxx -P passwd333 -k /home/chees01/project/single_cell_portal_core-master/single-cell-519e737953e3.json -o 337663184437-3g7omu7pjqqjjd1tpplidu2uuhn65bd2.apps.googleusercontent.com -S 83DCMb5LpqMuxQLXCdyCfQ
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/01_set_user_permissions.bash...
*** SETTING UID AND GID TO MATCH HOST VOLUMES ***
-- Setting app user to use uid 1001
-- Setting app group to use gid 1001
*** Running /etc/my_init.d/02_rails_startup.bash...
*** CLEARING TMP CACHE ***
*** COMPLETED ***
*** ROLLING OVER LOGS ***
*** COMPLETED ***
*** CREATING CRON ENV FILES ***
*** COMPLETED ***
*** RUNNING PENDING MIGRATIONS ***
== SetDeliverEmailsForStudies: migrating =====================================
rake aborted!
StandardError: An error has occurred, 20171108152947 and all later migrations canceled:
No such file or directory @ rb_sysopen - /home/chees01/project/single_cell_portal_core-master/single-cell-519e737953e3.json
/home/app/webapp/app/models/fire_cloud_client.rb:103:in initialize' /home/app/webapp/app/models/fire_cloud_client.rb:103:in
open'
/home/app/webapp/app/models/fire_cloud_client.rb:103:in generate_access_token' /home/app/webapp/app/models/fire_cloud_client.rb:50:in
initialize'
/home/app/webapp/app/models/study.rb:23:in new' /home/app/webapp/app/models/study.rb:23:in
class:Study'
/home/app/webapp/app/models/study.rb:1:in `<top (required)>'
It looks like it can't find the JSON file, but the JSON file there. I also chmod 0777, but it doesn't help...
Thanks,
Esther
from single_cell_portal_core.
Ah - I see the problem. I misspoke earlier. It's not actually the fully-qualified path to the file for the JSON config. It's the relative path to the file from the project source inside the container. Since everything inside the container is mounted at /home/app/webapp, it doesn't know what your filesystem looks like on your host, so /home/chees01/project/single_cell_portal_core-master is an invalid path inside docker. That path on your host is mapped to /home/app/webapp.
It looks like you put the config in the base project directory, so all you'd need is:
bin/boot_docker -k [name of JSON config file] ... [rest of parameters].
Sorry about that!
from single_cell_portal_core.
Got it. Hit another error: No such file or directory @ dir_s_mkdir - /home/app/webapp/tmp/pids (Errno::ENOENT).
*** RUNNING PENDING MIGRATIONS ***
*** COMPLETED ***
*** STARTING DELAYED_JOB ***
/usr/local/rvm/gems/ruby-2.3.1/gems/delayed_job-4.1.1/lib/delayed/command.rb:85:in mkdir': No such file or directory @ dir_s_mkdir - /home/app/webapp/tmp/pids (Errno::ENOENT) from /usr/local/rvm/gems/ruby-2.3.1/gems/delayed_job-4.1.1/lib/delayed/command.rb:85:in
daemonize'
from bin/delayed_job:6:in `
*** ADDING CRONTAB TO CHECK DELAYED_JOB ***
*** COMPLETED ***
I manually created /home/app/webapp/tmp/pids directory & rebuilt the image, but still not working... Any suggestion?
Thanks,
Esther
from single_cell_portal_core.
Ah... yeah, that's an oversight on my part. The tmp directory is excluded from source, and I don't have a line in the startup script to create it if it doesn't exist. If you create the pids directory on your host machine (not inside the container) inside tmp, then it will work fine (that would put it at /home/chees01/project/single_cell_portal_core-master/tmp/pids).
I'll add that feature to our next release. Thanks for finding that.
from single_cell_portal_core.
Yeah! The container is up and running...
I have another question, I would like to use our internal SMTP for sending email instead of using the sendgrid account, do you have the configuration instruction?
Thanks for your help,
Esther
from single_cell_portal_core.
So you can configure that directly inside config/environments/development.rb (or for any environment you wish)
At the bottom, there's a section for smtp settings (starting on line 48). You can enter the SMTP configurations (host, user/password, port, etc).
from single_cell_portal_core.
I will give it a try... Thanks for all your help, Esther
from single_cell_portal_core.
Related Issues (8)
- Number of Cell with a specific gene expressed per cluster. How? HOT 1
- Unable to run boot_docker HOT 1
- Getting error on building the Single Cell Portal image HOT 3
- Enable admin account: getting "NoMethodError: undefined method `update' for nil:NilClass" HOT 9
- The container is up and running without delayed_job.3.log & delayed_job.4.log HOT 1
- Getting "Firecloud workspce assignment failed..." on creating the first study on our private instance.... HOT 3
- Getting error, Mongo::Error::NoServerAvailable: No server is available matching preference HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from single_cell_portal_core.