Connect to a derby database on a network server - derby

I have an eclipse scout program with a derby database in server mode. Since now the database is on the localhost and works perfectly as it should. Now I have a little raspberry pi server in my network and I want to put the database there.
I already did the port forwarding in my router and tried to
start the derby server with
startNetworkServer -h 0.0.0.0
I also tried
startNetworkServer -h 192.168.178.10
When I try to connect to my database using ij, the following error appears:
ERROR 08001: java.net.ConnectException: Fehler beim Herstellen der Verbindung zu Server 192.168.178.10 auf Port 1.527 mit Meldung Connection refused: connect.
This is my ij command:
connect 'jdbc:derby://192.168.178.10:1527/media/usbspeicher/srv/smb_freigabe/liris/LIRIS/sampleDB;user=xxxx;password=xxxx';
So which steps are necessary for getting it work?

I finally found the mistake. You need of course run the derby server on that machine that provides the db. If you run it on a linux machine start your path after the port with a // .

Related

postgres: client could not connect to server

For clarification, please note that I have found several similar questions on stackoverflow, but I could not fix my issue.
psql: could not connect to server: Connection refused” Error when connecting to remote database
psql: How to Allow Remote Access to PostgreSQL database
I am trying to connect to a postgres DB installed in a remote server.
To create a connection from the client I am using QGIS plugin (Add PostGIS Layer):
The error that occurs is:
could not connect to server: Connection refused (0x0000274D/10061) is the server running on host "localhost" (::1) and accepting TCP/IP connection on port 5432
Additionally I added the host's IP Adress in the Host field, but then another error message occurs:
could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "hosts_ip_adress" and accepting TCP/IP connections on port 5432?
My settings are:
Postgres installed version is 10.0 with PostGIS extension
Host operating System: Windows 7
Client operating System: Windows 7
I edited pg_hba.conf to:
host all all 0.0.0.0/0 md5
and changes listen parameter in 'postgresql.conf' to:
listen_addresses = '*'
both files are located in C:\Program Files\PostgreSQL\10\data
restartet pgAdmin4
My devices are in the same network. Each one is connected via LAN cable.
I suppose that a firewall is preventing the connection?

DBVisualizer Hive SSH Tunnel Ignoring Server Information

I'm attempting to setup a connection to our Hadoop cluster via DBVisualizer.
In order to connect I need to SSH into a server on the domain and then I need to run the command to a remote server (I've not ssh'd onto the Hadoop cluster directly)
I have (figuratively)
Database Server: abcd.efg
Database Port: 12345
Database: Hello
configured for the Database section
SSH Host: hijk.efg
SSH Port: 678
When I attempt a connection, it returns
Could not open client transport with JDBC Uri:
jdbc:hive2://127.0.0.1:-----
Where 127.0.0.1 and ----- appear to be the defaults instead of what I entered.
Any idea how I get the SSH tunnel to use the server configuration I specify?
The SSH Tunnel is set up locally on the client, so connecting to the port on localhost tunnels you to the SSH Host/Port, which then sets up a connection to the database server/port you have specified. This page may help:
http://confluence.dbvis.com/display/UG100/Using+an+SSH+Tunnel
Best Regards,
Hans

Couldn't connect to server 127.0.0.1:27017 on Windows 7

I have problem with connecting to the server on mongodb:
mongo
MongoDB shell version: 3.0.1
connecting to: test
Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:179
exception: connect failed
Set up the MongoDB environment (MongoDB’s default data directory path is \data\db):
md \data\db
Start MongoDB (Assuming MongoDB is at "C:\mongodb")
C:\mongodb\bin\mongod.exe
Connect to MongoDB
C:\mongodb\bin\mongo.exe
More Details here.
Run the mongod server:
mongod --dbpath /root/hemant/mongodb_data/data/db
Once the server started listening to the port 27017.
Run the mongo.exe
You might get an error like below:
Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:179
exception: connect failed
Restart the machine, this works in my case.

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

Postgresql refusing connection to server

I have been trying to connect to my postgresql 9.3 server but I keep getting this error.
Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting TCP/IP
connections on port 5433? could not connect to server: Connection
refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1)
and accepting TCP/IP connections on port 5432?
I have tried connecting through pgadmin3 and the command line.
psql.exe -h localhost -U postgres
This command also gives the same error.
I am on a windows machine. I have tried creating a separate server also with the same result.
I have no idea whats happening. Please help.
Thanks
As the error clearly tells or asks actually, Is the server running on host "localhost"?
So the chances are, the Postgres server is not running on your machine.
You can start the service(the layman way) by going to services and starting the service.
Here is how you do it:
Open Run Window by Winkey + R
Type services.msc
Search Postgres service based on the version installed.
Click stop, start or restart the service option.
Start the server with postgres -D ['data folder']
As in docs:
http://www.postgresql.org/docs/9.1/static/server-start.html
So in my Windows postgres installation from the bin folder:
postgres.exe -D ..\data
where data is in the postgresql installation folder
I had the same issue like Venkatesh had. But in my case I had installed pgadmin in version 9. But also installed version 12 at the same time.
When I now uninstalled version 9, the port was already set in the config of version 12 and not given free.
So my solution was to change the port of version 12 in the postgresql.conf file. Or even simplier, change the port in the server creation from 5432 to 5433. Now you are able to create a server again.
I got this same error. This happened when I uninstall and re-install postgress, for some reason after second-time installation, pgadmin tries to connect to the server on port 5433 whereas the server is running on 5432.
Rightclick server properties and change the port to 5432 and try to connect again. It should work now.
Your server running on port 5432 but in the properties, the port is set to 5433.
You must go to pgAdmin, click on database version, ex: PostgresSQL 10 and edit properties.
A new window appears and you need to change the port to 5432 [this is default port].
Hope this helps.

Resources