node.js - NodeJS, Passport and Mongoose - Sub document issues -


i've been developing application few months , it's got stage ready deploy it.

everything working fine in development environment , have no issues.

i'm using nodejs, express , mongodb mongoose.

i'm deploying on 3 servers.
- reverse proxy nginx server.
- server runs application.
- database server.

  • the versions of mongodb , node same on development , live servers.

  • all of these servers running ubuntu 14.10 , date fresh installs.

  • as suggested in other questions i'm loading mongoose before express.

the issue when go sign deployed system, application crashes returning following error.

/project/node_modules/mongoose/lib/types/embedded.js:220     throw new error(msg);           ^ error: unable invalidate subdocument has not been added array.     @ embeddeddocument.$isvalid (/project/node_modules/mongoose/lib/types/embedded.js:220:11)     @ /project/node_modules/mongoose/lib/document.js:1022:17     @ process._tickcallback (node.js:355:11) 

i've checked database , it's not adding sign data online version. tried development version. can add database development version if point data connection string @ online one.

however, when attempt log in there, submit log-in form , them redirected home page. wondering if issue data being passed mongodb or issue nginx setup, follows:

server {         listen 80 default_server;         listen [::]:80 default_server ipv6only=on;         server_name localhost;          location / {                 proxy_pass http://ip_address:8080;                 proxy_http_version 1.1;                 proxy_set_header upgrade $http_upgrade;                 proxy_set_header connection 'upgrade';                 proxy_set_header host $host;                 proxy_cache_bypass $http_upgrade;         } } 

any or points in right direction hugely appreciated. i'm lost , no longer able google-foo myself out of one. i'm unsure if web server, problem application or wrong in database.

next step moving database on application server see if can narrow issue down.

thanks , help!


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -