I'm having troubles with configuration, setup, running. I have been using SQL-Ledger for many years but now I must update... I can access the ledgersmb login using links browser pointed to localhost. But I'm failing to figure out how to allows LAN access. I have a fresh install of Debian on a machine. I used the package manager to install ledgerSMB 1.6.9. To keep it light, no X. This system is for a very small organization. One login typical, never more than 5, access from inside the LAN only. Any clues on how to setup Apache or Starman or ?? to make this setup work? -- fm
Hi fm, On Fri, Dec 6, 2019 at 6:03 PM fmiser <fmiser@gmail.com> wrote:
I'm having troubles with configuration, setup, running. I have been using SQL-Ledger for many years but now I must update...
Welcome to our mailing list.
I can access the ledgersmb login using links browser pointed to localhost. But I'm failing to figure out how to allows LAN access.
The Debian package has been configured to allow only secure access by limiting the Starman server to access from 'localhost'. In your server, there should be a file called /etc/default/ledgersmb. In that file, there's a configuration parameter called LISTEN_ADDRESS (set to 'localhost' by default) By commenting out the line "LISTEN_ADDRESS=localhost" (and restarting the ledgersmb service, i.e. Starman), Starman will bind to all available interfaces, allowing access from other IP addresses and machines than just the local one. That should at least get you up and running being able to access the system.
I have a fresh install of Debian on a machine. I used the package manager to install ledgerSMB 1.6.9. To keep it light, no X. This system is for a very small organization. One login typical, never more than 5, access from inside the LAN only.
Any clues on how to setup Apache or Starman or ?? to make this setup work?
I think the above should be sufficient; if you find Starman too slow, there are 2 options in your setup: to increase the number of workers on Starman, which will help Starman serve your pages. The other option (but more complex) is to use Apache or Nginx as a reverse proxy; either will take less resources to serve the static content. However, in your scenario, I doubt that 5 or 7 workers won't be enough to provide a snappy experience. If you run into further issues, please don't hesitate to mail! Regards, -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
fmiser wrote:
I'm having troubles with configuration, setup, running. I have been using SQL-Ledger for many years but now I must update...
Erik wrote:
Welcome to our mailing list.
Thanks!
I can access the ledgersmb login using links browser pointed to localhost. But I'm failing to figure out how to allows LAN access.
... In your server, there should be a file called /etc/default/ledgersmb.
I found it. I see there is also a port listed, 5726.
By commenting out the line "LISTEN_ADDRESS=localhost" (and restarting the ledgersmb service, i.e. Starman), Starman will bind to all available interfaces, allowing access from other IP addresses and machines than just the local one. That should at least get you up and running being able to access the system.
Well, it did not work. So then I ran dpkg-reconfigure and told it to NOT setup for Apache as a Web Reverse Proxy (which I had done earlier) Now I cannot even connect using links2. http://192.168.6.16:5762/login.pl browser error "192.168.6.16 refused to connect." http://192.168.6.16/login.pl Apache error, "not found" However, if I log in over SSH, links2 works if I use localhost http://localhost:5762/login.pl but not if I use the IP address. http://192.168.6.16:5762/login.pl Next I tried using the IP address rather than just commenting out the "listen_address" in /etc/default/ledgersmb #####LISTEN_ADDRESS=localhost LISTEN_ADDRESS=192.168.6.16 LISTEN_PORT=5762 Same errors as above Any more clues? -- fmiser
Hi, On Sun, Dec 8, 2019 at 5:29 AM fmiser <fmiser@gmail.com> wrote:
fmiser wrote:
I'm having troubles with configuration, setup, running. I have been using SQL-Ledger for many years but now I must update...
By commenting out the line "LISTEN_ADDRESS=localhost" (and restarting the ledgersmb service, i.e. Starman), Starman will bind to all available interfaces, allowing access from other IP addresses and machines than just the local one. That should at least get you up and running being able to access the system.
Well, it did not work.
So then I ran dpkg-reconfigure and told it to NOT setup for Apache as a Web Reverse Proxy (which I had done earlier) Now I cannot even connect using links2.
http://192.168.6.16:5762/login.pl browser error "192.168.6.16 refused to connect."
Hmm. I didn't understand that this worked before. I thought you were logging into the machine using SSH and then using lynx or links2. Do you have any idea if there's a firewall in place which may be blocking port 5762? (or maybe all ports except e.g. 22, 80 and/or 443?)
http://192.168.6.16/login.pl Apache error, "not found"
Well, now that you "unconfigured" the reverse proxy I guess the above is to be expected: the reverse proxy setup should make sure the above works through some extra apache configuration.
However, if I log in over SSH, links2 works if I use localhost http://localhost:5762/login.pl
but not if I use the IP address. http://192.168.6.16:5762/login.pl
Next I tried using the IP address rather than just commenting out the "listen_address" in /etc/default/ledgersmb
Ok. But did you try the situation with the commented-out
#####LISTEN_ADDRESS=localhost LISTEN_ADDRESS=192.168.6.16 LISTEN_PORT=5762
Same errors as above
Should I be concluding that you get no error with links2 over http://localhost:5762/login.pl from the last remark ("same errors as above")? or does that stop working? If it kept working after changing the IP, my main question would be: did you restart the ledgersmb service after you edited /etc/default/ledgersmb ? Also, which version of Debian did you install? I saw above that you said "fresh installation of Debian", but is that Buster or Stretch or Sid or ...? If this is Buster, I think we might be banging on the wrong door: in that case, we probably should be looking in the "ledgersmb.service" (or something named like it) file to change the starman startup parameters. I don't have a Debian 10 handy right now, so if you let me know which Debian version, I'll spin one up and see what the package looks like in installed form (note that Jaime maintains the package; I just know how to analyse it). Regards, -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
fmiser wrote:
I'm having troubles with configuration, setup, running.
Erik wrote:
By commenting out the line "LISTEN_ADDRESS=localhost" (and restarting the ledgersmb service, i.e. Starman), Starman will bind to all available interfaces,
fmiser wrote:
Well, it did not work.
So then I ran dpkg-reconfigure and told it to NOT setup for Apache as a Web Reverse Proxy (which I had done earlier) Now I cannot even connect using links2.
http://192.168.6.16:5762/login.pl browser error "192.168.6.16 refused to connect."
Hmm. I didn't understand that this worked before. I thought you were logging into the machine using SSH and then using lynx or links2.
I guess I wasn't as clear as I thought I was... I am trying to use a GUI browser from outside, and using links2 when logged in over SSH. So far I have never gotten a connection to work from "outside" the server.
Do you have any idea if there's a firewall in place which may be blocking port 5762? (or maybe all ports except e.g. 22, 80 and/or 443?)
I'm pretty sure there isn't one # iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
However, if I log in over SSH, links2 works if I use localhost http://localhost:5762/login.pl
but not if I use the IP address. http://192.168.6.16:5762/login.pl
Next I tried using the IP address rather than just commenting out the "listen_address" in /etc/default/ledgersmb
Ok. But did you try the situation with the commented-out
Yup. :(
#####LISTEN_ADDRESS=localhost LISTEN_ADDRESS=192.168.6.16 LISTEN_PORT=5762
Same errors as above
... my main question would be: did you restart the ledgersmb service after you edited /etc/default/ledgersmb ?
Yes.
Also, which version of Debian did you install? I saw above that you said "fresh installation of Debian", but is that Buster or Stretch or Sid or ...? If this is Buster, I think we might be banging on the wrong door:
It is Buster, Debian 10. Sorry, I sure intended to mention that. I could document each step, but in general: From a browser on the LAN http://172.20.6.16/ Works - shows Apache default page http://172.20.6.16/login.pl "not found" error http://172.20.6.16:5762/login.pl "unable to connect" error From a "internal" browser (links2, 'cause X is not installed) http://localhost/ Works - shows apache default page http://localhost/login.pl "not found" error http://localhost:5762/login.pl works - see login http://172.20.6.16/ Works - shows apache default page http://172.20.6.16/login.pl "not found" error http://172.20.6.16:5762/login.pl "connection refused" error
... in that case, we probably should be looking in the "ledgersmb.service" (or something named like it) file to change the starman startup parameters.
Would that be "/etc/init.d/ledgersmb"? I also see /usr/share/ledgersmb/conf/systemd/ledgersmb_starman.service /usr/lib/systemd/system/ledgersmb.service Those appear to be identical ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Place this in /etc/systemd/system/ledgersmb_starman.service # systemctl enable ledgersmb_starman # service start ledgersmb_starman [Unit] Description=LedgerSMB Starman After=network.target [Service] WorkingDirectory=/usr/share/ledgersmb # In case you installed dependencies into a 'local::lib' # make sure you set the PERL5LIB environment variable # to the correct location by uncommenting the line below #Environment=PERL5LIB=/path/to/local-lib/lib/perl5 Environment=LSMB_CONFIG_FILE=/etc/ledgersmb/ledgersmb.conf # Be sure to set a user and group below # which don't have write access to the directories # holding the LedgerSMB sources User=ledgersmb Group=ledgersmb ExecStart=/usr/bin/starman \ --listen localhost:5762 \ -I lib \ -I old/lib \ bin/ledgersmb-server.psgi Restart=always [Install] WantedBy=multi-user.target ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Also /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/ledgersmb.service which is an empty file.
I don't have a Debian 10 handy right now, so if you let me know which Debian version, I'll spin one up and see what the package looks like in installed form (note that Jaime maintains the package; I just know how to analyse it).
I would sure appreciate any help! I'm still trying to adapt to systemd... -- f
Erik wrote:
Also, which version of Debian did you install?
If this is Buster, I think we might be banging on the wrong door: in that case, we probably should be looking in the "ledgersmb.service" (or something named like it) file to change the starman startup parameters.
Hoping for the best, I went looking. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ locate ledgersmb | grep .service /etc/systemd/system/multi-user.target.wants/ledgersmb.service /usr/lib/systemd/system/ledgersmb.service /usr/share/ledgersmb/conf/systemd/ledgersmb-development_plackup.service /usr/share/ledgersmb/conf/systemd/ledgersmb_plack-fcgi.service /usr/share/ledgersmb/conf/systemd/ledgersmb_plackup.service /usr/share/ledgersmb/conf/systemd/ledgersmb_starman.service /var/lib/systemd/deb-systemd-helper-enabled/ledgersmb.service.dsh-also /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/ledgersmb.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ But which of those might matter? Well, if it is port 5762 that I'm trying to deal with... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ for d in $(locate ledgersmb | grep service ); do if grep -q 5762 $d; then echo $d;fi; done /etc/systemd/system/multi-user.target.wants/ledgersmb.service /usr/lib/systemd/system/ledgersmb.service /usr/share/ledgersmb/conf/systemd/ledgersmb_plackup.service /usr/share/ledgersmb/conf/systemd/ledgersmb_starman.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The first one is a symlink pointing to the second one. That one has this section in the middle. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ExecStart=/usr/bin/starman \ --listen localhost:5762 \ -I lib \ -I old/lib \ bin/ledgersmb-server.psgi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I tried changing "localhost" to 172.20.6.16 and restarted ledgersmb, sometimes using the old method "/etc/init.d/ledgersmb restart" or the systemd way ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # service ledgersmb restart ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ No change. From "inside" (logging in over SSH and running "links2") I got a login prompt using the URL http://localhost:5762/login.pl but "connection refused" error using the URL http://172.20.6.16:5762/login.pl From outside, using another browser on the LAN I get a "cannot establish connection" using the URL http://172.20.6.16:5762/login.pl The next file I check is /usr/share/ledgersmb/conf/systemd/ledgersmb_plackup.service It too has a section in the middle mentioning "localhost" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ExecStart=/usr/bin/plackup \ --listen localhost:5762 \ -I lib/ \ -I old/lib/ \ --workers 3 \ --access-log $LOG \ --server Starman \ -R "bin, lib, old/lib" \ bin/ledgersmb-server.psgi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I changed "localhost" to "172.20.6.16". Same browser behavior as above. Somewhere in all this I find a reference to this file /usr/share/ledgersmb/conf/systemd/ledgersmb_starman.service At the top it says: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Place this in /etc/systemd/system/ledgersmb_starman.service # systemctl enable ledgersmb_starman # service start ledgersmb_starman ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So I change "localhost" to "172.29.6.16" and copy the file as instructed, ran the commands, and got this error: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # service start ledgersmb_starman start: unrecognized service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ At this point, I'm not actually sure I have un-done all the things I have tried. But so far none of the files I've change seem to have any effect. I'm don't think I care if I have a reverse proxy running or not - but I failed to get Apache as a reverse proxy to work either. I must be missing something! -- f
Erik wrote:
If this is Buster, I think we might be banging on the wrong door:
I have gone with a work around. I am now using an SSH tunnel from the host computer to the guest that's running LedgerSMB. This limits me to using a browser only on hosts setup with a tunnel, so I'd still like to get it working right. Meanwhile, I'm having trouble adding parts. But I'll create a new thread. -- f
On 07/12/19 00.02, fmiser (fmiser@gmail.com) wrote:
I have a fresh install of Debian on a machine. I used the package manager to install ledgerSMB 1.6.9. To keep it light, no X. This system is for a very small organization. One login typical, never more than 5, access from inside the LAN only.
Any clues on how to setup Apache or Starman or ?? to make this setup work?
Sorry to response this old thread. I have the same problems as yours, run smbledger under debian 10. After months I realize that smbledger on Debian buster only allow connection to localhost or 127.0.0.1 as point out by Erik Huelsmann (ehuels@gmail.com). To solve this, we need reverse proxy which as pointing out on installing new smbledger either from synaptic or by command line (apt install). I follow this tips https://ubiq.co/tech-blog/apache-reverse-proxy-configuration-step-step/ with a little exception, on virtualhost configuration I have add the following $ sudo nano /etc/apache2/sites-available/000-default.conf <VirtualHost *:80> ...... ProxyPreserveHost On ProxyPass / http://127.0.0.1:5762/ ProxyPassReverse / http://127.0.0.1:5762/ </VirtualHost> then restart apache2 services $ sudo systemctl restart apache2 after that, I can access smbledger from any node on LAN. http://ledgersmb.mydomain.tld BTW. Why this list does not have DNS MX record? That makes my first attempt posting bounce since the list domain does not have DNS MX record. I would suggest to create lists.ledgersmb.org DNS zone on Name Server mooglian.computerisms.ca so that can be add DNS MX record and A record on lists.ledgersmb.org DNS zone (also SPF, DKIM etc if need it). list.ledgersmb.org name server snaplian.computerisms.ca. list.ledgersmb.org name server ns.freelock.com. list.ledgersmb.org name server mooglian.computerisms.ca. list.ledgersmb.org name server ns1.freelock.com. lists.ledgersmb.org IN MX 10 lists.ledgersmb.org lists.ledgersmb.org. IN A 54.203.249.169 $ host -t mx lists.ledgersmb.org 1.1.1.1 Using domain server: Name: 1.1.1.1 Address: 1.1.1.1#53 Aliases: lists.ledgersmb.org has no MX record $ host -t soa ledgersmb.org 1.1.1.1 Using domain server: Name: 1.1.1.1 Address: 1.1.1.1#53 Aliases: ledgersmb.org has SOA record mooglian.computerisms.ca. bob.computerisms.ca. 2020080346 1800 1800 604800 21600 $ host -v -t a lists.ledgersmb.org mooglian.computerisms.ca Trying "lists.ledgersmb.org" Using domain server: Name: mooglian.computerisms.ca Address: 64.251.22.31#53 Aliases: ;; ANSWER SECTION: lists.ledgersmb.org. 600 IN A 54.203.249.169 -- syafril --------- Syafril Hermansyah
participants (3)
-
Erik Huelsmann
-
fmiser
-
Syafril Hermansyah