Can't Connect ClickHouse With JDBC Driver Using DBeaver - jdbc

I want to connect clickhouse with jdbc driver using DBeaver. My driver settings are:
Driver Name: clickhouse
Class Name: ru.yandex.clickhouse.ClickHouseDriver
URL Template: jdbc:clickhouse://{host}:{port}
When I test the connection, it throws me an exception like this:
ru.yandex.clickhouse.except.ClickHouseUnknownException: ClickHouse exception, code: 1002, host: xxx, port: 8123; error while read response Magic is not correct: 112
Where I'm wrong?

My DBeaver version was old, I updated my version and its solved.

Related

Oracle database connection via Codeingniter 4

Hi I have a Oracle database installed locally on my laptop. I'd like to connect to it via Codeigniter 4. Since version 4.2.0 it is able to do so.
https://codeigniter4.github.io/CodeIgniter4/changelogs/v4.2.0.html
All my database credentials are in the .env file, but I'm unable to establish connection. I'm new to Oracle.
I can connect to my database via Oracle SQL Developer.
The data I use for the connection:
host: localhost
port: 1521
user: system
password: MYPASSWORD
service name: orcl
How can I use that in my .env file?
This is what I have so far:
database.default.hostname = localhost
database.default.database =
database.default.username = system
database.default.password = MYPASSWORD
database.default.DBDriver = oci8
database.default.DBPrefix =
database.default.port = 1521
I get this error:
Unable to connect to the database.
Main connection [oci8]: oci_connect(): ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
(.env file)
Try using:
database.default.hostname = '127.0.0.1:1521/orcl'
Where:
'127.0.0.1:1521/orcl', // hostname:db_port/service_name

Connect NiFi to Oracle 11g

I have no problem to connect Oracle 11g with Oracle SQL Developer with configuration below:
Username: orc
Password: PAP
Connection Type: Basic
Hostname: connect.gogo.com
Port: 1528
Service name: svcname
In NIFI, any idea how should I put the value for the Database Connection URL?
Database Connection URL:
Database Driver Class Name: oracle.jdbc.driver.OracleDriver
Database Driver Location: /opt/nifi/jdbc/ojdbc8.jar
Thanks,
Kenny
you can add a DBCPConnectionPool under Controller Service like this
Database Connection URL: jdbc:oracle:thin:#connect.gogo.com:1528/svcname
more information here
https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html
or you could use tnsnames.ora file syntax in url like this:
Database Connection URL: jdbc:oracle:thin:#(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL=TCP)(HOST=connect.gogo.com)(PORT=1528)))(CONNECT_DATA=...))

SQL*Plus connection SetUp: ORA-12154 Error

Sorry for the noob question but I am new to Oracle SQL software.
I've been trying to create a connection to my database student (created on SQL Developer), but got quite confusing since I'm using a client-computer which will connect to server.
Below are the info about the connection:
Connection Name: LARGER123
Username: LARGER123
Hostname: uxkg265.admin.plent
Port: 1520
SID: ticp5076
Client-computer username: r5678
When I open the SQL Plus prompt, I tried several combinations on the username in order to establish the connection, but got the same error ORA-12154 Error.
I though that it could be the way I was setting the things on username field, so I followed the instructions from Oracle's website:
https://docs.oracle.com/database/121/ADMQS/GUID-1A15D322-B3AC-426A-86A1-EB7590930687.htm#ADMQS045
Basically it tells to "build" the username structure in that way:
nick#"dbhost.example.com/orcl.example.com"
Where: "nick" is the user; "dbhost.example.com" is the host; and "orcl.example.com" is the database.
So, following the example I put my username in that way and got errors:
LARGER123#"uxkg265.admin.plent/student"
I tried different ways, including the Port and SID but got no success.
Do you have a better idea of what's my mistake?
Are you quite certain somebody is listening where you are trying to connect. I would suggest you start by testing with telnet.
You say your server has the domain name “uxkg265.admin.plent”
nslookup uxkg265.admin.plent
I just checked my IP address and found:
$ nslookup $(hostname)
Server: xxx.xxx.xxx.xxx
Address: xxx.xxx.xxx.xx##53
Name: mydomain.myorg.com
Address: 192.168.56.1
I just tried to connect to my oracle instance and got:
$ telnet 192.168.56.1 1521
Trying 192.168.56.1...
Connected to 192.168.56.1
Escape character is '^]'.
^]
telnet> quit
Connection closed.
If I try to the wrong port, I get:
$ telnet 192.168.56.1 1522
Trying 192.168.56.1...
telnet: connect to address 192.168.56.1: Connection refused
I was able to connect with:
sqlplus myoracle/testpass#192.168.56.1:1521/UPGR
where UPGR is the service name.
I was also able to connect with:
sqlplus myoracle/testpass#"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.1)(PORT=1521))(CONNECT_DATA=(SID=UPGR)))"
With UPGR as the SID.
I had some trouble initially because my version of Oracle Linux had iptables enabled and that was keeping me from connecting using sqlplus. As soon as I disabled this protection, I was able to use Oracle.
sudo service iptables stop
sudo chkconfig iptables off
(Keep in mind that iptables serves a purpose. For my test system running on my PC in VirtualBox, turning it off is fine. For other systems, maybe not.)
ORA-12154 is TNS:could not resolve the connect identifier specified, but you likely aren't using TNS to resolve the connect identifier: have you edited the tnsnames.ora file on the client machine and created an entry for the SID you're trying to connect to? Probably not.
Instead of selecting SID, select "Service name" and put the Oracle SID there. With the "Basic" connection type, that should use the host/port and service name explicitly to build the connection rather than relying on TNS to look up (resolve) the SID.

Windows 8.1 MongoDB 27017 errno: 10061 "Connection couldnt be made Target machine actively refuses it"

Full list of error:
C:\Program Files\MongoDB\Server\3.0\bin>mongo.exe
MongoDB shell version: 3.0.6
connecting to: test
2015-10-25T11:26:55.350+0200 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2015-10-25T11:26:55.353+0200 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Service is running fine:
C:\Program Files\mongodb\Server\3.0\bin\mongod.exe --service --config D:\Documents\Work\mongodb\mongod.cfg
I saw already solutions here but nothing helped
netstat.exe -0 and netstat.exe -any dosen't show 27017 port as used by some App or process.
I have this mongod.cfg file
systemLog:
destination: file
path: D:\Documents\Work\mongodb\log\mongod.log
storage:
dbPath: D:\Documents\Work\mongodb\db
net:
bindIp: 127.0.0.1
port: 28018
But MongoDB still connects to same 27017 port
What i have missed?
The client does not know that you want to connect to a server on a non-default port.
Connect using the --port parameter:
mongo.exe --port 28018
Or just let the server listen on the default port.
Execute the following steps:
Go to control panel
Click program and features
Select mongodb
Right click
Repair it
Open your shell(cmd)
Type _ "C:\Program Files\MongoDB\Server\4.0\bin\mongo.exe"
Enter
Done

Postgres: Unable to connect to domain socket

Running psql gets me this:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I installed Postgres 9.3.3 using Homebrew.
which psql gives /usr/local/bin/psql
This seems to be a common issue. I'm terribly sorry to ask again, but I've gone through at least a dozen Q&As here and can't resolve the issue. A few posts I've gone through include:
Why am I getting a could not connect to server error for postgres in Mac OS Lion?
Postgres cannot connect to server on Unix domain socket 5432
Can not connect to local PostgreSQL
Many thanks,
Justin
Have you modified postgresql.conf to accept incoming TCP/IP connections? You should uncomment the listen_addresses parameter and set it to an appropriate subnet mask. Then in pg_hba.conf you have to add a line to enable connections to databases over TCP/IP. Both configuration files are in your data directory (don't know where that is on OSX).

Resources