w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Node.js node-apn module for Apple Push Notification stopped working after moving to Amazon EC2 instance running Ubuntu 12.04
Check your node --version s. On my Mac, homebrew installed v0.10.12 but on the server I was running v0.11.8-pre (by mistake). Apparently the present node-apn doesn't work under the unstable. I had this same extremely frustrating issue and hunted among firewalls/OpenSSH stuff until I realized the APNS connection still worked through PHP. The Ray Wenderlich script is a quick way to check if the problem is with node or elsewhere.

Categories : Node Js

How to setup a private dedicated Node.js Ubuntu Server?
what do i need to install to properly run node.js apps on my network on a dedicated ubuntu server? You just need to install nodejs. nodejs can run on any port, so you don't need Apache or anything else. how do i install the latest nodejs,npm,and the init files on ubuntu server Try to follow the steps outlined in this guide: http://howtonode.org/how-to-install-nodejs . Use the instructions for Ubuntu. when i reboot the app starts automatically every time One way to do this is to write a small script that will run on boot. The script would contain the instruction: nodejs /path/to/app/app.js Check out this SO answer on how to run a script on boot: Files and scripts that execute on boot

Categories : Node Js

What platform (server installed on ubuntu vs ubuntu server) to prefer for website development?
There seems to be a lot of confusion in your post. Based on your lack of experience with GNU/Linux, I would suggest you use desktop Ubuntu. The difference between Ubuntu server and Ubuntu desktop is that the server edition is targetted to experienced users, so you get a very minimal distribution. No GUI, nothing preinstalled except the bare minimum. As for your comment about Apache/Glassfish, the two aren't comparable. Apache is the name of the open source community which looks after a lot of products. Very often people call Apache's httpd just "apache", which is a web server. Glassfish is a Java EE application server (Oracle's reference implementation) so probably a good place to start with Java EE.

Categories : Apache

how to keep a node server app running on windows server
I'm not sure about running node in iis. However, you can take a look at the node packages forever, pm2, and nodemon, which will recover the instance in case of failure. Here's how to install node.js as a service Here's something on installing node in iis 7.5 Just an update. I've been using iisnode at work for the better part of a year. I would recommend it if you are deploying to Windows.

Categories : Node Js

running a server file on node.js
When you close the terminal, everything that runs in it is killed. There are many solutions on both Linux and Windows systems, most of them create some sort of a service which then runs in the background. Here are some possible solutions: http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever https://github.com/indexzero/daemon.node http://www.coretechnologies.com/products/AlwaysUp/Apps/RunNodeJSAsAService.html http://coreybutler.github.io/node-windows/manual/#!/api/nodewindows.Service Pick the one that is best for you. Related question on StackOverflow: How to run node.js app forever when console is closed?

Categories : Node Js

How to switch app.js to app2.js running on node server?
(Assuming you're using Express) You can create some middleware that checks if the user is authenticated. If they are, it forwards the request; otherwise, it does whatever it needs. See app.use in the documentation for more information. It turns out that if you want to apply middleware to specific routes, you can; just pass the middleware as additional arguments after the path and before the main handler.

Categories : Node Js

Running a forward proxy server in nodejitsu using node js
You can write a simple proxy using the request module, like this: var http = require('http'), request = require('request'); // For nodejitsu, this will be port 80 externally var port = process.env.PORT || 8000; http.createServer(function(req,res) { req.pipe(request(req.url)).pipe(res) }).listen(port); However, this will only work with http, not https. Nodejitsu also produces a proxy module, you may get some ideas on what to do next by looking at that.

Categories : Node Js

Receiving data sent from AIR app in node.js server running on Heroku
It seems it only does not work on the Simulator, once on testing on a real device it will work with the URL given by Heroku. Still don't know how to make it work on the Simulator though.

Categories : Node Js

error on running node.io via commandline on windows server 2008
I had the same problem and tried a couple of things. It seems Windows 7 had a problem with the command file name itself (node.io.cmd). If you copy this command to something without the period (ie. nodeio.cmd), then I could successfully invoke the tool using "nodeio" instead of "node.io". The file that would need to be changed was in my %APPDATA% pm directory. My %APPDATA% environment variable was mapped to "C:Users{my user name}AppDataRoaming".

Categories : Node Js

How do I create an HTTP server with Node.js on a DreamHost VPS running Apache?
Turns out I needed to tell Apache to forward the requests for that domain, and DreamHost provides a nice frontend for mod_proxy: http://wiki.dreamhost.com/Proxy_Server Thanks, CodeCaster!

Categories : Node Js

socket.io becoming slow and unresponsive after node server is left running for a couple days
You are probably experiencing a known bug in node.js that was recently fixed - see issue#5504. Is the problem still there after upgrading to node v0.10.11?

Categories : Node Js

I am trying to install my rails app onto a Ubuntu 10.04 box running in Vagrant (Virtualbox). I'm running into the following errors
The latest version of devise 3.0 fixes my devise errors. I am going to close this in favor of breaking out the second capybara error at Problems installing capybara-webkit 1.0.0 in Rails 3.2.10 on Ubuntu 10.04

Categories : Ruby On Rails

Cannot access ubuntu server from other machines other than the machine which is hosting the virtual machine which is my ubuntu server
First of all make sure in the setting of the virtual machine that it is in Bridged Adaptor type connectivity. Give a static ip to the virtual machine using sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0 the above is an example. You got what I mean. 3.Third, Try pinging the virtual machine with the base machine running the vbox to make sure they are connected. ping ipaddress-basemachine 4 . Now if everything is working fine from there then connect with this virtual machine with other base machine using Remote Desktop Viewer or any other similar application. Specify, the ip-address of the vbox and username, password. It will be able to connect with it now. 5 . If it still is not able to then try to check the firewall rules on both the virtual box machine and the base machine

Categories : Linux

nodejs vs node on ubuntu 12.04
You need to manually create a symlink /usr/bin/node. Shortcut for bash compatible shells: sudo ln -s `which nodejs` /usr/bin/node Or if you use non-standard shells, just hardcode the path you find with which nodejs: sudo ln -s /usr/bin/nodejs /usr/bin/node Later edit I found this explanation in the link you posted There is a naming conflict with the node package (Amateur Packet Radio Node Program), and the nodejs binary has been renamed from node to nodejs. You'll need to symlink /usr/bin/node to /usr/bin/nodejs or you could uninstall the Amateur Packet Radio Node Program to avoid that conflict. Later later edit It's been a while since I answered this. Although the solution I posted up here worked for me several times, users have reported a few more solutions within the comme

Categories : Node Js

How to check service is running or not on Ubuntu?
I don't have a Ubuntu box, but on Red Hat Linux you can see all running services by running the following command: service --status-all

Categories : Linux

How to Running celeryd as a daemon in ubuntu?
I am adding a proper answer in order to be clearly visible: Workers are unix processes that will run the various celery tasks. As you can see in the documentation, the CELERYD_USER and CELERYD_GROUP determine the name of user and group these workers will be run in your Unix environment. So, what happened initially in your case is that celery tried to start the worker with a user named "celery" which did not exist in your system. When you commented out these two options, then celery started the workers with the user that issued the command sudo /etc/init.d/celeryd start which in this case is the root (administrator) user (default is the current user). However, it is recommended to run the workers as unpriviledged users and not as root for obvious reasons. So I recommend to actually add

Categories : Python

wicked_pdf does not run on Ubuntu server : wkhtmltopdf: cannot connect to X server
Verify you have xvfb installed, or install it using apt-get install xvfb. Create a file called wkhtmltopdf.sh and add the following: xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf $* Change the dimensions (640x480x16) to match whatever virtual screen parameters you want it to emulate. Move the shell script to /usr/bin, and set permissions: sudo chmod a+x /usr/bin/wkhtmltopdf.sh Optionally, you can add a symbolic link in your project directory: ln -s /usr/bin/wkhtmltopdf.sh wkhtmltopdf See this and this for reference.

Categories : Ruby On Rails

node js can't install right on my Ubuntu computer
You have to make before you make install. The wiki has more information about building from source.

Categories : Node Js

node-gyp install error on Ubuntu 12.04
I had the same problem. At the end of the NPM output, it says to see: /usr/share/doc/nodejs/README.Debian This file contains an explanation that the interpreter is run from the command line with "nodejs" not "node" due to namespace collision with some other (non node.js) package using the command "node" on the command line. I couldn't solve the problem, however bash scripts need to be changed to reflect this, and I'm not sure how to change scripts NPM uses. Paul

Categories : Python

Joomla 3.1 setup on Ubuntu 12.04 running nginx
The permissions when t3 installs are correct, it sounds like the problem is with ownership rather than permissions. I think in ubuntu the system user is www-data so you would need to run the following over ssh chown -hR www-data:www-data /path/to/joomla/root Then upload the plugin through the joomla installer (and change folder permissions back to 755 and files to 644).

Categories : Joomla

website on ubuntu suddenly running slow
Have you tried rebooting? in the old days it helped clearing the memory once in a while. another thing making apache slow is the hostnamelookup, perhaps the dns chaching server has issues. as always look at the log files. perhabs there's somewhere a loop (dns or 302 .htaccess)

Categories : Mysql

Running Java Infinite Loop in Ubuntu
Run a program immune to hangups If you're happy with starting the Java program up manually from the command line, but just want to not have screen running, you can use the "nohup" command to start the Java process in such as way that the Java program will continue running even if you close the console window or log out. $ nohup java ... nohup: ignoring input and appending output to `nohup.out' $ Run a program in the background If you don't mind the Java program stopping if you close the console window or log out, you can skip using "nohup" and only append a "&" to the end of the command to tell your shell to run the application in the background. You may also want to add " > program.log 2>&1" to the command to avoid having any output from the program show up in the console win

Categories : Java

Installing a specific Node version in ubuntu
Chris Lea has 0.8.23 in his ppa repo. This package let you add a repository to apt-get: (You can also do this manually) sudo apt-get install software-properties-common Add Chris Lea's repository: sudo apt-add-repository ppa:chris-lea/node.js-legacy Update apt-get: sudo apt-get update Install Node.js: sudo apt-get install nodejs=0.8.23-1chl1~precise1 I think (feel free to edit) the version number is optional if you only add node.js-legacy. If you add both legacy and ppa/chris-lea/node.js you most likely need to add the version.

Categories : Node Js

Node.js and Express - different result Windows 7 vs Ubuntu 13.04
Windows command line doesn't like the use of single quotes. I haven't tried this, but I believe this will work: curl -X POST -H "Content-Type:application/json" -d "{"type":"server","name":"SERVER1"}" The single quotes have been replaced with double quotes and the internal double quotes have been escaped. Update I was able to get this working on my local windows 7 (64bit) machine: C:>f:utilcurl.exe -X POST -H "Content-Type:application/json" -d "{"type":"server","name":"SERVER1"}" http://localhost:3000/ { "status": "SUCCESS" } curl version (just downloaded from http://curl.haxx.se/) C:>f:utilcurl.exe --version curl 7.31.0 (x86_64-pc-win32) libcurl/7.31.0 Protocols: dict file ftp gopher http imap ldap pop3 rtsp smtp telnet tftp Features: AsynchDNS GSS-Negotiate Largefile NT

Categories : Node Js

Debug in Eclipse while running from command line ubuntu
Is your application written in C or in Java? If your application is in C and you are using CDT, you can attach to existing project by: Run your application from terminal. In Eclipse CDT, go to main menu "Run"->"Debug Configurations...", double-click "C/C++ Attach to Application" and press "Debug" (you should not need to specify executable and/or project). For Java applications, see this

Categories : Eclipse

Ubuntu 12.04: Can't enter console after running update manager
If this were your main OS, I would instruct you to edit xorg.conf and mess around with various graphics drivers. But since you just installed 2 days ago, there shouldn't be any harm from wiping Ubuntu and starting over. Then you can do updates first to see if the graphics driver really is the problem.

Categories : Linux

Compilation Errors in running objective c code in ubuntu 12.10
If gcc couldn't find Object.h, it would give an error indicating that. The problem is that Apple removed most of the methods from Object.h (or at least the interface for it) in Objective-C 2.0. The main reason your program is giving these errors is that gcc is not including the Object class. Instead, you should subclass NSObject and include the Foundation framework.

Categories : Objective C

Execution of a node package command not working on Ubuntu 12.04 RTS
The issue was about the character encoding of the ./docxgenNode/bin/docxgen. The shell system didn't read the first line correctly. I started from an existing working binary file that can be found here: https://github.com/LearnBoost/stylus/blob/master/bin/stylus

Categories : Node Js

Error message by shell on running addr2line pragmatically on Ubuntu
This is a guess based on the error message. trace[i] is NULL, so the command generated is: addr2line (nil) -e xcep_app And so the shell that is invoked to execute the command complains about the parentheses. @WumpusQ.Wumbley reports that ash will reproduce this message: ash -c 'addr2line (nil) -e xcep_app'

Categories : C++

Failure installing meteor on ubuntu 13.04 running from usb on windows machine
You said you tried direct install on Windows, but gave no details - it should work fine. What was the problem? Which version of Windows are you using? You can use either an MSI install or an Exe installer from: https://github.com/sdarnell/meteor/wiki/Windows

Categories : Ubuntu

ubuntu svn post commit hook does not work, but works on manual running
Post-commit hook (any hook really) running in empty environment running under another user credentials, than on running by hand (user of SVN-server used) Anyway, you have to debug hook's script under real conditions (as hook). In orderto do it, you have Intercept output of update command (by redirecting stdout to stderr) Show this output to user, which perform commit, i.e, because stderr marshalled to user only in case of error in hook, you have to exit hook with non-zero exit-code Hook in debug-stage will be something like /usr/bin/svn update /var/project2_test/debug --username XXXX --password XXXX > &2 /bin/echo $REV >> /var/project2_test/svn.log exit 1

Categories : Svn

java scripts on my website running locally but not running on server
Uncaught SyntaxError: Unexpected end of input jquery.js:6 Uncaught ReferenceError: jQuery is not defined Check if you uploaded jQuery correctly. The file might have been truncated in the process. UPDATE Checking your jQuery file, the file truncates on line 6 with these as the last few characters. if(this[0]){var b=f(a,this[0].owne SOLUTION Re-upload the jQuery file (jquery.js) again, or Use jQuery CDN: Change: <script src='http://www.broadigital.co.ke/style/newcss/js/jquery.js?ver=1.7.2' type='text/javascript'></script> To: <script src='http://code.jquery.com/jquery-1.7.2.min.js' type='text/javascript'></script>

Categories : Javascript

Restart Mysql automatically when ubuntu on EC2 micro instance kills it when running out of memory
Abrupt termination of a database server is a very serious crash. You need to avoid this in a production system, because it may not restart cleanly. The database server is a shared resource, and should almost never terminate in an unplanned fashion in production. The only thing that should cause unplanned termination is a catastrophic hardware or power failure. Most properly configured production data base servers have an unplanned termination once every ten years or less frequently. Seriously. What to do? Fix your apache configuration. Limit the number of worker threads and processes it can use, so it can't run wild. Learn how to do this. It's vital. See here: http://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers Fix the defects in your web app that are causing

Categories : Mysql

Error while writing a Google CCS server in node using node-xmpp
The important part is to send the message in the required format : <message id=""> <gcm xmlns="google:mobile:data"> { "to":"REGISTRATION_ID", // "to" replaces "registration_ids" "message_id":"m-1366082849205" // new required field "data": { "hello":"world", } "time_to_live":"600", "delay_while_idle": true/false } </gcm> </message> It doesn't matter if you use a template or not. I don't know python nor javascript, but the purpose of the template in the python example seems to be simply to avoid the need to write the xml tags that wrap the JSON every time you send a message. You can append them to the JSON when you send the message.

Categories : Javascript

Read XML node attributes without using node name in SQL Server query
declare @xml xml set @xml = '<book Category="Hobbies And Interests" PropertyName="C#" CategoryID="44" /> <sport Category="Hobbies And Interests" PropertyName="Cricket" CategoryID="46" />' select T.c.value('@PropertyName', 'varchar(100)') from @xml.nodes('/*') T(c) If you expect that there can be elements without PropertyName attribute, you can use: select T.c.value('@PropertyName', 'varchar(100)') from @xml.nodes('/*[@PropertyName]') T(c) If you also expect that elements can be nested, you can use: select T.c.value('@PropertyName', 'varchar(100)') from @xml.nodes('//*[@PropertyName]') T(c)

Categories : Sql Server

Need GUI to run qemu on Ubuntu server
Are you connecting to the server over ssh? You could just use X forwarding to your local machine. See the very good first answer here. Then you can just start the software and interact with the GUI on a computer that already has the desktop environment installed.

Categories : Linux

Error reading mapoutput of other slave's map task ,what should be the actual content of etc/hosts file of ubuntu for running Hadoop cluster
ubuntu 8 (dont know about above versions) has this entry in etc/hosts file 127.0.1.1 yourhostname.localdomain yourhostname this entry was creating problems so comment that line, Heres my "etc/hosts" file: 127.0.0.1 localhost #127.0.1.1 hadoop-desk.localdomain hadoop-desk 192.168.196.128 master 192.168.196.129 slave # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters after that this error will came: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.dfs.SafeModeException: <Cannot delete /user/hadoop-user/test-mini-mr>. Name node is in safe mode. To avoid this error change this dfs.safemode.threshold.pct parameter in hdfs-default.xml f

Categories : Networking

Could not start jstatd on ubuntu server
I had the same problem as you. As far as I understood the exception occurred on the rmi registry side because it couldn't find the class sun.jvmstat.monitor.remote.RemoteHost located inside tools.jar. In my case the solution was to specify the java.rmi.server.codebase property when starting rmiregistry. After specifying the codebase property the problem gone. Please try to start the rmiregistry using the following command for Linux/Solaris: rmiregistry -J-Djava.rmi.server.codebase=file:${java.home}/../lib/tools.jar & or for Windows (though I didn't test it fully) start rmiregistry -J-Djava.rmi.server.codebase="%JAVA_HOME%/../lib/tools.jar" Hope it will help you.

Categories : Misc

Laravel 4, Ubuntu, SQL Server 2008R2
/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php Change this: protected $wrapper = '"%s"'; To this: protected $wrapper = '[%s]';

Categories : Sql Server

Ubuntu server and PHP $_SERVER['REMOTE_ADDR']
This is a consequence of using NAT. Either run an HTTP proxy on the router (and use X-Forwarded-For instead of REMOTE_ADDR) or give the machine running the HTTP server its own Internet facing IP address.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.