Code Monkey home page Code Monkey logo

Comments (4)

YakobovLior avatar YakobovLior commented on July 29, 2024

I have done some more debugging and found that this is the issue (runnnig NGINX with debug, reading the generated core dump):

`root@b941b4d7f11d:/var/log/nginx# gdb /usr/sbin/nginx core.8446
GNU gdb (Ubuntu 8.2-0ubuntu2) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/nginx...(no debugging symbols found)...done.
[New LWP 8446]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by nginx: worker pr'. Program terminated with signal SIGSEGV, Segmentation fault. **#0 __GI___pthread_mutex_lock (mutex=0x20) at ../nptl/pthread_mutex_lock.c:65 65 ../nptl/pthread_mutex_lock.c: No such file or directory.** (gdb) backtrace full #0 __GI___pthread_mutex_lock (mutex=0x20) at ../nptl/pthread_mutex_lock.c:65 type = <optimized out> __PRETTY_FUNCTION__ = "__pthread_mutex_lock" id = <optimized out> #1 0x00007fd1f49403da in ?? () from /lib/x86_64-linux-gnu/libmysqlclient.so.20 No symbol table info available. #2 0x00007fd1f491a943 in ?? () from /lib/x86_64-linux-gnu/libmysqlclient.so.20 No symbol table info available. #3 0x00007fd1f48f2812 in mysql_real_connect () from /lib/x86_64-linux-gnu/libmysqlclient.so.20 No symbol table info available. #4 0x00007fd1f4cd1839 in pam_mysql_open_db (ctx=0x7fd1fd46e880) at pam_mysql.c:3353 err = PAM_MYSQL_ERR_SUCCESS host = 0x7fd1fd396250 "172.17.0.3" socket = 0x0 port = 0 err = <optimized out> host = <optimized out> socket = <optimized out> port = <optimized out> p = <optimized out> len = <optimized out> #5 pam_mysql_open_db (ctx=0x7fd1fd46e880) at pam_mysql.c:3294 err = <optimized out> p = <optimized out> len = <optimized out> #6 0x00007fd1f4cd6282 in pam_sm_acct_mgmt (pamh=0x7fd1fd434fe0, flags=<optimized out>, argc=<optimized out>, argv=0x7fd1fd53e250) at pam_mysql.c:5020 retval = 0 err = <optimized out> stat = 0 user = 0x7fd1fd4edb10 "liorya" rhost = 0x0 ctx = 0x7fd1fd46e880 #7 0x00007fd1fb2ccd79 in ?? () from /lib/x86_64-linux-gnu/libpam.so.0 No symbol table info available. #8 0x00007fd1fb2cc560 in pam_acct_mgmt () from /lib/x86_64-linux-gnu/libpam.so.0 No symbol table info available. #9 0x00007fd1fbd3680f in ?? () from /usr/share/nginx/modules/ngx_http_auth_pam_module.so No symbol table info available. #10 0x00007fd1fbdcab14 in ngx_http_core_access_phase () No symbol table info available. #11 0x00007fd1fbdc644d in ngx_http_core_run_phases () No symbol table info available. #12 0x00007fd1fbdd25c0 in ?? () No symbol table info available. #13 0x00007fd1fbdd2a36 in ?? () No symbol table info available. #14 0x00007fd1fbdb8568 in ?? () No symbol table info available. #15 0x00007fd1fbdace8a in ngx_process_events_and_timers () No symbol table info available. #16 0x00007fd1fbdb6395 in ?? () No symbol table info available. --Type <RET> for more, q to quit, c to continue without paging-- #17 0x00007fd1fbdb484d in ngx_spawn_process () No symbol table info available. #18 0x00007fd1fbdb7952 in ngx_master_process_cycle () No symbol table info available. #19 0x00007fd1fbd8a329 in main () No symbol table info available.
Note - NGINX running on ubuntu:19.04 container
Any ideas please?
Thanks,
Lior

from pam-mysql.

NigelCunningham avatar NigelCunningham commented on July 29, 2024

Sorry for the delay in responding. It looks like it is failing to connect to the database, and I see "port = 0" in the log. Any chance that's the issue (port is usually 3306).

from pam-mysql.

YakobovLior avatar YakobovLior commented on July 29, 2024

Hey Nigel,
I've managed to solve the issue on my own but I'll note in case it will help anyone else.
My issue was that the NGINX and MySQL were on diffrenet containers, therefore I had to make sure I create appropriate connections in the MySQL server (rather than having the default 'root@localhost').
Once I've created a new user with permissions for the relevant database and allowed connection from any host ('%') the issue was resolved.
Thanks,
Lior

from pam-mysql.

NigelCunningham avatar NigelCunningham commented on July 29, 2024

Thanks.

from pam-mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.