1

I'm developing a real time website. It's a map where the color of each city changes based on the current emotion.

I have the python part which is connected to my database. So whenever I run the python code a new record is added to the database. - it's a streaming code so it's never ending.

The command line that is suitable for my python code is (nohup) since I want it always running.

I'm using (Bluehost) as hosting server - VPS package.

I opened my SSH command line and run the command: enter image description here

So this means it's working? It created an out file but no record is added to the database!

What's the problem? Thank you

IS Student
  • 35
  • 4
  • Please post plain text instead of an image, especially when the image has such poor contrast. – Barmar Apr 10 '18 at 19:27
  • open the `nohup.out` file you have errors in your python code – eagle Apr 10 '18 at 19:50
  • But why when I run the code I have no problem but with nohup it occurs? – IS Student Apr 10 '18 at 19:57
  • `nohup` redirects `stdin` to an unreadable file and `stdout` to `nohup.out`. If your python script needs stdin, that will certainly cause problems. What is in the output? – jwm Apr 11 '18 at 07:34
  • I tried to run the command so I can get to see what is in "nohup.out". But it isn't creating the file. – IS Student Apr 11 '18 at 09:20
  • This is what I got (root@server.x.mybluehost.me [public_html]# nohup python streamTweets.js & [1] 2547 root@server.x.mybluehost.me [public_html]# nohup: ignoring input and appending output to `nohup.out')_ – IS Student Apr 11 '18 at 09:20

1 Answers1

3

The line Exit 2 means that there is a problem. You'll find a description in nohup.out (see the line that says ignoring input and appending nohup.out)

For a hint more clarity: the line that has Exit ... means the process called through nohup has terminated. The integer generally has meaning (more on those here), but you need to look at the actual nohup.out file before you'll learn anything.

cwallenpoole
  • 79,954
  • 26
  • 128
  • 166
  • Should I be able to open? Because it won't let me – IS Student Apr 10 '18 at 19:24
  • Have you tried chmodding it? You should be the owner. – cwallenpoole Apr 10 '18 at 19:28
  • I deleted the previous file and tried to run the command again but this is what I got: ((root@server.x.mybluehost.me [public_html]# nohup python streamTweets.js & [1] 2547 root@server.x.mybluehost.me [public_html]# nohup: ignoring input and appending output to `nohup.out')) – IS Student Apr 11 '18 at 09:21