Hi Folks,
I'm currently trying to deploy an ABMaterial app that I developed for a friend to their VPS and not having much luck... I have read the following threads but they have not helped me get over the line:
https://www.b4x.com/android/forum/threads/abmaterial-need-vps-deployment-tutorial.78297/
https://www.b4x.com/android/forum/threads/abmaterial-for-dummies-beginner-lessons.88346/#post-609895
https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/
I know enough about Unix to be drive and (and be dangerous) but I not a qualified Unix Admin so I picking my way through carefully but not getting a successful deployment.
My app runs perfectly on my dev machine from the B4J IDE using USBWebServer but I can't seem to get it working on the VPS. What I end up with in Chrome is:
Here is what I do to deploy:
Thanks in advance.
I'm currently trying to deploy an ABMaterial app that I developed for a friend to their VPS and not having much luck... I have read the following threads but they have not helped me get over the line:
https://www.b4x.com/android/forum/threads/abmaterial-need-vps-deployment-tutorial.78297/
https://www.b4x.com/android/forum/threads/abmaterial-for-dummies-beginner-lessons.88346/#post-609895
https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/
I know enough about Unix to be drive and (and be dangerous) but I not a qualified Unix Admin so I picking my way through carefully but not getting a successful deployment.
My app runs perfectly on my dev machine from the B4J IDE using USBWebServer but I can't seem to get it working on the VPS. What I end up with in Chrome is:
Here is what I do to deploy:
- In B4J I compile and run the app in Release mode to create the jar file.
- On the VPS I have created a directory called 'www' under the 'public_html' directory.
- I have set the permissions on www to 'rwxr-xr-x'.
- I copy the jar file and the 'copymewithjar.needs' file from the dev PC to the VPS 'public_html' directory.
- I copy the entire contents from dev pc '.../Object/www' to VPS '.../public_html/www/' directory, i.e. css, fonts, js and the app directory.
- I login to the VPS and start the app server with 'nohup java -jar appname cat > nohup.out &'.
- The process is running, verified by 'ps -ef | grep appname'
B4X:
root@mys [~]# ps -ef | grep Swim
root [B] 9375 [/B] 1 0 02:03 ? 00:01:08 [B]java -jar MySwimSplits.jar[/B]
root 17735 17702 0 20:08 pts/0 00:00:00 grep --color=auto Swim
root@mys [~]#
- The contents of nohup.out suggest that the app has started OK and I don't see any errors or issues in there.
- I suspected that the server port (51405) was not open and I asked the ISP to open that port, which I was told has been done (I don't know how I can verify this) but a couple of Unix commands do suggest that there is a java process listening on port 51405.
Thanks in advance.
Last edited: