How do I find what port my database is using?

I have successfully hosted passbolt on my local server with ssl. When I start to configure the database it claims a connection cannot be established. I believe this is due to the port I am selecting. How do I find which port sql is using on Ubuntu?

Checklist
[ x] I have read intro post: About the Installation Issues category
[ x] I have read the tutorials, help and searched for similar issues
[ x] I provide relevant information about my server (component names and versions, etc.)
[ ] I provide a copy of my logs and healthcheck
[ ] I describe the steps I have taken to trouble shoot the problem
[ x] I describe the steps on how to reproduce the issue

Hi @jack_degug try this:

 netstat -plunt

Look for the sql service.

@garrett

Thanks! After trying some different ports, it doesn’t seem to be able to establish a connection. I get “A connection could not be established with the credentials provided. Please verify the settings.”

Would the host name be the ip address of the server hosting passbolt?

@jack_degug If the db is on the same server it should be 127.0.0.1 port 3306.

@garrett

Okay… you are totally right. What happens now is that it hangs until returning a 504. Any advice on how I can fix this or what might be causing this. My firewall is completely disabled if that has anything to do with it.

Best and thanks,

Jack

@jack_degug With a 504 you are going to need to double check the Nginx config file and the “root” path. Make sure your passbolt files are readable by www-data user or they can’t be served.

The user field is set to “www-data” in the first line of my nginx.conf. I’m not 100% sure what or where I set the root path. Let me know if you can help.

Best,

Jack

@jack_degug The concern about the root path is a matter of making sure the path to Passbolt’s root file directory is accurately noted in Nginx configuration files. If you used the setup scripts you’ll be looking for the passbolt.conf file found at /etc/nginx or in a subfolder there.

See https://github.com/passbolt/passbolt_install_scripts/blob/master/conf/nginx/passbolt.conf to view the config file. You’ll notice there is a line that starts with “root” which is the directive pointing to Passbolt’s location.

If you don’t have that file and installed Nginx manually, feel free to search “nginx” in the posts here because there are examples you could use. If you get stuck just post back.

@garrett I think I’m doing more harm than good right now. I tried messing around with both the nginx.conf and passbolt.conf and no luck. I’m not really sure if I’m supposed to use the passbolt.conf in replace of the nginx one?
If it helps I will mention that I was unable to get https working with just the passbolt install scripts (only http). I then manually set up the certificate stuff with nginx which worked. Let me know if there’s any advice you have, I’m a bit confused.

@jack_degug The link I provided was to install scripts that install Nginx for you and the passbolt.conf file I showed is the file that gets installed.

If you use the install scripts then there will be a passbolt.conf file that has a root directive. Nginx.conf is an additional general/global configuration file. It’s used as well.

If it helps I will mention that I was unable to get https working with just the passbolt install scripts (only http). I then manually set up the certificate stuff with nginx which worked. Let me know if there’s any advice you have, I’m a bit confused.

I am confused what you mean. You say http works, and then you set up https and it works. Both sound great. What is not working at this point?

When I attempt to complete the Database Configuration, I get this message when using 127.0.0.1:3306, “A connection could not be established with the credentials provided. Please verify the settings.” When I use 127.0.0.1:9000 it seems to hang.

I think your previous comments about the root directory or www-data user might be the issue, but I am having difficulty with this.

My root path in the passbolt.conf is set to /var/www/passbolt … this seems accurate. I even tried changing the permissions too all on the contents of this directory.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.