Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR 2002 (HY000): Can't connect to local MySQL server #5

Open
tomarovsky opened this issue Nov 18, 2022 · 0 comments
Open

ERROR 2002 (HY000): Can't connect to local MySQL server #5

tomarovsky opened this issue Nov 18, 2022 · 0 comments

Comments

@tomarovsky
Copy link

tomarovsky commented Nov 18, 2022

Hello,

I'm trying to run d-Structman on a compute server. The installation via Docker goes through without any problems, but I get the following error on startup:

$ docker exec -it test structman -i structman/input_data/10_proteins_few_hits.smlf
Using structman_data from : /usr/structman_library/sources/structman/lib
Using 79 core(s), verbosity level: 1
Using following config file: /structman/resources/config.txt
Processing file:  /structman/input_data/10_proteins_few_hits.smlf
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/structman/lib/database/database.py", line 930, in getSessionId
    cursor.execute(sql)
AttributeError: 'NoneType' object has no attribute 'execute'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/structman", line 8, in <module>
    sys.exit(structman_cli())
  File "/usr/local/lib/python3.8/dist-packages/structman/structman_main.py", line 1155, in structman_cli
    main(infiles, outfolder, config)
  File "/usr/local/lib/python3.8/dist-packages/structman/structman_main.py", line 490, in main
    session_id = database.getSessionId(infile, config)
  File "/usr/local/lib/python3.8/dist-packages/structman/lib/database/database.py", line 934, in getSessionId
    raise NameError("Error in getSessionId: %s" % sql)
NameError: Error in getSessionId: SELECT Session_Id FROM Session WHERE Input_File = '/structman/input_data/10_proteins_few_hits.smlf' AND Checksum = 982454239;

Also, I tried to perform a simple run as suggested in the tutorial, but got an error as well:

$ sudo docker exec -it test structman -i Q9Q288
Using structman_data from : /usr/structman_library/sources/structman/lib
Using 79 core(s), verbosity level: 1
Using following config file: /structman/resources/config.txt
Traceback (most recent call last):
  File "/usr/local/bin/structman", line 8, in <module>
    sys.exit(structman_cli())
  File "/usr/local/lib/python3.8/dist-packages/structman/structman_main.py", line 1155, in structman_cli
    main(infiles, outfolder, config)
  File "/usr/local/lib/python3.8/dist-packages/structman/structman_main.py", line 506, in main
    if session_id is None:
UnboundLocalError: local variable 'session_id' referenced before assignment

I checked the container logs (docker-compose.logs) and found the following error (lines 137 and 274):

test  | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I guess the error is caused by incorrect work of mysql-server and I tried to fix it using the suggested solutions (https://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run), but it didn't help. I also tried to perform an installation using a Singularity container, but found the same problem.

Specification of my machine:
Operating System: Rocky Linux 8.5 (Green Obsidian)
Kernel: Linux 4.18.0-348.12.2.el8_5.x86_64
Architecture: x86-64
Docker version 20.10.12, build e91ed57

Do you know what the problem could be? Could you help me with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant