I'm a macOS user and I got weird errors just to create a database with firebird. I saw that there are some dock containers with firebird that run just fine ( i was able to create databases, perform queries and so on) but when I tried to connect from my local ISQL or razorSQL client ( through JDBC), I get some weird errors like "unavailable database" or "can't open file"
I'm also not sure how ISQL CONNECT string really works because every site I saw there is a different one.
I got this docker image: ( https://hub.docker.com/r/jacobalberty/firebird/)
I created my container like this:
docker run -d --name firebird -p 3050:3050 -v /data/firebird/databases:/databases jacobalberty/firebird:2.5-ss
my docker-machine IP is:
192.168.99.100
I tried to connect like this:
CONNECT '0.0.0.0:3050://databases/test.fdb' user 'SYSDBA' password 'masterkey';
unavailable database
And also like this:
CONNECT '192.168.99.100:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
connection rejected by remote interface
CONNECT '192.168.99.100:3050:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
Statement failed, SQLSTATE = 08001
unavailable database
When i enter the docker container, the file is there:
root#e4212b9f9d16:/databases# pwd
/databases
root#e4212b9f9d16:/databases# ls
test.fdb
Also, I'm not sure how to check if the firebird server is running ( i guess it is cause I can 'connect' to a database inside the container'.. but the docker container is definally up and running - did a successful telnet on the ip and port)
I also tried to use the container IP (172.17.0.2) but i got a timeout
Im most familiar with mysql and SQLite never touched a firebird db before and as the user got this DB, i have to mock it, develop an app using fake data and then connect it to the real firebird (so changing the DB is not an option)
So, the standard documentation about 'create your firebird server' don't mention but you on firebird.conf, the variable RemoteBindAddress must be empty
File:
/etc/firebird/2.5/firebird.conf
Lines changed:
RemoteBindAddress =
#RemoteBindAddress = localhost
Thanks for all the
Most of your problems are your connection string, it should be <host>/<port>:<database-path-or-alias>, where leaving of /<port> will default to port 3050.
This accounts for all your problems except for
CONNECT '192.168.99.100:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
connection rejected by remote interface
As that connection string is a valid one.
This error means that you were able to connect to the server, but the connection was rejected. This might - for example - happen when you use Firebird 3, but connect using a Firebird 2.5 ISQL/fbclient library, and haven't relaxed the security settings of Firebird 3 (see Legacy Authentication in the Firebird 3 release notes).
In order to find out if the server is running, use:
docker ps
In order to figure out if the server actually started, or errored out upon start, start the container without the -d and look at the log messages when it runs:
docker run --name firebird -p 3050:3050 -v /data/firebird/databases:/databases jacobalberty/firebird:2.5-ss
Related
I have installed the image ibmcom/db2 on docker running on local Docker Desktop in my Mac. The DB2 instance is up and running.
DB2 instance in Docker
But when I am trying to connect the DB2 server from DBeaver running in local I am getting following error message.
DBeaver error message
I know this problem has been solved in this post. However I am still not able to connect the database by following the suggestions given here, e.g. providing userid:password combination. Should I use this combination in user id field or password field, any idea?
I created the 3 necessary containers for NuoDB using the NuoDB instructions.
My Docker environment runs on a virtual Ubuntu Linux environment (VMware).
Afterwards I tried to access the database using a console application (C# .Net Framework 4.8) and the Ado.Net technology. For this I used the Nuget "NuoDb.Data.Client" from Nuget.org.
Unfortunately the connection does not work.
If I choose port 8888, my thread disappears to infinity when I open the connection.
For this reason I tried to open the port 48004 to get to the admin container.
On this way I get an error message.
"System.IO.IOException: A connection attempt failed because the remote peer did not respond properly after a certain period of time, or the established connection was faulty because the connected host did not respond 172.18.0.4:48006, 172.18.0.4"
Interestingly, if I specify a wrong database name, it throws an error:
No suitable transaction engine found for database.
This tells me that it connects to the admin container.
Does anyone have any idea what I am doing wrong?
The connection works when I establish a connection with the tool "dbvisualizer".
This tool accesses the transaction engine directly. For this reason I have opened the port 48006 in the corresponding container.
But even with these settings it does not work with my console application.
Thanks in advance.
Port 8888 is the REST port that you would use from the administration tool such as nuocmd: it allows you to start/stop engines and perform other administrative commands. You would not use this port for SQL clients (as you discovered). The correct port to use for SQL clients is 48004.
Port 48004 allows a SQL client to connect to a "load balancer" facility that will redirect it to one of the running TEs. It's not the case that the SQL traffic is routed through this load balancer: instead, the load balancer replies to the client with the address/port of one of the TEs then the client will disconnect from the load balancer and re-connect directly to the TE at that address/port. For this reason, all the ports that TEs are listening on must also be open to the client, not just 48004.
You did suggest you opened these ports but it's not clear from your post whether you followed all the instructions on the doc page you listed. In particular, were you able to connect to the database using the nuosql command line tool as described here? I strongly recommend that you ensure that simple access like this works correctly, before you attempt to try more sophisticated client access such as using Ado.Net.
On my Windows 10 host machine I am able to connect to a private SQL Server RDS instance running in AWS. However, a Docker container running locally on the same machine is unable to connect with the same connection string.
From the Docker container I am able to telnet to the server on 1433 successfully. However, when I connect from code, it seems to be unable to create a connection. No exception is thrown, but this code hangs:
using (var conn = new SqlConnection(connectionString)){
// Do something
}
I am able to successfully connect to SQL Server when it is running on a EC2 instance. It appears to be specific to RDS.
Fails with both the name and IP address.
This was caused by a bug in SQLClient as described on GitHub. There were two fixes that worked:
Downgrade the project from Net Core 3.1 to 2.2
Update Docker file to use aspnet:3.1-bionic instead of aspnet:3.1-buster-slim and sdk:3.1-bionic instead of sdk:3.1-buster
I'm brand new to containers and am trying to set up a MediaWiki on a Synology NAS. The Synology comes with a package for MediaWiki but it is at 1.30 and they haven't updated in a year. I need a newer version so i can use LDAP with latest extensions.
So, i found this step-by-step guide on how to install the containers with docker. I'm trying it with MediaWiki 1.34.0 and it works fine up to the point that we test connection to the mysql database - 5) Input your MySQL container name and its root password.
When i click Continue i get this error: Cannot access the database: :real_connect(): (HY000/2054): The server requested authentication method unknown to the client. Check the host, username and password and try again. If using "localhost" as the database host, try using "127.0.0.1" instead (or vice versa).
It seems to be that the mediawiki container and the mediawiki-mysql containers aren't networked. I'm looking under network and it shows the following, so they should be able to communicate. I can ping a 172.26.0.2 and 172.26.0.3 address but can't figure how to get past step 5) in that go-by.
I've tried everything i can think of. Using older versions of MediaWiki (e.g. 1.31) and mysql but this connection problem is the sticking point each time. I've reached limit of my capabilities here.
It seems to be that the mediawiki container and the mediawiki-mysql containers aren't networked
Would be interesting where this assumption is coming from. From what I read from the error message, your containers can perfectly fine communicate to each other (they should, as they seem to be on the same network, given that the mediawiki-mysql container is also on a bridged network and in the same subnet).
Let's take a look at the interesting part of the error message:
The server requested authentication method unknown to the client
That looks, to me, as a misconfiguration of mysql. I assume you're using the latest version of the mysql docker container, which should be some version of mysql 8. If you now google for this, you'll find plenty of posts even on stackoverflow, like:
https://stackoverflow.com/a/53881212/3394281
php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
To fix this with your current dataset, you could change the authentication plugin from socket to password:
Log in as root to mysql
Run this sql command:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password
BY 'password';
Replace 'password' with your root password. In case your application does not log in to your database with the root user, replace the 'root' user in the above command with the user that your application uses.
Or, if you're using docker-compose or can change the executed command somehow else, you could follow this answer:
Add the following line to the command:
--default-authentication-plugin=mysql_native_password
Florian's answer put me on the right trail even though it didn't work as he initially suggested (I'm marking his as correct answer). I changed the root plugin (his item 2. above) but still did not work. So, I did the same on all of the users shown with the SELECT user, authentication_string,plugin,host FROM mysql.user;.
After, that i ran a FLUSH PRIVILEGES; and then was able to complete the MediaWiki 1.34.0 installation (via http://xxx.xxx.xxx.xxx:8080).
I suspect that all i really needed to do was run that ALTER USER on the two root accounts (root#localhost and root#%) but it is working now so i'm leaving it as-is. Here is a good link that will help with these commands.
I am just getting started with Neo4j and when I try to run a command that connects to the database I get an error. For example, if I try to run the first CREATE command from the sample movie database, or if I run CALL dbms.procedures().
The error is as follows: BoltConnectionError: No connection found, did you connect to Neo4j?
In the left panel of the browser page, under the 'Connected As' heading, it has my username and role (Admin). FYI, I followed the setup procedure from Larave's Homestead to install Neo4j in the first instance. On my first visit to the URL (port 7474), it asked for (and accepted) my username and password.
Additional Info:
Neo4j database is version 3.3.5 and runs on a Ubuntu VM
Neo4j browser is ver 3.1.7 and runs on the mac host
When I run :server connect it tells me I am connected via bolt://mydomain:7687
When I run lsof -i :7474 on the Ubuntu machine it tells me that Java is listening to the port, and that user is neo4j
First
:server disconnect
And then connect again
:server connect
If it doesn't work, change your browser.