Node restart.txt not restarting in cPanel

Whenever I create a server action or update a server action on my Node Project, I have this error in the output.


Which I have already reported as an FTP bug.

If I go to my cPanels File Manager I can see my new server action placed inside /app/api/ folder, however if I click the Test in Browser button I get
Screenshot 2020-06-02 at 10.06.29
and if I try to use a binding from the action on my page I also get an error
Screenshot 2020-06-02 at 10.09.20

I have 2 options, I can either wait about an hour or more and suddenly for some unknown reason it will become available like magic or I can go to cPanel and in the cPanel terminal app enter

cd app/tmp
touch restart.txt

Which then makes the action file work instantly.

What I do find odd about this is if I save a normal index.html file i am working with in Wappler it shows the alterations right away even though no restart.txt file has been sent, if I do a full publish in Wappler, sometimes the restart is sent, and even then without any output error, the action file is still not available and i have to do the terminal touch command.

Yes we automatically create and upload tmp/restart.txt On each ftp upload to auto restart the node server.

Maybe we haven’t covered all the possible cases :slight_smile: for ftp upload

But publish should actually work fine

Here is a quick video showing the problem in it’s entirety @George

Just an update, the publish in the video does not work either, however that is because there are no new files to publish, if I add a fake file in my file manager, and then publish, the restart is sent and works.

For Node, could we not just have another button in the get, publish, abort, area saying restart, there are often going to be times where things may be done, like manually updating something, or manually changing a file, or Patrick supplies a quick fix script update, and because cPanel is silly and does not have a restart button for the app, if Wappler had one then as a fallback it’s there if needed.

Also noticed this same thing, thought it was me!

1 Like

Is the local Node dev server maybe running?

Localhost:3000

It is auto started when you have the development target selected

The Development server on http://localhost:3000/ is running when I select the development target



Screenshot 2020-06-02 at 23.08.12
However like in the video, I am not switching targets at all, I am staying in my remote-hosting target the entire time.

I hope I have understood your question correct and given the answer and info you needed George, if not just shout.

@George, between Brian and myself we have managed to get to the bottom of this restart.txt problem.

My cPanel root folder is /home/paul
Screenshot 2020-05-29 at 16.58.00

I called my container folder for all my node files app so my application root folder was /home/paul/app, and these files are contained within, as you can see there will be instances where we land up with /home/paul/app/app/api
Screenshot 2020-06-03 at 11.33.02

Changing the root folder to something different like nodejsapp like this
Screenshot 2020-06-03 at 11.35.21

Has fixed the entire issue, now I can publish and/or save files and the restart.txt always gets add/removed perfectly and the node app restarts as expected.

EDIT: Question now is, is this something Wappler can account for and fix so the folder can be named app, or shall I amend my tutorial to make sure everyone that follows it is not calling their base folder app and landing in the same issue.
I wonder why it is not causing the same issue for Plesk from @Teodor tutorial just above, as his tutorial also uses the directory of app

2 Likes

I’m doing a manual install to a Centos instance on GCE and ran into this app issue as well. Your fix worked for me – just picking a different name kept everything in check.

Thanks Paul.

This has been fixed in Wappler 3.1

This topic was automatically closed after 47 hours. New replies are no longer allowed.