Access denied (401): Bad username/password
Good Morning Need some help. I used the docker images to install postgresql and ledgersmb (manually). I can log into the setup screen but when I want to create the DB, I get - Access denied (401): Bad username/password I use the postgres user. The install is on Linux Mint Thanks
Hi, On Sat, Dec 28, 2019 at 10:56 AM <fibreplay@gmail.com> wrote:
Good Morning
Welcome to the list!
Need some help.
I used the docker images to install postgresql and ledgersmb (manually).
Ok. Well, let me start pointing you to the Docker Compose file we have which should help you get started quickly: https://github.com/ledgersmb/ledgersmb-docker/blob/1.6/docker-compose.yml
I can log into the setup screen but when I want to create the DB, I get - Access denied (401): Bad username/password I use the postgres user.
The most likely diagnose I can come up with is that the LedgerSMB container can't connect to the database because it can't find it. However, with the information provided in this mail, I'm unable to assert that will truely be the case. Could you provide the following information for a better diagnosis and my testing? The information I'm looking for is: - The commands you used to create the containers - The output of 'docker ps' (showing at least the containers you created for LedgerSMB) - The output of 'docker inspect' for each of the containers If you're hesitant to send the info to this list, please send it to me privately.
The install is on Linux Mint
Regards, Erik. -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Hi Erik Thanks for reply. 1. I used the following commands.- (own password) $ sudo docker volume create dbdata $ sudo docker run -d --name postgres \ -e POSTGRES_PASSWORD=mysecretpassword \ -e PGDATA=/var/lib/postgresql/data/pgdata \ -v dbdata:/var/lib/postgresql/data \ postgres:latest Start LedgerSMB $ sudo docker run -d -p 5762:5762 --name myledger \ ledgersmb/ledgersmb:latest 2. output of - docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 26fdb4e8cf7e ledgersmb/ledgersmb:latest "start.sh" 24 hours ago Up 24 hours 0.0.0.0:5762->5762/tcp myledger 56d3dc91aa81 postgres:latest "docker-entrypoint.s…" 25 hours ago Up 25 hours 5432/tcp postgres 3. 26fdb4e8cf7e louis@louis-MS-7924:~$ sudo docker inspect 26fdb4e8cf7e [ { "Id": "26fdb4e8cf7e36fd75ee6a839cdf18c28f6285b29c88985d513b2d5c4f459386", "Created": "2019-12-27T19:14:36.774674997Z", "Path": "start.sh", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 13543, "ExitCode": 0, "Error": "", "StartedAt": "2019-12-27T19:14:43.39386418Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:bd5fb116c44f0efb14551abb31a8668ca80b1b2c694f48ac4bcde114542d0650", "ResolvConfPath": "/var/lib/docker/containers/26fdb4e8cf7e36fd75ee6a839cdf18c28f6285b29c88985d513b2d5c4f459386/resolv.conf", "HostnamePath": "/var/lib/docker/containers/26fdb4e8cf7e36fd75ee6a839cdf18c28f6285b29c88985d513b2d5c4f459386/hostname", "HostsPath": "/var/lib/docker/containers/26fdb4e8cf7e36fd75ee6a839cdf18c28f6285b29c88985d513b2d5c4f459386/hosts", "LogPath": "/var/lib/docker/containers/26fdb4e8cf7e36fd75ee6a839cdf18c28f6285b29c88985d513b2d5c4f459386/26fdb4e8cf7e36fd75ee6a839cdf18c28f6285b29c88985d513b2d5c4f459386-json.log", "Name": "/myledger", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": { "5762/tcp": [ { "HostIp": "", "HostPort": "5762" } ] }, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "shareable", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/7827f4e7df5bb1636e4bd3189281428b027e1ecd6e92e4db2ccb1f2362fc170b-init/diff:/var/lib/docker/overlay2/efc02b99ec2eb9c8cf6d113496135089e88f05790ec5cc4ef488782f337d2623/diff:/var/lib/docker/overlay2/167dacc57d1f3c4261d83306014e1bae78b2b9ebd179e56ca5132a6e4e376dc7/diff:/var/lib/docker/overlay2/d14a827b3631b13d2a8ca39a68b7d478e670d7e1df4f783871d5e4c1ab2eedc8/diff:/var/lib/docker/overlay2/638c7ee8dbebfdfa947d60fe6913929ebe234db2a0459f951a7c13cdc8b88c81/diff:/var/lib/docker/overlay2/3dc05dbfbad8b43a83e47369beef0d52695c30fe13ccc2876d2343aa91051e78/diff:/var/lib/docker/overlay2/ff82da55bb3c72d6c69a527568d4c871acb47721a4a785b440741676df0f9d87/diff", "MergedDir": "/var/lib/docker/overlay2/7827f4e7df5bb1636e4bd3189281428b027e1ecd6e92e4db2ccb1f2362fc170b/merged", "UpperDir": "/var/lib/docker/overlay2/7827f4e7df5bb1636e4bd3189281428b027e1ecd6e92e4db2ccb1f2362fc170b/diff", "WorkDir": "/var/lib/docker/overlay2/7827f4e7df5bb1636e4bd3189281428b027e1ecd6e92e4db2ccb1f2362fc170b/work" }, "Name": "overlay2" }, "Mounts": [], "Config": { "Hostname": "26fdb4e8cf7e", "Domainname": "", "User": "www-data", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "5762/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "SSMTP_ROOT=ar@example.com", "SSMTP_MAILHUB=172.17.0.1", "SSMTP_HOSTNAME=172.17.0.1", "SSMTP_FROMLINE_OVERRIDE=YES", "POSTGRES_HOST=postgres", "POSTGRES_PORT=5432", "DEFAULT_DB=lsmb" ], "Cmd": [ "start.sh" ], "ArgsEscaped": true, "Image": "ledgersmb/ledgersmb:latest", "Volumes": null, "WorkingDir": "/srv/ledgersmb", "Entrypoint": null, "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "51908d5a2a3ee65a4191b21b9f68f4d25571162f39fa69338b45fed52625ee50", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "5762/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "5762" } ] }, "SandboxKey": "/var/run/docker/netns/51908d5a2a3e", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "7953e044d3940fdbc2b4ec56134d9bd966f711b5586d7643a2801274e06ac37a", "Gateway": "172.17.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "172.17.0.3", "IPPrefixLen": 16, "IPv6Gateway": "", "MacAddress": "02:42:ac:11:00:03", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "967870ad658f01d3b6b0b9c881d479f1d7c456fc96682fe8baa02db2a2de59de", "EndpointID": "7953e044d3940fdbc2b4ec56134d9bd966f711b5586d7643a2801274e06ac37a", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.3", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:03", "DriverOpts": null } } } } ] 4. louis@louis-MS-7924:~$ sudo docker inspect 56d3dc91aa81 [ { "Id": "56d3dc91aa8185e0285150b4b3145eb76d3b2fdb65110ba5eb36483bec1980df", "Created": "2019-12-27T19:04:32.99035983Z", "Path": "docker-entrypoint.sh", "Args": [ "postgres" ], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 13173, "ExitCode": 0, "Error": "", "StartedAt": "2019-12-27T19:04:39.524753491Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:4a82a16ee75c9694798fc5f7aeae8eceb71658e801ca82b356694c1f1cb2cf8e", "ResolvConfPath": "/var/lib/docker/containers/56d3dc91aa8185e0285150b4b3145eb76d3b2fdb65110ba5eb36483bec1980df/resolv.conf", "HostnamePath": "/var/lib/docker/containers/56d3dc91aa8185e0285150b4b3145eb76d3b2fdb65110ba5eb36483bec1980df/hostname", "HostsPath": "/var/lib/docker/containers/56d3dc91aa8185e0285150b4b3145eb76d3b2fdb65110ba5eb36483bec1980df/hosts", "LogPath": "/var/lib/docker/containers/56d3dc91aa8185e0285150b4b3145eb76d3b2fdb65110ba5eb36483bec1980df/56d3dc91aa8185e0285150b4b3145eb76d3b2fdb65110ba5eb36483bec1980df-json.log", "Name": "/postgres", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": [ "dbdata:/var/lib/postgresql/data" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": {}, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "shareable", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/6d216252ee99a2a15390f3432a03bc61e7ff0855360595b1d9eb49afee289a50-init/diff:/var/lib/docker/overlay2/4ca59f40401c97a69e10473e004b04c5d38ebd6bf8f199d6dfa180679beca08f/diff:/var/lib/docker/overlay2/2fcc383f3f8c9936cc7ba09134c8ba1ae644f7ff43b3184f7d47adeb9f903aa1/diff:/var/lib/docker/overlay2/4be17b48f255be2a8ffbe986541149ad34fefd0975957ab43a97b078a79e84d6/diff:/var/lib/docker/overlay2/dbd826b2795e80a2b310a4d167846c83318d2dca5c5529f1ecef1add116396c6/diff:/var/lib/docker/overlay2/516fe020f49c1717782744b5a99f1f8712ab9e12b3ab1ef53eed9362f4d21a7d/diff:/var/lib/docker/overlay2/9e25436a015b7177d92ba2252d21196048122a947e47e5f9cf7e4a6e95a7b771/diff:/var/lib/docker/overlay2/1056d8a8ced55bdcf0fddbda92b76d5671690256aa30153c08808b822c478847/diff:/var/lib/docker/overlay2/9777932cf9ee62d23cdf81707b0c87bf86174e9efce738255d1ee9043bcd5f4d/diff:/var/lib/docker/overlay2/8d36b9d323d851b7b871f1cb3d3013747ace6f20642270fc274fe6c27c21c8ed/diff:/var/lib/docker/overlay2/0a904da1a09b242ff6ff9d518c954fc0affa7d5a35c78a67bd4df2e4dac4a98f/diff:/var/lib/docker/overlay2/fa5939c5dee9fd8d5814f924ba5e7e82939f166a653f0c53c63485d38c00490b/diff:/var/lib/docker/overlay2/820eed2395abdc0eed333af0d7969fc4115e43dd6c6420707897ded631ca68fd/diff:/var/lib/docker/overlay2/bdaa7cfd819b14557eb0fd13e0a15557df532b8d0599942899d51c01d0c8eeff/diff:/var/lib/docker/overlay2/4b11e24fc9dae62e9db6d9c789b4b569ae27530e9cdff75647b0a73c675cd187/diff", "MergedDir": "/var/lib/docker/overlay2/6d216252ee99a2a15390f3432a03bc61e7ff0855360595b1d9eb49afee289a50/merged", "UpperDir": "/var/lib/docker/overlay2/6d216252ee99a2a15390f3432a03bc61e7ff0855360595b1d9eb49afee289a50/diff", "WorkDir": "/var/lib/docker/overlay2/6d216252ee99a2a15390f3432a03bc61e7ff0855360595b1d9eb49afee289a50/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "volume", "Name": "dbdata", "Source": "/var/lib/docker/volumes/dbdata/_data", "Destination": "/var/lib/postgresql/data", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "56d3dc91aa81", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "5432/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "POSTGRES_PASSWORD=WaatleMoen", "PGDATA=/var/lib/postgresql/data/pgdata", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/12/bin", "GOSU_VERSION=1.11", "LANG=en_US.utf8", "PG_MAJOR=12", "PG_VERSION=12.1-1.pgdg100+1" ], "Cmd": [ "postgres" ], "ArgsEscaped": true, "Image": "postgres:latest", "Volumes": { "/var/lib/postgresql/data": {} }, "WorkingDir": "", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "df9ed28cab680b27db05ef049db09945851a9c8ee91563dc1dc15a319be9bd46", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "5432/tcp": null }, "SandboxKey": "/var/run/docker/netns/df9ed28cab68", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "7c424a0d0b6edd9b67a3ca408e7f16d93f355c8ebfd79b68ba0dcf7800f87a76", "Gateway": "172.17.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "MacAddress": "02:42:ac:11:00:02", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "967870ad658f01d3b6b0b9c881d479f1d7c456fc96682fe8baa02db2a2de59de", "EndpointID": "7c424a0d0b6edd9b67a3ca408e7f16d93f355c8ebfd79b68ba0dcf7800f87a76", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:02", "DriverOpts": null } } } } ]
Hi! On Sat, Dec 28, 2019 at 8:59 PM <fibreplay@gmail.com> wrote:
Hi Erik Thanks for reply.
1. I used the following commands.- (own password)
From the data you posted below, I think the answer is that the "myledger" container can't connect to the postgresql container: it tries to connect to the postgresql container on the 'postgres' host as it is known in the 'myledger' container. For the quick fix (just for the moment so you can try if this is the problem), you could add a line to the "/etc/hosts" file in the "myledger" container: 172.170.0.2 postgres You can copy the /etc/hosts file in and out of the container using the 'docker copy' command and edit it on the host. After copying the edited file back in, be sure to "docker stop" and "docker start" the "myledger" container so that any caching of the old /etc/hosts data is reset. Note that this isn't a long-term solution, because containers can get different IP addresses based on the order in which they're started. The longer term solution is probably the '--alias' option available in docker networking as described here: https://docs.docker.com/engine/reference/commandline/network_connect/ with it, you can add a name for the database container (e.g. 'postgres') to the "myledger" container. -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Hi Erik Thanks When I copy the hosts file back I get Error processing tar file(exit status 1): remove /etc/hosts: device or resource busy even if I am root Louis
Hi Erik I decided to start fresh and used the docker compose file rather than trying to find the exact problem. The file didnt like the network settings. I had to indent the last line then it worked. All up and running. One last question, where can I find the template csv file to upload transactions? Thanks Louis
Hi Louis, On Sun, Dec 29, 2019 at 4:20 PM <fibreplay@gmail.com> wrote:
Hi Erik I decided to start fresh and used the docker compose file rather than trying to find the exact problem. The file didnt like the network settings. I had to indent the last line then it worked.
All up and running.
Great news!
One last question, where can I find the template csv file to upload transactions?
To be honest, I found the template to be missing. However, the format is the following: 1st line are the headers, 2nd line and further are the lines of the GL you want to upload (assuming that's what you meant by "upload transactions"). The format of the numbers in the upload is the same as the configured preference for the user doing the upload. accno: the account number (in the various account selectors, this is the part appearing before the '--'; ie. '5001--Expenses' then accno is '5001') debit: functional currency amount debit on this line (formatted according to user preference) credit: functional amount credit on this line (formatted according to user preference) curr: 3-letter currency indicator for the currency on this line debit_fx: debit amount on this line in transaction currency (transaction currencies may be foreign currencies) credit_fx: credit amount on this line in transaction currency source: identifier or reference value for the transaction in the "source" system; this may be a transaction ID in your bank statement memo: comment or note specific to this line I'm sure you miss header data, like "transaction date" etc. That data is entered and submitted from the upload screen itself. If you have any more questions, don't hesitate to ask! -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Thanks Erik Upload not working for me unless there is another uploadscreen I am missing or config that I missed. I tried AP - import batch as well as the Import AP batch menu. this is my CSV file headers Name Invdate accno amount description tax paymentdate paymentaccount sundry 12/12/2019 5001 1000 phone yes 12/12/2019 1200 I get the following error. Can't locate object method "content_is_text" via package "HTTP::Headers::Fast" at lib/LedgerSMB.pm line 333.
participants (2)
-
Erik Huelsmann
-
fibreplay@gmail.com