Download / installation / sqlite

Hi,

I new to Lucee. I am running into the following problems:

  1. Where do I download installer.run file? The tutorials wget an installer.run file, but I cannot find any files like that on the download page.

  2. Do I need to install Tomcat? I have installed jre 1.8 on my centOS, but I am not sure if I need Tomcat.

  3. Can Lucee work with SQLite? If yes, what extension is needed? Or, where can I find some tutorial?

  4. Is there some module for user access control? I mean: a user to login and he will see some folder or folders he is entitled to see.

Any help is appreciated
best regards
Jim

Don’t forget to tell us about your stack!

OS: CentOS7
Java Version: 1.8SE
Tomcat Version: ???
Lucee Version: ???

  1. Where do I download installer.run file? The tutorials wget an installer.run file, but I cannot find any files like that on the download page.

I think it refers to startup.sh foòe in express installation.

  1. Do I need to install Tomcat? I have installed jre 1.8 on my centOS, but I am not sure if I need Tomcat.

With express installation, you don’t need it (Tomcat is included in installation). If you want use Tomcat from the scratch you have to download lucee.war, rename to ROOT.war and copy in webapps folder of Tomcat, than start Tomcat.

however, I highly recommend using CommandBox for installation: 10 seconds and you’re already up and running.

  1. Can Lucee work with SQLite? If yes, what extension is needed? Or, where can I find some tutorial?

See here: https://lucee.daemonite.io/t/sqlite-or-other-minimal-install-db/2698

I hope I have helped you

Thank you very much Roberto_Marzialetti. I will do as you have kindly suggested and see how it goes.
best regards
Jim

Oh, I forgot to mention the following background info:
I installed CommandBox. The installation was nice and easy, but I ran into this problem:
I remotely work on a CentOS server where Lucee is to be deployed. On that server I don’t see any GUI, nor a systemTray, nor a browser. When I issue the CommandBox directive: server start, I have no way of firing up a browser and go to http://127.0.0.1:34745/. (34745 is the port number CommandBox assigns every time I start the server). The CentOS server has a static IP address 39.106.193.68 and a domain name, but http://39.106.193.68:34745 gives an page not found error.
So, I don’t know how to go any further.
If you could give me a few pointers, it would be great.
Thank you very much again.
best regards
Jim

When I issue the CommandBox directive: server start, I have no way of firing up a browser and go to http://127.0.0.1:34745/

Well, if you’re SSHing into a remote machine that has no GUI, then you obviously can’t open a browser on that machine. Unless, of course, you intend to open the browser on your own machine. In which case, I would recommend you double click the icon for your browser app. Of course, it won’t be 127.0.0.1 from your machine, but that depends on a lot of networking details you left out of your question above. If you’re simply wanting to test that the server is up from the Linux box, you can use curl.

(34745 is the port number CommandBox assigns every time I start the server)

To be clear, CommandBox may have randomly chosen that port the first time, but you can set any port you like for your CommandBox servers. Find the docs here: Server Port and Host - CommandBox : CLI, Package Manager, REPL & More

The CentOS server has a static IP address 39.106.193.68 and a domain name, but http://39.106.193.68:34745 gives an page not found error.

Hold on, there’s a lot of pieces you just glossed over. In order for you to hit the URL you showed above

  • CommandBox must be bound to an external IP. If you’re just doing a vanilla out-of-the-box server start with no other settings, it’s going to bind to 127.0.0.1 which isn’t accessible externally. It’s wizarding law.
  • The HTTP port must not be blocked by a firewall. If there is a firewall either on the CentOS box or “in front” of it that only allows standard ports through, you may not be able to reach that specific port. This is something you’ll need to verify in your networking setup.
  • What exactly is this “page not found” error? Can you provide a screenshot or something? Is your browser saying it can’t connect? Are you hitting something that’s returning a web server error? Are you getting a status code or a connection failure?

So, I don’t know how to go any further.

Start with the questions above. Binding to the external port is most likely at least one of your problems. The quick fix for it is to set the host to 0.0.0.0 which binds to all IPs.

If you could give me a few pointers, it would be great.

Read through the entire “Embedded Server” section of those docs and it will likely answer a lot of your questions.

Thank you bdw429s for your quick response, and please forgive me for asking newbie questions.

I cannot find any instructions as to where to bind the external ip address.

Based on my guessing, I have done this:

In my /etc/firewalld/services/http.xml file, I have port=“100” opened, please see the screenshot below.

Then at the CommandBox console, I issue this command:
server start address=0.0.0.0 port=100

Then I launch a Chrome browser from my local Win10 machine and point to http://39.106.193.68:100/

But I get an error message saying: ERR_CONNECTION_TIMED_OUT
I meant to upload a screenshot, but I see an alert saying that a new user is only allowed to post one image, so I have to omit it.

The error page is in Chinese anyway, but the idea is “timed out”.

Your help is greatly appreciated.
best regards
Jim

server start address=0.0.0.0 port=100

try this:

server start host=0.0.0.0 port=100

please, post your server.json on webroot

hth

1 Like

Thank you Roberto_Marzialetti for your much appreciated help.

I tried “server start address=0.0.0.0 port=100” at your suggestion, but I get the same error:

ERR_CONNECTION_TIMED_OUT

Here is my server.json at the webroot:
{
“address”:“0.0.0.0”,
“web”:{
“host”:“0.0.0.0”,
“http”:{
“port”:“100”
}
}
}

Thank you again for you help.
best regards
Jim

“address”:“0.0.0.0”,

the correct key is “host”. you can delete “address” key.
i see that you add corretly “host”.

server.json is correct

in my opinion is your firewal: try to disable it to testing.

also, try to post your output of:

server list

in commandbox

First, lets decide if your issue is a related to the server not starting or not starting on the correct host/port binding or if it’s a firewall issue. Start your server and use netstat and and curl to test it locally. Something like

netstat -bano | grep 100 

should show whether your java process is bound (listening) on the correct host and port. Also note here that you must be running as root to bind to a port below 1024. Adding ---debug to your start command will show you a lot of additional information about the server coming up. If the netstat looks correct, then run

curl http://39.106.193.68:34745

locally and see if you get an HTML response back from your web server. If these two steps work then we can safely say that you’re issue is related to your networking stack and a firewall or routing issue.

Thank you very much bdw429s for your patient and clear instructions, which I have followed, except that I had to omit the -b flag from netstat cammand as it is not valid on my CentOS system.
Here is what I have got:

  1. server list show that the server is running on 0.0.0.0:100
  2. netstat -ano | grep 100 gets the following listing:
    0 0 0.0.0.0:100 0.0.0.0:* LISTEN off (0.00/0/0)
    I don’t know why it says “off (0.00/0/0)”, or whether it matters.
  3. curl http://0.0.0.0:100 returns html string
ErrorForbidden 4. curl http://39.106.193.68:100 times out curl: (7) Failed connect to 39.106.193.68:100; Connection timed out

It seems that CommandBox does not recognise 39.106.193.68.
Your help is greatly appreciated.

I forgot to mention that I disabled my firewall:
捕获 ewall.

By the way, I don’t know why my post above appeared twice, and I don’t know how to fix it. It looks bad, but it was not done by me on purpose. My apologies.

except that I had to omit the -b flag

yes sorry, I gave you the flags I use for netstat on Windows. On Linux I use netsat -pan usually.

returns html string

Is that the HTML you expect to get back when hitting the root of your site?

curl http://39.106.193.68:100 times out

Then it seems you have something blocking the traffic from the external IP.

It seems that CommandBox does not recognise 39.106.193.68.

It’s not a mater of CommandBox “recognizing” the address. It’s a matter of your HTTP request likely never reaching your VM in the first place. This probably has nothing at all to do with CommandBox and everything to do with whatever networking routing and firewalls are in place. At this point, I would recommend you reach out to whatever support you have to help you with your infrastructure.

I forgot to mention that I disabled my firewall:

There could be other firewalls outside of your VM. I would reach out to your support and ask them to help you.

I don’t know why my post above appeared twice

I deleted the duplicate post for you.

I forgot to mention that I disabled my firewall:
捕获 ewall.

Posting for @liujinliang01

Many many thanks to @bdw429s bdw429s for pointing me to the right direction. Your step-by-step trouble shooting skill is marvelous!

Indeed it was another firewall implemented by the company from whom I leased my CentOS server that prevents opening of ports by applications.

Now that I have opened port 100 for CommandBox, it works - I mean when I curl http://39.106.193.68:100, I get html strings, not the timed-out error.

Now I am having another problem: the html returned is like this -

ErrorForbidden

I cannot find in the CommandBox tutorial how to solve this problem.

If I curl the index.html file in the webroot, I get the “not found” error.

In the following screenshot, I have indicated the commands I issued and the results I got with red underlines.

best regards

Jim

image

I’m not sure why you would get that error. My first thought is something is wrong with your default welcome files, but hitting the file directly should work fine. You can also enable directory browsing while testing.

I would start the server in debug mode

server start --debug

and then tail the server’s console log while you hit the URL in another browser or shell

server log --follow

Start by confirming that the request is in fact hitting Lucee.

Great news! My CommandBox is now up and running! I can now see index.cfm from the browser. How the Forbidden problem is solved I do not know - I didn’t do anything; it just started working this morning when I tried it.

When I look back, I must say that Lucee is great, CommandBox is great, and the Technical Advise Group is great! I got stuck not because of any flaws in those products, but because I did not know that there was another firewall at the company that I leased my server from. Special thanks to Brad, Joy, and Roberto!

Now that CommandBox is up and running, I will have to open another post to ask some questions. I hope you great guys will continue to extend your kind help.

Thank you again.
best regards
Jim

3 Likes