Normal Topic Lantica on a linux web server (Read 1354 times)
ychaouche
Member
*
Offline



Posts: 6
Joined: Nov 1st, 2017
Lantica on a linux web server
Nov 10th, 2017 at 9:25am
Print Post Print Post  
Dear sesamers,

I was reading about the web capabilites of Sesame. The documentation says that to run Sesame as a web server (-web_server switch), one needs to also have a Sesame Client load up a sesame application. I don't know if this is possible in a linux hosting environement ?

I tried with the API to no avail. I wrote a 2 lines python script that would just import the sesame python api and connect to the server and keep the connxion open (the program is running in an interactive interpreter that stays open), but the http://localhost:80 still shows "impossible to connect" message on my browser, and according to lsof -i:80, the server isn't listening on port 80.


Here's how I launch the server

Code
Select All
./sesame-2017 -server localhost  -web_server 80 -daemon 



Here's proof that port 80 isn't open

Code
Select All
root@karabeela ~ # lsof -i:80
root@karabeela ~ # 



Here's simple python code that connets to the server

Code
Select All
import sesame_python_api as sesame
cnx = sesame.SesameConnect("localhost")
if not cnx:
    print "no cnx"
    exit(1)
 




It is run with ipython -i switch, like this :

Code
Select All
ipython -i sesameconnect.py
Python 2.7.1 (r271:86832, Jul  9 2012, 23:43:17)
Type "copyright", "credits" or "license" for more information.

IPython 0.10.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]:
 



After a while, the console where the server is launched shows this message

Code
Select All
Communications error with socket set notice. 



I don't know if the message is relevant or not.

Thanks for any feedback
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Lantica on a linux web server
Reply #1 - Nov 10th, 2017 at 4:54pm
Print Post Print Post  
One thing to note is that the -Web_Server is completely separate from the API. So there is no need for that python script that you have shown.

Yes it is possible to have a Sesame Client connect to the Server running on Linux to load the .DB file. The API counts as a Sesame client so you could write a script that Connects, does a search in a DB file, Closes and Disconnects. You will want to turn on Database Retention in your Sesame.ini file so that the DB file stays loaded after disconnecting the API client.

Try launching Sesame using Sudo as the OS may be preventing us from launching the webserver process.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
ychaouche
Member
*
Offline



Posts: 6
Joined: Nov 1st, 2017
Re: Lantica on a linux web server
Reply #2 - Nov 10th, 2017 at 7:09pm
Print Post Print Post  
Hello ray and thanks for the reply.

I was hoping I could run the client on the linux web server too instead of a desktop computer, so that it would be a 100% web solution. I guess the only option for me at the moment is to re-implement a CRUD using the API.

Thanks again !

  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Lantica on a linux web server
Reply #3 - Nov 10th, 2017 at 7:12pm
Print Post Print Post  
As long as the server computer has a GUI, you can run a Sesame client on it. If there is no GUI available, you can't run a client on it.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged