got 500 from my app

69 views
Skip to first unread message

yyfearth

unread,
Apr 1, 2012, 8:19:04 PM4/1/12
to clou...@googlegroups.com
i've got 500 page when i init the app, then it ok when i open the app url, but after i uploaded my app, it 500 again.

Terminal when i init the app:

cloudnode info initializing git repo for madtalk into folder madtalk
cloudnode info cloning the repo git clone clou...@git.cloudno.de:/git/yyfearth/789-7b041ff8be564382da25b7a9e0f0a66e.git madtalk
cloudnode info clone complete
cloudnode info writing app data to config
cloudnode info writing app files
cloudnode info processing the initial commit
cloudnode info attemping to start the new app.
cloudnode ERROR [HTTP 500] <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title id="title">Application Offline</title><style stype="text/css">html { font-family: Arial,Helvetica,sans-serif; }div { width: 100%; text-align: center; margin-top: 230px; color: #909090; }</style></head><body><div><img src="https://cloudno.de/static/img/cloudnode-logo2-light.png" alt="logo" /><h1>500</h1><h3>Application is offline</h3></div></body></html>

The log:
2 Apr 02:12:09 - Cloudnode wrapped script starting (1112) at Mon Apr 02 2012 02:12:09 GMT+0200 (UTC)
SyntaxError: Unexpected token <<
   at /var/cloudnode/nodester/scripts/launch_app_06.js:249:12
   at [object Object].<anonymous> (fs.js:115:5)
   at [object Object].emit (events.js:64:17)
   at afterRead (fs.js:1117:12)
   at Object.wrapper [as oncomplete] (fs.js:254:17)[SyntaxError: Unexpected token <<]

wait for responce. thx. 

Hans Schroeder

unread,
Apr 2, 2012, 3:16:39 AM4/2/12
to clou...@googlegroups.com
Your server.js file contains a line with << and that's not valid in Javascript. (That are markers from a git merge conflict)

<<<<<<< HEAD.server.js
...
=======
...

yyfearth

unread,
Apr 2, 2012, 5:24:41 PM4/2/12
to clou...@googlegroups.com
thx, but how can i fix that. in my local repo, i do not have this issue, the git repo is clean. and i pushed them into the cloudnode repo. but still got this.
and how can i solve this issue? delete them re-create? let me try.

Boris Huang

unread,
May 29, 2012, 2:06:16 AM5/29/12
to clou...@googlegroups.com
I get the same problem. Have you solve it?

yyfearth

unread,
Oct 17, 2012, 7:45:05 AM10/17/12
to clou...@googlegroups.com
still not solved yet.

yyfearth

unread,
Oct 17, 2012, 8:30:10 AM10/17/12
to clou...@googlegroups.com
found another problem:

17 Oct 13:26:00 - Cloudnode wrapped script starting (5332) at Wed Oct 17 2012 13:26:00 GMT+0100 (UTC)
SyntaxError: Unexpected token ILLEGAL
   at /var/cloudnode/nodester/scripts/launch_app_06.js:249:12
   at [object Object].<anonymous> (fs.js:123:5)

   at [object Object].emit (events.js:64:17)
    at Object.oncomplete (fs.js:1187:12)[SyntaxError: Unexpected token ILLEGAL]

but in my local machine, it is ok, so i cannot got the point.

---

and the previous '<<<<' problem i still cannot solve since both local and remote repo is clean
i think it may caused by internal git clone triggered by remote repo update hook.
since it happened after i force push `git push origin +master`

Hans Schroeder

unread,
Oct 19, 2012, 5:14:10 AM10/19/12
to clou...@googlegroups.com
Hi yyfearth,

and the previous '<<<<' problem i still cannot solve since both local and remote repo is clean

This is how git works. If there is a merge conflict, git adds the markers. You cannot expect that the platform automatically copes with merge conflicts. What you can do is prevent merge conflicts. 

To understand the conflict, let me explain:

There are three repositories involved.

1. Your local repo (on your local machine)
2. The Cloudnode repo (at git.cloudno.de)
3. The VM repo (on you node VM at xxx.cloudno.de)

Conflicts happen when two parties change the same file at the same location. I this case, some file got changed on the VM. This could be through your app (log files, uploaded files,..) or through npm (package.json, cloudnode npm install). If the same file is pushed through git both repos 1. + 2. are clean, but when the change lands in repo 3 there is a conflict in your VM (local change vs. git) and git inserts the conflict markers. If that code is executed by node, it gives the parsing error.

Please follow these rules:

1. Don't push npm modules using git, use npm (package.json or cloudnode npm install)
2. Don't push log files or other files that are actively changed by your application.

- Hans 
Reply all
Reply to author
Forward
0 new messages