Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Deploy to openshift #477

Closed
mpescarmona opened this issue Mar 14, 2015 · 18 comments
Closed

Deploy to openshift #477

mpescarmona opened this issue Mar 14, 2015 · 18 comments
Assignees

Comments

@mpescarmona
Copy link

My question is about the feasibility to add support for deployment of mean boilerplate into openshift.

@ilanbiala
Copy link
Member

@mpescarmona you should first try cloning this repository and having MongoDB accessible and adding in the environment variables. It should work at that point, but if you have any other questions, feel free to come back with more info so we can help more.

@mpescarmona
Copy link
Author

@ilanbiala thanks a lot for your help, but I couldn't get deployed the meanjs demo application on OpenShift.
I did the follow things:

db: {
        uri: 'mongodb://' + process.env.OPENSHIFT_MONGODB_DB_USERNAME + ':' + process.env.OPENSHIFT_MONGODB_DB_PASSWORD + '@' + process.env.OPENSHIFT_MONGODB_DB_HOST + ':' + process.env.OPENSHIFT_MONGODB_DB_PORT + '/' + process.env.OPENSHIFT_APP_NAME || process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mercado-artesanal',
        options: {
            user: '',
            pass: ''
        }
  • Deploy to OpenShift using the following command:
sudo rhc app create meanjsorg nodejs-0.10 mongodb-2.4 --env NODE_ENV=production --from-code https://mpescarmona@bitbucket.org/mpescarmona/meanjsorg.git --trace --timeout 600
  • Below is the full error that I am getting:
Application Options
-------------------
Domain:                mpescarmona
Cartridges:            nodejs-0.10, mongodb-2.4
Source Code:           https://mpescarmona@bitbucket.org/mpescarmona/meanjsorg.git
Gear Size:             default
Scaling:               no
Environment Variables: NODE_ENV=production

Creating application 'meanjsorg' ... /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:624:in `retry_proxy': An error occurred while communicating with the server. This problem may only be temporary. Check that you have correctly specified your OpenShift server 'https://openshift.redhat.com/broker/rest/domain/mpescarmona/applications'. (RHC::Rest::ConnectionException)
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:421:in `block in request'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:405:in `block in attempt'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:404:in `each'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:404:in `attempt'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:411:in `request'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/base.rb:30:in `rest_method'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/domain.rb:68:in `add_application'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands/app.rb:606:in `create_app'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands/app.rb:155:in `block in create'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/highline_extensions.rb:190:in `call'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/highline_extensions.rb:190:in `section'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/highline_extensions.rb:204:in `paragraph'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/helpers.rb:337:in `block (2 levels) in <module:Helpers>'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands/app.rb:151:in `create'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands.rb:294:in `execute'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/command.rb:179:in `call'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/command.rb:179:in `call'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/command.rb:154:in `run'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/runner.rb:419:in `run_active_command'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/command_runner.rb:100:in `run!'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/delegates.rb:19:in `run!'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/cli.rb:37:in `start'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/bin/rhc:20:in `<top (required)>'
    from /usr/local/bin/rhc:23:in `load'
    from /usr/local/bin/rhc:23:in `<main>'
  • Also, this is the log of OpenShift console:
Sun Mar 15 16:30:52.826 [initandlisten] MongoDB starting : pid=19201 port=27017 dbpath=/var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/ 64-bit host=ex-std-node371.prod.rhcloud.com
Sun Mar 15 16:30:52.827 [initandlisten] db version v2.4.9
Sun Mar 15 16:30:52.827 [initandlisten] git version: nogitversion
Sun Mar 15 16:30:52.827 [initandlisten] build info: Linux x86-025.build.eng.bos.redhat.com 2.6.32-431.5.1.el6.x86_64 #1 SMP Fri Jan 10 14:46:43 EST 2014 x86_64 BOOST_LIB_VERSION=1_41
Sun Mar 15 16:30:52.827 [initandlisten] allocator: tcmalloc
Sun Mar 15 16:30:52.827 [initandlisten] options: { auth: true, bind_ip: "127.9.165.2", command: [ "run" ], config: "/var/lib/openshift/5505eb9e5973caeabe00018c/mongodb//conf/mongodb.conf", dbpath: "/var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/", nohttpinterface: "true", noprealloc: "true", pidfilepath: "/var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/pid/mongodb.pid", quiet: "true", smallfiles: "true" }
Sun Mar 15 16:30:52.847 [initandlisten] journal dir=/var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/journal
Sun Mar 15 16:30:52.847 [initandlisten] recover : no journal files present, no recovery needed
Sun Mar 15 16:30:56.738 [FileAllocator] allocating new datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/local.ns, filling with zeroes...
Sun Mar 15 16:30:56.738 [FileAllocator] creating directory /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/_tmp
Sun Mar 15 16:30:56.776 [FileAllocator] done allocating datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/local.ns, size: 16MB,  took 0.013 secs
Sun Mar 15 16:30:56.777 [FileAllocator] allocating new datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/local.0, filling with zeroes...
Sun Mar 15 16:30:56.843 [FileAllocator] done allocating datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/local.0, size: 16MB,  took 0.065 secs
Sun Mar 15 16:30:56.849 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0  reslen:37 111ms
Sun Mar 15 16:30:56.853 [initandlisten] waiting for connections on port 27017
Sun Mar 15 16:30:57.394 [conn1] note: no users configured in admin.system.users, allowing localhost access
Sun Mar 15 16:30:57.398 [conn1]  authenticate db: admin { authenticate: 1, nonce: "ac22cb1a99a45554", user: "admin", key: "1a9c38135e2c3df1cd4a36765d7e06f5" }
Sun Mar 15 16:30:57.398 [conn1] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:30:58.570 [conn2]  authenticate db: admin { authenticate: 1, nonce: "5a8ad8cc801f254", user: "admin", key: "a3a8789d5abad81021417c9570a4867b" }
Sun Mar 15 16:30:58.571 [conn2] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:30:59.786 [conn3]  authenticate db: admin { authenticate: 1, nonce: "b9bc1cf17af3531a", user: "admin", key: "aa7e80f50d994a30c52772c8fcfcb711" }
Sun Mar 15 16:30:59.787 [conn3] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:01.071 [conn4]  authenticate db: admin { authenticate: 1, nonce: "2fd6219fa5b5570d", user: "admin", key: "9cd02d5b5754c3dbdf14a7c12c08da71" }
Sun Mar 15 16:31:01.071 [conn4] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:02.228 [conn5]  authenticate db: admin { authenticate: 1, nonce: "5335f753b6d75338", user: "admin", key: "f1b3eb2a54458d8a044ab8c0c250115e" }
Sun Mar 15 16:31:02.228 [conn5] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:03.377 [conn6]  authenticate db: admin { authenticate: 1, nonce: "831328b870f2b5f4", user: "admin", key: "52adcd844012884be143b229c69a29e8" }
Sun Mar 15 16:31:03.378 [conn6] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:04.512 [conn7]  authenticate db: admin { authenticate: 1, nonce: "e2bbe11fd81926cf", user: "admin", key: "3b997e7ee66fcc67b6a8240542bc07e5" }
Sun Mar 15 16:31:04.512 [conn7] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:05.683 [conn8]  authenticate db: admin { authenticate: 1, nonce: "963c042cd0f6a71", user: "admin", key: "84362a7a3072edb5860576c4c498ef3f" }
Sun Mar 15 16:31:05.683 [conn8] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:06.879 [conn9]  authenticate db: admin { authenticate: 1, nonce: "150ee42f02d11a7", user: "admin", key: "9cf151bb3f61730f9d38aa9ed40bf5ae" }
Sun Mar 15 16:31:06.879 [conn9] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:08.170 [conn10]  authenticate db: admin { authenticate: 1, nonce: "a5cab5ae3dd869ec", user: "admin", key: "1c7041b8de969a0f2128f02e7c9716c8" }
Sun Mar 15 16:31:08.172 [conn10] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:09.428 [conn11]  authenticate db: admin { authenticate: 1, nonce: "d0be80e399d0a4b8", user: "admin", key: "b09458fc124edda91cd3712a81fd07f4" }
Sun Mar 15 16:31:09.429 [conn11] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:10.621 [conn12]  authenticate db: admin { authenticate: 1, nonce: "1dbc37440d458910", user: "admin", key: "01a14d0010ed025e3e5fc490b6b35af4" }
Sun Mar 15 16:31:10.622 [conn12] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:11.767 [conn13]  authenticate db: admin { authenticate: 1, nonce: "cc88121fe1c3f226", user: "admin", key: "24be0fae1f634fb58cf71aa0c6f32af0" }
Sun Mar 15 16:31:11.768 [conn13] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:12.927 [conn14]  authenticate db: admin { authenticate: 1, nonce: "62a3fbf6697f0302", user: "admin", key: "a94c2b15b1a4635e107871ed37d28cae" }
Sun Mar 15 16:31:12.928 [conn14] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:14.090 [conn15]  authenticate db: admin { authenticate: 1, nonce: "c70f1d056436a1bf", user: "admin", key: "989ea6f4434c5c587a0391ad64a3bca2" }
Sun Mar 15 16:31:14.090 [conn15] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:15.247 [conn16]  authenticate db: admin { authenticate: 1, nonce: "fc6b79a101b7967c", user: "admin", key: "2e55c7970ce174bd8ee61fedd045c459" }
Sun Mar 15 16:31:15.248 [conn16] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:16.396 [conn17]  authenticate db: admin { authenticate: 1, nonce: "7fc727b67970ef51", user: "admin", key: "1ae12c45270109a0b4a84b4e9ac6492f" }
Sun Mar 15 16:31:16.396 [conn17] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:17.552 [conn18]  authenticate db: admin { authenticate: 1, nonce: "821856e302d37f54", user: "admin", key: "62b0bc9fb26764e3cea6982c992a6e64" }
Sun Mar 15 16:31:17.553 [conn18] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:18.703 [conn19]  authenticate db: admin { authenticate: 1, nonce: "aa281b5359ca7a40", user: "admin", key: "292c0bcb7aba8715d8c5dfa1294567ba" }
Sun Mar 15 16:31:18.703 [conn19] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:19.924 [conn20]  authenticate db: admin { authenticate: 1, nonce: "3cb8d6fbd840bcb4", user: "admin", key: "1d055a4cc4619a3109e9845599e0b3b2" }
Sun Mar 15 16:31:19.925 [conn20] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:21.083 [conn21]  authenticate db: admin { authenticate: 1, nonce: "7f45d847d0f12236", user: "admin", key: "99e1c7a699eca0861d10aa42ff9da71d" }
Sun Mar 15 16:31:21.084 [conn21] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:22.241 [conn22]  authenticate db: admin { authenticate: 1, nonce: "db14edd04d8a6b59", user: "admin", key: "96cfa7cc03bd363593782f05846725da" }
Sun Mar 15 16:31:22.241 [conn22] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:25.608 [conn23]  authenticate db: admin { authenticate: 1, nonce: "13b519bc10e86d0", user: "admin", key: "1ff1c119624ec1d2e59a24cc4aad826c" }
Sun Mar 15 16:31:25.609 [conn23] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:26.786 [conn24]  authenticate db: admin { authenticate: 1, nonce: "498b897a34c40697", user: "admin", key: "ee64a0d7fde4e26c90539c36de7d82a3" }
Sun Mar 15 16:31:26.787 [conn24] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:27.927 [conn25]  authenticate db: admin { authenticate: 1, nonce: "b7be41e4b5bfa2c6", user: "admin", key: "6069aafad3651ad8e923a86c8679ba1c" }
Sun Mar 15 16:31:27.928 [conn25] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:29.069 [conn26]  authenticate db: admin { authenticate: 1, nonce: "3755439ae284d1f5", user: "admin", key: "345080a40982d871ae3bdc59a43d7192" }
Sun Mar 15 16:31:29.070 [conn26] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:30.214 [conn27]  authenticate db: admin { authenticate: 1, nonce: "3daf33dc769ccd66", user: "admin", key: "d475a94c114a997eb1ee1d0799aebe88" }
Sun Mar 15 16:31:30.214 [conn27] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:31.354 [conn28]  authenticate db: admin { authenticate: 1, nonce: "89bcc05bcb936ccd", user: "admin", key: "afe41c4ad8d3191adc8be11b2360dbab" }
Sun Mar 15 16:31:31.354 [conn28] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:32.504 [conn29]  authenticate db: admin { authenticate: 1, nonce: "bcc5928d42575031", user: "admin", key: "0649a8d78f6e5efafc87bb34e3f2dbdd" }
Sun Mar 15 16:31:32.504 [conn29] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:33.649 [conn30]  authenticate db: admin { authenticate: 1, nonce: "676a8334177f47d", user: "admin", key: "15b75d3f8fc8b97ab18fdcfa792a22b6" }
Sun Mar 15 16:31:33.650 [conn30] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:34.804 [conn31]  authenticate db: admin { authenticate: 1, nonce: "25d22497711ca691", user: "admin", key: "e0cd7a7e6bd6cb50f2b3312c0c191235" }
Sun Mar 15 16:31:34.805 [conn31] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:35.957 [conn32]  authenticate db: admin { authenticate: 1, nonce: "4c8894f29564db33", user: "admin", key: "7e0678d5b2f903fde55d62ab3b29c769" }
Sun Mar 15 16:31:35.957 [conn32] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:37.177 [conn33]  authenticate db: admin { authenticate: 1, nonce: "6a158a0c267783cf", user: "admin", key: "5ae8a48b24522d5ddb2a0df23e351726" }
Sun Mar 15 16:31:37.177 [conn33] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:38.354 [conn34]  authenticate db: admin { authenticate: 1, nonce: "1a3aa209d394b284", user: "admin", key: "2705d902533a14d20f72a7259d527b0b" }
Sun Mar 15 16:31:38.355 [conn34] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:39.514 [conn35]  authenticate db: admin { authenticate: 1, nonce: "6146090c3c972aad", user: "admin", key: "b22fb747355cbdac9dc84de486e9953b" }
Sun Mar 15 16:31:39.515 [conn35] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:40.693 [conn36]  authenticate db: admin { authenticate: 1, nonce: "effde1c8e36d3892", user: "admin", key: "d971c427387842a50594f9c09130523a" }
Sun Mar 15 16:31:40.694 [conn36] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:41.849 [conn37]  authenticate db: admin { authenticate: 1, nonce: "2aff276f8da70afe", user: "admin", key: "ebf24af1c6380342c5cbb1be3bb7f9e7" }
Sun Mar 15 16:31:41.850 [conn37] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:42.999 [conn38]  authenticate db: admin { authenticate: 1, nonce: "29b4c9a773d36b9f", user: "admin", key: "55ec49773c0e70886ec01c2a4e2fba42" }
Sun Mar 15 16:31:43.000 [conn38] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:44.147 [conn39]  authenticate db: admin { authenticate: 1, nonce: "f65da3eedb39cb21", user: "admin", key: "12bb6ca1f6daae769e56f1c17851898e" }
Sun Mar 15 16:31:44.147 [conn39] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:45.316 [conn40]  authenticate db: admin { authenticate: 1, nonce: "45cfd7d26578017c", user: "admin", key: "5f026b92e4271694f57e6f6eaca2afd2" }
Sun Mar 15 16:31:45.317 [conn40] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:46.459 [conn41]  authenticate db: admin { authenticate: 1, nonce: "a5c7008f5d53aeb", user: "admin", key: "fa6a913d05318b149965a3d12c25f933" }
Sun Mar 15 16:31:46.459 [conn41] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:47.595 [conn42]  authenticate db: admin { authenticate: 1, nonce: "3bd045b403935bc1", user: "admin", key: "f34be7907e881ca736f0fa58d0c39762" }
Sun Mar 15 16:31:47.596 [conn42] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:48.734 [conn43]  authenticate db: admin { authenticate: 1, nonce: "81586cb21b31719", user: "admin", key: "16c6937a1c53f6a422a6b04c47ebd7cb" }
Sun Mar 15 16:31:48.734 [conn43] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:49.879 [conn44]  authenticate db: admin { authenticate: 1, nonce: "adcce0353633fa38", user: "admin", key: "1cb6a24b2e21ce113a64f43bdc8e38dd" }
Sun Mar 15 16:31:49.879 [conn44] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:51.027 [conn45]  authenticate db: admin { authenticate: 1, nonce: "588e1d8aafc29549", user: "admin", key: "4767f48547220fe486e0cc0e1673ec7b" }
Sun Mar 15 16:31:51.028 [conn45] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:52.182 [conn46]  authenticate db: admin { authenticate: 1, nonce: "8ddf619aa1821507", user: "admin", key: "2dd169d9f1b8caadebfd06c1f6c4df31" }
Sun Mar 15 16:31:52.183 [conn46] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:53.329 [conn47]  authenticate db: admin { authenticate: 1, nonce: "49c17f1106f00a13", user: "admin", key: "93b26ce6f979030964b847dff06af167" }
Sun Mar 15 16:31:53.329 [conn47] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:54.475 [conn48]  authenticate db: admin { authenticate: 1, nonce: "dd6f4644b79448fe", user: "admin", key: "042804847398bde3b45409cbb447aac3" }
Sun Mar 15 16:31:54.475 [conn48] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:55.628 [conn49]  authenticate db: admin { authenticate: 1, nonce: "4edf474d12836a4d", user: "admin", key: "aafb72404de319bb56c26ed70a52c3e1" }
Sun Mar 15 16:31:55.628 [conn49] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:56.775 [conn50]  authenticate db: admin { authenticate: 1, nonce: "9452af0347e078e5", user: "admin", key: "2ac0eef01faf0079301a53d7a57febdb" }
Sun Mar 15 16:31:56.775 [conn50] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:57.941 [conn51]  authenticate db: admin { authenticate: 1, nonce: "f25b2aa96c80407", user: "admin", key: "49b2aa655ef2ed6daa038ac0963b4d27" }
Sun Mar 15 16:31:57.941 [conn51] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:31:59.081 [conn52]  authenticate db: admin { authenticate: 1, nonce: "db0100b109c37726", user: "admin", key: "d39fa6d02f8066fc22308ce7ac92fa9b" }
Sun Mar 15 16:31:59.081 [conn52] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:32:00.267 [conn53]  authenticate db: admin { authenticate: 1, nonce: "dfc72034c2a554b3", user: "admin", key: "742600f2a16a2a9f88b143692d601ba5" }
Sun Mar 15 16:32:00.268 [conn53] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:32:01.470 [conn54]  authenticate db: admin { authenticate: 1, nonce: "e646e5a789dcd0db", user: "admin", key: "4c33136f21e3cda507a757796aa1e9ac" }
Sun Mar 15 16:32:01.471 [conn54] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:32:02.678 [conn55]  authenticate db: admin { authenticate: 1, nonce: "2261806b745968e1", user: "admin", key: "0834d4ed3c95e1216c3152622c53cfde" }
Sun Mar 15 16:32:02.678 [conn55] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:32:03.851 [conn56]  authenticate db: admin { authenticate: 1, nonce: "555a8052a409d545", user: "admin", key: "52eeae18e1f182ce1809b26a2ee90627" }
Sun Mar 15 16:32:03.851 [conn56] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:32:05.073 [conn57]  authenticate db: admin { authenticate: 1, nonce: "63c3d6cfa98884ca", user: "admin", key: "5dc243448724e81fbfe901e76935a47b" }
Sun Mar 15 16:32:05.074 [conn57] auth: couldn't find user admin@admin, admin.system.users
Sun Mar 15 16:32:06.009 [FileAllocator] allocating new datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/admin.ns, filling with zeroes...
Sun Mar 15 16:32:06.032 [FileAllocator] done allocating datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/admin.ns, size: 16MB,  took 0.017 secs
Sun Mar 15 16:32:06.033 [FileAllocator] allocating new datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/admin.0, filling with zeroes...
Sun Mar 15 16:32:06.043 [FileAllocator] done allocating datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/admin.0, size: 16MB,  took 0.006 secs
Sun Mar 15 16:32:06.050 [conn58] build index admin.system.users { _id: 1 }
Sun Mar 15 16:32:06.071 [conn58] build index done.  scanned 0 total records. 0.02 secs
Sun Mar 15 16:32:06.071 [conn58] build index admin.system.users { user: 1, userSource: 1 }
Sun Mar 15 16:32:06.075 [conn58] build index done.  scanned 0 total records. 0.003 secs
Sun Mar 15 16:32:06.079 [conn58] command denied: { replSetGetStatus: 1.0, forShell: 1.0 }
Sun Mar 15 16:32:06.081 [conn58]  authenticate db: admin { authenticate: 1, nonce: "1df2dda63537cc23", user: "admin", key: "d2169a28c08a6ce310abe5fb2382436f" }
Sun Mar 15 16:32:06.088 [FileAllocator] allocating new datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/meanjsorg.ns, filling with zeroes...
Sun Mar 15 16:32:06.146 [FileAllocator] done allocating datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/meanjsorg.ns, size: 16MB,  took 0.056 secs
Sun Mar 15 16:32:06.146 [FileAllocator] allocating new datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/meanjsorg.0, filling with zeroes...
Sun Mar 15 16:32:06.155 [FileAllocator] done allocating datafile /var/lib/openshift/5505eb9e5973caeabe00018c/mongodb/data/meanjsorg.0, size: 16MB,  took 0.007 secs
Sun Mar 15 16:32:06.162 [conn58] build index meanjsorg.openshift { _id: 1 }
Sun Mar 15 16:32:06.165 [conn58] build index done.  scanned 0 total records. 0.003 secs
Sun Mar 15 16:32:06.170 [conn58] build index meanjsorg.system.users { _id: 1 }
Sun Mar 15 16:32:06.173 [conn58] build index done.  scanned 0 total records. 0.003 secs
Sun Mar 15 16:32:06.174 [conn58] build index meanjsorg.system.users { user: 1, userSource: 1 }
Sun Mar 15 16:32:06.177 [conn58] build index done.  scanned 0 total records. 0.003 secs
Sun Mar 15 16:32:09.747 [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
Sun Mar 15 16:32:09.747 [signalProcessingThread] now exiting
Sun Mar 15 16:32:09.747 dbexit: 
Sun Mar 15 16:32:09.747 [signalProcessingThread] shutdown: going to close listening sockets...
Sun Mar 15 16:32:09.747 [signalProcessingThread] closing listening socket: 9
Sun Mar 15 16:32:09.747 [signalProcessingThread] shutdown: going to flush diaglog...
Sun Mar 15 16:32:09.747 [signalProcessingThread] shutdown: going to close sockets...
Sun Mar 15 16:32:09.747 [signalProcessingThread] shutdown: waiting for fs preallocator...
Sun Mar 15 16:32:09.747 [signalProcessingThread] shutdown: lock for final commit...
Sun Mar 15 16:32:09.747 [signalProcessingThread] shutdown: final commit...
Sun Mar 15 16:32:09.806 [signalProcessingThread] shutdown: closing all files...
Sun Mar 15 16:32:09.807 [signalProcessingThread] closeAllFiles() finished
Sun Mar 15 16:32:09.807 [signalProcessingThread] journalCleanup...
Sun Mar 15 16:32:09.807 [signalProcessingThread] removeJournalFiles
Sun Mar 15 16:32:09.829 [signalProcessingThread] shutdown: removing fs lock...
Sun Mar 15 16:32:09.829 dbexit: really exiting now
Connection to meanjsorg-mpescarmona.rhcloud.com closed by remote host.
Connection to meanjsorg-mpescarmona.rhcloud.com closed.

Any other idea or suggestion ?

@ilanbiala
Copy link
Member

Can you put these in code blocks? It's much easier to read code and errors that way.

@mpescarmona
Copy link
Author

Sorry, I have updated my comment with the code blocks.

@ilanbiala
Copy link
Member

Maybe it timed out? I would submit a support issue to Openshift. It would be great if you could post the solution here so others will know and we can add it to the docs.

@puttyman
Copy link

Here is my production.js file. Hope it helps

'use strict';

var dbCon = 'mongodb://localhost/mean-dev';

if(process.env.OPENSHIFT_MONGODB_DB_USERNAME)
{
    dbCon = 'mongodb://' +
            process.env.OPENSHIFT_MONGODB_DB_USERNAME + ':' +
            process.env.OPENSHIFT_MONGODB_DB_PASSWORD + '@' +
            process.env.OPENSHIFT_MONGODB_DB_HOST + ':' +
            process.env.OPENSHIFT_MONGODB_DB_PORT + '/' +
            process.env.OPENSHIFT_APP_NAME;
}


module.exports = {
    db: dbCon,
    port: process.env.PORT || process.env.OPENSHIFT_NODEJS_PORT || 3000,
    ip: process.env.OPENSHIFT_NODEJS_IP || process.env.IP || 'localhost',
    facebook: {
        clientID: process.env.FACEBOOK_ID || 'zzzzzzzz',
        clientSecret: process.env.FACEBOOK_SECRET || 'zzzzzzz',
        callbackURL: '/auth/facebook/callback'
    },
    twitter: {
        clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
        clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
        callbackURL: '/auth/twitter/callback'
    },
    google: {
        clientID: process.env.GOOGLE_ID || 'APP_ID',
        clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET',
        callbackURL: '/auth/google/callback'
    },
    linkedin: {
        clientID: process.env.LINKEDIN_ID || 'APP_ID',
        clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET',
        callbackURL: '/auth/linkedin/callback'
    },
    github: {
        clientID: process.env.GITHUB_ID || 'APP_ID',
        clientSecret: process.env.GITHUB_SECRET || 'APP_SECRET',
        callbackURL: '/auth/github/callback'
    },
    mailer: {
        from: process.env.MAILER_FROM || 'MAILER_FROM',
        options: {
            service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER',
            auth: {
                user: process.env.MAILER_EMAIL_ID || 'MAILER_EMAIL_ID',
                pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD'
            }
        }
    }
};

@mpescarmona
Copy link
Author

Seems as not a timeout issue. Did you see the --timeout 600 (seconds) on the executed command ?.
So I will ask for support to Openshift, but, do you have any idea about the cause ?

@ilanbiala
Copy link
Member

@mpescarmona When I asked Openshift about it, they said that cloning from a Git repo has a timeout of 2 minutes, but that could have changed.

@karan-kapoor90
Copy link

I'm also looking to do the same thing. Any success yet ?

On Mon, Mar 16, 2015 at 9:25 AM, Ilan Biala notifications@github.com
wrote:

@mpescarmona https://github.com/mpescarmona When I asked Openshift
about it, they said that cloning from a Git repo has a timeout of 2
minutes, but that could have changed.


Reply to this email directly or view it on GitHub
#477 (comment).

@mpescarmona
Copy link
Author

Sorry @karan-kapoor90, I couldn't test and apply the suggestion made by @puttyman, but I will apply soon and share here my findings.

@mpescarmona
Copy link
Author

Hi guys, I'm tested the production environment suggested by @puttyman but without success.
Seems as the application clones the sources from bitbucket, builds the application using the production env and then, but something gose wrong since the deployment says that the meanjsorg application already exists.

Below is the command executed and its stacktrace:

rhc app create meanjsorg nodejs-0.10 mongodb-2.4 --env NODE_ENV=production --from-code https://mpescarmona@bitbucket.org/mpescarmona/meanjsorg.git --trace

This is the log of the executed command

Domain:                mpescarmona
Cartridges:            nodejs-0.10, mongodb-2.4
Source Code:           https://mpescarmona@bitbucket.org/mpescarmona/meanjsorg.git
Gear Size:             default
Scaling:               no
Environment Variables: NODE_ENV=production

Creating application 'meanjsorg' ... /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:770:in `handle_error!': The supplied application name 'meanjsorg' already exists (RHC::Rest::ValidationException)
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:423:in `block in request'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:405:in `block in attempt'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:404:in `each'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:404:in `attempt'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/client.rb:411:in `request'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/base.rb:30:in `rest_method'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/rest/domain.rb:68:in `add_application'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands/app.rb:606:in `create_app'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands/app.rb:155:in `block in create'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/highline_extensions.rb:190:in `call'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/highline_extensions.rb:190:in `section'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/highline_extensions.rb:204:in `paragraph'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/helpers.rb:337:in `block (2 levels) in <module:Helpers>'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands/app.rb:151:in `create'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands.rb:294:in `execute'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/command.rb:179:in `call'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/command.rb:179:in `call'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/command.rb:154:in `run'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/runner.rb:419:in `run_active_command'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/command_runner.rb:100:in `run!'
    from /var/lib/gems/1.9.1/gems/commander-4.3.0/lib/commander/delegates.rb:19:in `run!'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/lib/rhc/cli.rb:37:in `start'
    from /var/lib/gems/1.9.1/gems/rhc-1.35.1/bin/rhc:20:in `<top (required)>'
    from /usr/local/bin/rhc:23:in `load'
    from /usr/local/bin/rhc:23:in `<main>'

@mpescarmona
Copy link
Author

@karan-kapoor90 did you get success for your side ?
Probably @ilanbiala could have any suggestion about this issue.

@karan-kapoor90
Copy link

Haven't had the opportunity to look into it yet . Been busy making a
notification system using socket for mean js. Would you guys be interested
in a PR for that? I've done it in 0.3 though.

On Saturday, March 21, 2015, mpescarmona notifications@github.com wrote:

@karan-kapoor90 https://github.com/karan-kapoor90 did you get success
for your side ?
Probably @ilanbiala https://github.com/ilanbiala could have any
suggestion about this issue.


Reply to this email directly or view it on GitHub
#477 (comment).

@ilanbiala
Copy link
Member

@karan-kapoor90 you can open a PR and we'll get some feedback going if you already have something just to start looking at. Some feedback and reflection on the implementation would be good, too.

@karan-kapoor90
Copy link

Cool. It's integration interface is an angular service naked by some server
code, so come to think of it, not going to be difficult at all to merge
onto 0.4 either. Would you like a PR for 0.4 or 0.3?

On Saturday, March 21, 2015, Ilan Biala notifications@github.com wrote:

@karan-kapoor90 https://github.com/karan-kapoor90 you can open a PR and
we'll get some feedback going if you already have something just to start
looking at. Some feedback and reflection on the implementation would be
good, too.


Reply to this email directly or view it on GitHub
#477 (comment).

@ilanbiala
Copy link
Member

0.4 would be better, but we'll probably have to update/rebase it later if we decide to merge it in.

@codydaig
Copy link
Member

@karan-kapoor90 Are you still interested in submitting a PR for this?

@ilanbiala
Copy link
Member

@karan-kapoor90 haven't heard anything, so I'm going to close. Feel free to comment if you open a PR.

@ilanbiala ilanbiala self-assigned this Oct 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants