Access denied using client

Friday, 20 October 2023 · 7 messages · last reply 21 Oct 2023
CF
Csaba Fekete20 Oct 2023 21:40 #
Hello, A total newbie here, I'm a first time user. I have installed basex on Ubuntu and I'm running the server attached to 127.0.0.1, on port 1984. It looks like this is working and the server is listening. Now I create a password for admin: basex@cac5ba21e248:/opt/basex/bin$ ./basex BaseX 10.8 beta [Standalone] Try 'help' to get more information.
Quoted text · 1 line
> PASSWORD xxx
Password of user 'admin' changed. Now I'm trying to connect using the client: basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 -Uadmin -Pxxx Access denied: admin. The server log confirms the same: basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log 18:51:30.575 SERVER admin OK Server was started (port: 1984). 18:51:42.316 172.22.0.1:41314 admin ERROR Access denied: admin. 30.7 ms 18:53:04.079 172.22.0.1:59892 admin ERROR Access denied: admin. 23.59 ms What am I missing? Thanks and regards PS. I'm doing this inside a docker container if that matters.
CG
Christian Grün20 Oct 2023 21:56 #
Szia Csaba, Thanks for your observation. You may need to set the password first, and start the server after that. Does this help? Christian
Quoted text · Csaba Fekete · 35 lines
Csaba Fekete <feketecsaba at gmail.com> schrieb am Fr., 20. Okt. 2023, 21:40: > Hello, > > A total newbie here, I'm a first time user. > I have installed basex on Ubuntu and I'm running the server attached to > 127.0.0.1, on port 1984. It looks like this is working and the server is > listening. > Now I create a password for admin: > > basex@cac5ba21e248:/opt/basex/bin$ ./basex > BaseX 10.8 beta [Standalone] > Try 'help' to get more information. > > PASSWORD xxx > Password of user 'admin' changed. > > Now I'm trying to connect using the client: > > basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 > -Uadmin -Pxxx > Access denied: admin. > > The server log confirms the same: > > basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log > 18:51:30.575 SERVER admin OK Server was started (port: 1984). > 18:51:42.316 172.22.0.1:41314 admin ERROR Access denied: admin. 30.7 ms > 18:53:04.079 172.22.0.1:59892 admin ERROR Access denied: admin. 23.59 ms > > What am I missing? > Thanks and regards > > PS. I'm doing this inside a docker container if that matters. > > >
CF
Csaba Fekete20 Oct 2023 22:04 #
Szia Christian :-) Yeah, I've tried restarting the server. And this time I tried running the server as root and now it works fine! So it looks like the problem was that I had created a non-root user (basex) to run the server (I thought it would be safer when this gets deployed to a real server later). Many thanks for your help! Csaba
Quoted text · Christian Grün · 48 lines
On Fri, 20 Oct 2023 at 21:56, Christian Grün <christian.gruen at gmail.com> wrote: > Szia Csaba, > > Thanks for your observation. You may need to set the password first, and > start the server after that. > > Does this help? > Christian > > > > Csaba Fekete <feketecsaba at gmail.com> schrieb am Fr., 20. Okt. 2023, 21:40: > >> Hello, >> >> A total newbie here, I'm a first time user. >> I have installed basex on Ubuntu and I'm running the server attached to >> 127.0.0.1, on port 1984. It looks like this is working and the server is >> listening. >> Now I create a password for admin: >> >> basex@cac5ba21e248:/opt/basex/bin$ ./basex >> BaseX 10.8 beta [Standalone] >> Try 'help' to get more information. >> > PASSWORD xxx >> Password of user 'admin' changed. >> >> Now I'm trying to connect using the client: >> >> basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 >> -Uadmin -Pxxx >> Access denied: admin. >> >> The server log confirms the same: >> >> basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log >> 18:51:30.575 SERVER admin OK Server was started (port: 1984). >> 18:51:42.316 172.22.0.1:41314 admin ERROR Access denied: admin. 30.7 ms >> 18:53:04.079 172.22.0.1:59892 admin ERROR Access denied: admin. 23.59 ms >> >> What am I missing? >> Thanks and regards >> >> PS. I'm doing this inside a docker container if that matters. >> >> >>
CF
Csaba Fekete20 Oct 2023 22:15 #
Sorry, please ignore, it still doesn't work. It works on my local machine, but not in the Docker container. It looks like my Dockerfile is not quite right yet. I'll keep trying. Thanks anyway.
Quoted text · Csaba Fekete · 60 lines
On Fri, 20 Oct 2023 at 22:04, Csaba Fekete <feketecsaba at gmail.com> wrote: > Szia Christian :-) > Yeah, I've tried restarting the server. > And this time I tried running the server as root and now it works fine! So > it looks like the problem was that I had created a non-root user (basex) to > run the server (I thought it would be safer when this gets deployed to a > real server later). > Many thanks for your help! > Csaba > > On Fri, 20 Oct 2023 at 21:56, Christian Grün <christian.gruen at gmail.com> > wrote: > >> Szia Csaba, >> >> Thanks for your observation. You may need to set the password first, and >> start the server after that. >> >> Does this help? >> Christian >> >> >> >> Csaba Fekete <feketecsaba at gmail.com> schrieb am Fr., 20. Okt. 2023, >> 21:40: >> >>> Hello, >>> >>> A total newbie here, I'm a first time user. >>> I have installed basex on Ubuntu and I'm running the server attached to >>> 127.0.0.1, on port 1984. It looks like this is working and the server is >>> listening. >>> Now I create a password for admin: >>> >>> basex@cac5ba21e248:/opt/basex/bin$ ./basex >>> BaseX 10.8 beta [Standalone] >>> Try 'help' to get more information. >>> > PASSWORD xxx >>> Password of user 'admin' changed. >>> >>> Now I'm trying to connect using the client: >>> >>> basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 >>> -Uadmin -Pxxx >>> Access denied: admin. >>> >>> The server log confirms the same: >>> >>> basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log >>> 18:51:30.575 SERVER admin OK Server was started (port: 1984). >>> 18:51:42.316 172.22.0.1:41314 admin ERROR Access denied: admin. 30.7 ms >>> 18:53:04.079 172.22.0.1:59892 admin ERROR Access denied: admin. 23.59 ms >>> >>> What am I missing? >>> Thanks and regards >>> >>> PS. I'm doing this inside a docker container if that matters. >>> >>> >>>
MS
Michael Seiferle20 Oct 2023 23:35 #
Hey Csaba, Feel free to post your Dockerfile, I’ll have a look at it tomorrow :-) Maybe I’ll spot something :-) Best Michael Von meinem iPhone gesendet
Quoted text · Csaba Fekete · 1 line
Am 20.10.2023 um 22:15 schrieb Csaba Fekete <feketecsaba at gmail.com>:
 Sorry, please ignore, it still doesn't work. It works on my local machine, but not in the Docker container. It looks like my Dockerfile is not quite right yet. I'll keep trying. Thanks anyway.
Quoted text · Csaba Fekete · 1 line
On Fri, 20 Oct 2023 at 22:04, Csaba Fekete <feketecsaba at gmail.com<mailto:feketecsaba at gmail.com>> wrote:
Szia Christian :-) Yeah, I've tried restarting the server. And this time I tried running the server as root and now it works fine! So it looks like the problem was that I had created a non-root user (basex) to run the server (I thought it would be safer when this gets deployed to a real server later). Many thanks for your help! Csaba
Quoted text · Christian Grün · 1 line
On Fri, 20 Oct 2023 at 21:56, Christian Grün <christian.gruen at gmail.com<mailto:christian.gruen at gmail.com>> wrote:
Szia Csaba, Thanks for your observation. You may need to set the password first, and start the server after that. Does this help? Christian
Quoted text · Csaba Fekete · 1 line
Csaba Fekete <feketecsaba at gmail.com<mailto:feketecsaba at gmail.com>> schrieb am Fr., 20. Okt. 2023, 21:40:
Hello, A total newbie here, I'm a first time user. I have installed basex on Ubuntu and I'm running the server attached to 127.0.0.1, on port 1984. It looks like this is working and the server is listening. Now I create a password for admin: basex@cac5ba21e248:/opt/basex/bin$ ./basex BaseX 10.8 beta [Standalone] Try 'help' to get more information.
Quoted text · Csaba Fekete · 1 line
> PASSWORD xxx
Password of user 'admin' changed. Now I'm trying to connect using the client: basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 -Uadmin -Pxxx Access denied: admin. The server log confirms the same: basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log 18:51:30.575 SERVER admin OK Server was started (port: 1984). 18:51:42.316 172.22.0.1:41314<http://172.22.0.1:41314> admin ERROR Access denied: admin. 30.7 ms 18:53:04.079 172.22.0.1:59892<http://172.22.0.1:59892> admin ERROR Access denied: admin. 23.59 ms What am I missing? Thanks and regards PS. I'm doing this inside a docker container if that matters.
CF
Csaba Fekete21 Oct 2023 08:08 #
Hi Michael I was about to send the Dockerfile to you when I realized what the problem was! I did not attach a volume to the container. For this reason, whenever I restarted the container, data - along with the new password I guess - was lost. Adding this to docker-compose.yml solved it: volumes: - "./docker/basex/data:/opt/basex/data" Thank you guys! Cheers
Quoted text · Michael Seiferle · 82 lines
On Fri, 20 Oct 2023 at 23:35, Michael Seiferle <ms at basex.org> wrote: > Hey Csaba, > > Feel free to post your Dockerfile, I’ll have a look at it tomorrow :-) > Maybe I’ll spot something :-) > > Best > Michael > > Von meinem iPhone gesendet > > Am 20.10.2023 um 22:15 schrieb Csaba Fekete <feketecsaba at gmail.com>: > >  > Sorry, please ignore, it still doesn't work. > It works on my local machine, but not in the Docker container. > It looks like my Dockerfile is not quite right yet. > I'll keep trying. Thanks anyway. > > > On Fri, 20 Oct 2023 at 22:04, Csaba Fekete <feketecsaba at gmail.com> wrote: > >> Szia Christian :-) >> Yeah, I've tried restarting the server. >> And this time I tried running the server as root and now it works fine! >> So it looks like the problem was that I had created a non-root user (basex) >> to run the server (I thought it would be safer when this gets deployed to a >> real server later). >> Many thanks for your help! >> Csaba >> >> On Fri, 20 Oct 2023 at 21:56, Christian Grün <christian.gruen at gmail.com> >> wrote: >> >>> Szia Csaba, >>> >>> Thanks for your observation. You may need to set the password first, and >>> start the server after that. >>> >>> Does this help? >>> Christian >>> >>> >>> >>> Csaba Fekete <feketecsaba at gmail.com> schrieb am Fr., 20. Okt. 2023, >>> 21:40: >>> >>>> Hello, >>>> >>>> A total newbie here, I'm a first time user. >>>> I have installed basex on Ubuntu and I'm running the server attached to >>>> 127.0.0.1, on port 1984. It looks like this is working and the server is >>>> listening. >>>> Now I create a password for admin: >>>> >>>> basex@cac5ba21e248:/opt/basex/bin$ ./basex >>>> BaseX 10.8 beta [Standalone] >>>> Try 'help' to get more information. >>>> > PASSWORD xxx >>>> Password of user 'admin' changed. >>>> >>>> Now I'm trying to connect using the client: >>>> >>>> basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 >>>> -Uadmin -Pxxx >>>> Access denied: admin. >>>> >>>> The server log confirms the same: >>>> >>>> basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log >>>> 18:51:30.575 SERVER admin OK Server was started (port: 1984). >>>> 18:51:42.316 172.22.0.1:41314 admin ERROR Access denied: admin. 30.7 ms >>>> 18:53:04.079 172.22.0.1:59892 admin ERROR Access denied: admin. 23.59 >>>> ms >>>> >>>> What am I missing? >>>> Thanks and regards >>>> >>>> PS. I'm doing this inside a docker container if that matters. >>>> >>>> >>>>
MS
Michael Seiferle21 Oct 2023 08:42 #
Hey Csaba, good to hear that :-) Have a nice weekend, Michael Von meinem iPhone gesendet
Quoted text · Csaba Fekete · 1 line
Am 21.10.2023 um 08:09 schrieb Csaba Fekete <feketecsaba at gmail.com>:
 Hi Michael I was about to send the Dockerfile to you when I realized what the problem was! I did not attach a volume to the container. For this reason, whenever I restarted the container, data - along with the new password I guess - was lost. Adding this to docker-compose.yml solved it: volumes: - "./docker/basex/data:/opt/basex/data" Thank you guys! Cheers
Quoted text · Michael Seiferle · 1 line
On Fri, 20 Oct 2023 at 23:35, Michael Seiferle <ms at basex.org<mailto:ms at basex.org>> wrote:
Hey Csaba, Feel free to post your Dockerfile, I’ll have a look at it tomorrow :-) Maybe I’ll spot something :-) Best Michael Von meinem iPhone gesendet Am 20.10.2023 um 22:15 schrieb Csaba Fekete <feketecsaba at gmail.com<mailto:feketecsaba at gmail.com>>:  Sorry, please ignore, it still doesn't work. It works on my local machine, but not in the Docker container. It looks like my Dockerfile is not quite right yet. I'll keep trying. Thanks anyway.
Quoted text · Csaba Fekete · 1 line
On Fri, 20 Oct 2023 at 22:04, Csaba Fekete <feketecsaba at gmail.com<mailto:feketecsaba at gmail.com>> wrote:
Szia Christian :-) Yeah, I've tried restarting the server. And this time I tried running the server as root and now it works fine! So it looks like the problem was that I had created a non-root user (basex) to run the server (I thought it would be safer when this gets deployed to a real server later). Many thanks for your help! Csaba
Quoted text · Christian Grün · 1 line
On Fri, 20 Oct 2023 at 21:56, Christian Grün <christian.gruen at gmail.com<mailto:christian.gruen at gmail.com>> wrote:
Szia Csaba, Thanks for your observation. You may need to set the password first, and start the server after that. Does this help? Christian
Quoted text · Csaba Fekete · 1 line
Csaba Fekete <feketecsaba at gmail.com<mailto:feketecsaba at gmail.com>> schrieb am Fr., 20. Okt. 2023, 21:40:
Hello, A total newbie here, I'm a first time user. I have installed basex on Ubuntu and I'm running the server attached to 127.0.0.1, on port 1984. It looks like this is working and the server is listening. Now I create a password for admin: basex@cac5ba21e248:/opt/basex/bin$ ./basex BaseX 10.8 beta [Standalone] Try 'help' to get more information.
Quoted text · Csaba Fekete · 1 line
> PASSWORD xxx
Password of user 'admin' changed. Now I'm trying to connect using the client: basex@cac5ba21e248:/opt/basex/bin$ ./basexclient -n127.0.0.1 -p1984 -Uadmin -Pxxx Access denied: admin. The server log confirms the same: basex@cac5ba21e248:~/basex/.logs$ cat 2023-10-20.log 18:51:30.575 SERVER admin OK Server was started (port: 1984). 18:51:42.316 172.22.0.1:41314<http://172.22.0.1:41314> admin ERROR Access denied: admin. 30.7 ms 18:53:04.079 172.22.0.1:59892<http://172.22.0.1:59892> admin ERROR Access denied: admin. 23.59 ms What am I missing? Thanks and regards PS. I'm doing this inside a docker container if that matters.

⚡Generated with XQuery