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
I get 500 errors on map and about after logging in #8332
Comments
This usually happens when the servers cannot connect to your database. Can you verify that you have mongo up and running and that it reports new connections? |
Could the fact that it's a 32 bit VM have anything to do with it? |
The last line there indicates that it waits for connections. But there is no indication that the server has connected. You should see something like this: You might want to try and double check that the mongodb uri is correctly set in your environmental variables. See: https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/sample.env |
Will do, thanks @BerkeleyTrue |
Yes, that's set correctly in my .env file. Let me post some of my mongo log. |
Can you post here exactly what you have for the mongo uri? |
MONGOHQ_URL='mongodb://localhost:27017/freecodecamp' |
Is mongo running within the same VM as the server? |
It ran fine for one evening, so the info must be correct for it to make that initial connection and work. I'm thinking there is a lock on mongo from the previous session. |
Yes, it's running in the same VM. |
Results of gulp: vagrant@precise32:/vagrant$ gulp
UI External: http://10.0.2.15:3002 [BS] Watching files... |
The "Data source ready" line is just some debug code I added. |
And mongo's output: vagrant@precise32:~$ mongod |
So there is definitely an issue making the connection: MongoError: connection 0 to localhost:27017 timed out |
Which version of node/npm are you running in the VM?
This tells me there is an old version of some module running. You may want to wipe your node_modules and |
Will try that now. |
Put together this VM just for this site, so everything is most recent stable release: And again, it ran fine the first day. So if anything was incompatible it wouldn't have ran at all right? |
Reinstalling node modules now, so hopefully that resolves the issue. |
Reinstalled node modules and am getting the same result. I will try tearing down mongo and all the data and reseed. |
I reseeded and ran gulp again and the timeout error went away, however, the chain message did not:
UI External: http://10.0.2.15:3002 [BS] Watching files... The site now responds as it should. However, when I sign up I get this error: If I go back to the home page and try to visit any other page I fall right back into that timeout loop: |
FreeCodeCamp server listening on port 3000 in development |
Mongo log when I got the timeout: 2016-04-28T18:56:50.774+0000 [PeriodicTaskRunner] task: DBConnectionPool-cleaner took: 9ms |
I'm sure you are busy, so I'm going to try to figure this out on my own. Will update if I do so. |
I just set up a new VM that is ubuntu 14 64 bit. Last one was Ubuntu 12 32 bit. I also changed the permissions of my mongo data folders to have same group and owner as my shared folder did (vagrant). Everything is working now, so my guess is it was related to running mongodb in 32-bit mode. |
Glad you sorted it out |
Me too! Thanks for your help! |
Got the same error on a mongodb 32 bits machine. Migrating to x64. |
I have a 64bit installation, but I get the same error. Rebuilding Logs after rebuillding - Gulp -
Mongo -
|
reopening on request |
Updated: Update all node modeles to recent versions and joined perfectly by gulp task to localhost fizzvr@fizz-machine:~/disco/proyectosgithub/FreeCodeCamp$ mongod --journal
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] MongoDB starting : pid=2364 port=27017 dbpath=/data/db 32-bit host=fizz-machine
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] db version v3.2.11-33-g9d92066
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] git version: 9d920663421437e65706b0587077781895984e2d
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] allocator: tcmalloc
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] modules: none
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] build environment:
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] distarch: i686
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] target_arch: i386
2016-12-15T14:56:33.093-0500 I CONTROL [initandlisten] options: { storage: { journal: { enabled: true } } }
2016-12-15T14:56:33.207-0500 I - [initandlisten] Detected data files in /data/db created by the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
2016-12-15T14:56:33.249-0500 I JOURNAL [initandlisten] journal dir=/data/db/journal
2016-12-15T14:56:33.252-0500 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2016-12-15T14:56:33.321-0500 I JOURNAL [durability] Durability thread started
2016-12-15T14:56:33.322-0500 I JOURNAL [journal writer] Journal writer thread started
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten]
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten] ** WARNING: This 32-bit MongoDB binary is deprecated
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten]
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten]
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal).
2016-12-15T14:56:33.368-0500 I CONTROL [initandlisten] ** See http://dochub.mongodb.org/core/32bit
2016-12-15T14:56:33.369-0500 I CONTROL [initandlisten]
2016-12-15T14:56:33.369-0500 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 11937 processes, 65536 files. Number of processes should be at least 32768 : 0.5 times number of files.
2016-12-15T14:56:33.369-0500 I CONTROL [initandlisten]
2016-12-15T14:56:33.416-0500 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-12-15T14:56:33.417-0500 I NETWORK [initandlisten] waiting for connections on port 27017
2016-12-15T14:56:33.417-0500 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-12-15T14:59:32.381-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37722 #1 (1 connection now open)
2016-12-15T14:59:32.383-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37723 #2 (2 connections now open)
2016-12-15T14:59:32.516-0500 I NETWORK [conn1] end connection 127.0.0.1:37722 (1 connection now open)
2016-12-15T14:59:32.728-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37724 #3 (2 connections now open)
2016-12-15T14:59:32.909-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37725 #4 (3 connections now open)
2016-12-15T14:59:33.079-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37726 #5 (4 connections now open)
2016-12-15T14:59:33.086-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37727 #6 (5 connections now open)
2016-12-15T14:59:33.089-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37728 #7 (6 connections now open)
2016-12-15T14:59:55.460-0500 I COMMAND [conn2] command freecodecamp.$cmd command: update { update: "sessions", updates: [ { q: { _id: "qDgTLouZ5L9ocqcnYvCH40zQrn6W-YaN" }, u: { _id: "qDgTLouZ5L9ocqcnYvCH40zQrn6W-YaN", session: "{"cookie":{"originalMaxAge":77760000000,"expires":"2019-06-03T19:59:55.078Z","httpOnly":true,"path":"/"}}", expires: new Date(1559591995078) }, upsert: true, multi: false } ], ordered: true } keyUpdates:0 writeConflicts:0 numYields:0 reslen:131 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, MMAPV1Journal: { acquireCount: { w: 2 }, acquireWaitCount: { w: 1 }, timeAcquiringMicros: { w: 54 } }, Database: { acquireCount: { w: 1 } }, Collection: { acquireCount: { W: 1 } } } protocol:op_query 106ms
2016-12-15T15:00:06.790-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37741 #8 (7 connections now open)
2016-12-15T15:00:06.792-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37742 #9 (8 connections now open)
2016-12-15T15:00:07.059-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37744 #10 (9 connections now open)
2016-12-15T15:00:07.060-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37745 #11 (10 connections now open)
2016-12-15T15:01:33.194-0500 I NETWORK [conn4] end connection 127.0.0.1:37725 (9 connections now open)
2016-12-15T15:01:33.290-0500 I NETWORK [conn3] end connection 127.0.0.1:37724 (8 connections now open)
2016-12-15T15:01:33.482-0500 I NETWORK [conn5] end connection 127.0.0.1:37726 (7 connections now open)
2016-12-15T15:01:33.501-0500 I NETWORK [conn6] end connection 127.0.0.1:37727 (6 connections now open)
2016-12-15T15:05:51.045-0500 I NETWORK [conn11] end connection 127.0.0.1:37745 (5 connections now open)
2016-12-15T15:05:51.046-0500 I NETWORK [conn10] end connection 127.0.0.1:37744 (4 connections now open)
2016-12-15T15:05:51.046-0500 I NETWORK [conn9] end connection 127.0.0.1:37742 (3 connections now open)
2016-12-15T15:05:51.047-0500 I NETWORK [conn8] end connection 127.0.0.1:37741 (2 connections now open)
2016-12-15T15:05:51.047-0500 I NETWORK [conn2] end connection 127.0.0.1:37723 (1 connection now open)
2016-12-15T15:05:51.047-0500 I NETWORK [conn7] end connection 127.0.0.1:37728 (1 connection now open)
2016-12-15T15:19:03.687-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37947 #12 (1 connection now open)
2016-12-15T15:19:03.689-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37948 #13 (2 connections now open)
2016-12-15T15:19:03.916-0500 I NETWORK [conn12] end connection 127.0.0.1:37947 (1 connection now open)
2016-12-15T15:19:03.991-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37949 #14 (2 connections now open)
2016-12-15T15:19:04.067-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37950 #15 (3 connections now open)
2016-12-15T15:19:04.071-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37951 #16 (4 connections now open)
2016-12-15T15:19:04.075-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37952 #17 (5 connections now open)
2016-12-15T15:19:04.077-0500 I NETWORK [initandlisten] connection accepted from 127.0.0.1:37953 #18 (6 connections now open)
2016-12-15T15:19:04.176-0500 I COMMAND [conn14] command freecodecamp.block command: find { find: "block", filter: {}, sort: { superOrder: 1, order: 1 } } planSummary: COLLSCAN keysExamined:0 docsExamined:52 hasSortStage:1 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:2 nreturned:52 reslen:12469 locks:{ Global: { acquireCount: { r: 6 } }, MMAPV1Journal: { acquireCount: { r: 3 } }, Database: { acquireCount: { r: 3 } }, Collection: { acquireCount: { R: 3 } } } protocol:op_query 113ms
2016-12-15T15:19:04.353-0500 I COMMAND [conn16] command freecodecamp.challenge command: find { find: "challenge", filter: {}, sort: { _id: 1 }, projection: { dashedName: 1 } } planSummary: IXSCAN { _id: 1 } cursorid:30894092625 keysExamined:101 docsExamined:101 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:101 reslen:7940 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } protocol:op_query 238ms
2016-12-15T15:21:04.376-0500 I NETWORK [conn15] end connection 127.0.0.1:37950 (5 connections now open)
2016-12-15T15:21:04.388-0500 I NETWORK [conn17] end connection 127.0.0.1:37952 (4 connections now open)
2016-12-15T15:21:04.394-0500 I NETWORK [conn18] end connection 127.0.0.1:37953 (3 connections now open)
2016-12-15T15:21:04.502-0500 I NETWORK [conn16] end connection 127.0.0.1:37951 (2 connections now open)
Errors on Still 500 error on /map 302 GET 166.398 ms - /map
TypeError: _reduxForm.reducer.normalize is not a function
at createReducer (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/common/app/create-reducer.js:19:23)
at createApp (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/common/app/create-app.jsx:66:19)
at serveReactApp (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/server/boot/react.js:49:5)
at Layer.handle [as handle_request] (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/layer.js:95:5)
at next (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/layer.js:95:5)
at /home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:330:12)
at next (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:271:10)
at Function.handle (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:176:3)
at router (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:46:12)
at Layer.handle [as handle_request] (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:312:13)
at /home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:280:7
at param (/home/fizzvr/disco/proyectosgithub/FreeCodeCamp/node_modules/express/lib/router/index.js:349:14)
500 GET 83.962 ms - /en/map
Downgrade to 6.8.0 |
The node version is to be 6 (for instance I use 6.8.0, on macOS), can you try with the Latest LTS from https://nodejs.org. |
Can someone post the actual error, not just the status code? Is it the same timeout error? A status code doesn't give us any information other than an error has occurred. |
Of all the runs that I tested out this, I didn't see an actual gulp -
mongod -
And this is the "map" screen - |
@Manish-Giri I think what Berkeley is looking for is the error that is returned if you browse to the path that returns the 500 error in the browser ( |
@systimotic Okay, thanks for letting me know! I'll investigate and report. |
I also have this issue. When I navigate to
I fix this on my end by changing https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/server/utils/map.js#L91 to
This then results in a working map and the warning specified in #12006 |
Sounds like the database isn't seeded correctly. |
@systimotic I followed your instructions and visited that URL in the browser, this is what I get -
Update: I cloned the FCC repo to a different machine (Ubuntu 16.04, 64 bit), installed MongoDB, went through the all the necessary steps, upto
which is the same as what @augmt reported earlier today. I'm not so sure now if this is a seed problem, Also, chaning line 91 in |
@BerkeleyTrue @Manish-Giri Alternatively I fixed my issue by just downgrading If there's anything I can do to verify the integrity of the database, please let me know. |
@augmt That could also be a possible cause |
Since the bug has nothing to do with OP. closing in favor of #12103 |
Chaning line 91 in
|
Hi,
I'm getting a loopback error when I try to access any page after I'm logged in. This is happening in a VM in my local environment. The odd part is I was able to use the site locally to fix a bug without a problem for one night and when I came back the next morning to tackle another I started seeing this.
Has anyone else experienced this and if so what was the solution?
I did a search and came across this old issue from beta:
#971
However, increasing the timeout did nothing for me.
The text was updated successfully, but these errors were encountered: