How to connect laravel with Firebird database? [duplicate] - laravel

I'm trying to connect to a remote Firebird database "test" (alias already added). It is not an embedded server, and is installed on VM with IP 192.168.1.147.
Here is my connection string:
User=sysdba;Password=masterkey;Database=test;DataSource=192.168.1.147
However I got an error:
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Unable to complete network request to host "192.168.1.147". ---> Unable to complete network request to host "192.168.1.147".
I've done some research on that but haven't got a clue yet. Some help needed. Thanks
My IP address is 192.168.2.108, and I can ping that server IP successfully

Make sure that
Firebird is running
Firebird is listening on port 3050 on the specified IP (or on 0.0.0.0)
Your firewall allows access to port 3050
You're using the correct host name

For Linux, the Firebird port is closed by default. You need to modify RemoteBindAddress in /etc/firebird/2.5/firebird.conf from
RemoteBindAddress = localhost
to
RemoteBindAddress =
and restart service.

Make sure you have excluded tcp port 3050 in VMs' firewall.

Ok. I think your connection to firebird is faililing because the firebird client looks up the network service file by name and does not find gds_db in the services file.
If your connection string refers to the host by using IP, the Client might fail to identify it because it gethostbyname() and not by IP
Manually include this in the file and you should be fine.
C:\windows\system32\drivers\etc\services

Related

What is the cause of this problem "IO Error: The Network Adapter could not establish the connection" on Sql Developer?

I make a connection for connect to the Database Server (other machine).
Then I found "An error was encountered performing the requested operation:
IO Error: The Network Adapter could not establish the connection
Vendor code 17002".
Please look the picture in URL below.
I tried to make a connection but can't access but my team can access it.
My friend used TNS connection type and I did everthing similar him but can't access. I tried to use JDBC thin for connect but can't also.
I had the old connection which I can connect but why I can't connect the new connection.
You're trying to connect to a machine on a network that SQL Developer is unable to reach.
For a TNS connection,
Look at the appropriate TNSNames entry (you will have a tnsnames.ora) file, and find the IP address or network name associated with the connection you're trying to establish -
And then start by trying to ping that resource.
In this case, i'm trying to talk to a database on MY machine, on port 1521. Yours should look quite different.
If you're using a basic connection, then you can look at the connection properties and see what machine/port you're trying to communicate with.
Ping
If you can't reach that machine from your machine, there's zero chance you can connect to a database there.
So, always start with a ping.
Once you see that you can get to that machine, if you're still getting that message, the next thing to think about is blocked ports, the listener defaults to port 1521, but you'll see that in the TNS descriptor as well.
It usually happens when a another process is running on the same port or there is an absence of listener.
Go to Run>services.msc>OracleXETNSListener>Start
Try to reconnect.. Even if the error still prevail then go to cmd
Use code:
npx kill-port <portnumber>
The port number by default is 1521, but you can check the port number in database properties.
It is possible, that your connection is forbidden by the firewall -
go to Control Panel\System and Security\Windows Defender Firewall - Advanced - Outbound Rules - Add a rule. (If you have some antivirus firewall, add rules there)
Create a temporary TCP rule for your port and another rule for UDP. Allow all nets and comps.
Check the telnet connection as cmd -> telnet ->
open remote.host.address PortNumber
If you can connect now, then the problem IS in firewall - edit your new rules, setting the hosts and nets exactly.
This error is because your sqldeveloper is not able to reach the database server's sql service.
One reason could be lsnrctl is down for some reason.
If you have access to machine where database is installed.
In Windows machine, follow: https://www.youtube.com/watch?v=r9pHqOfV2f0&ab_channel=TLinaTutorials
In Linux/macOS machine: Go to $ORACLE_HOME/bin and check status of lsnrctl
execute from $ORACLE_HOME/bin lsnrctl status, if it's down. Then restart it by lsnrctl start.
Check the details of connection in command output like SID, PORT, HOST etc. and try connecting again from sqldeveloper.

SSH connect from local windows VM to Azure windows VM

I want to have a SSH connection from my local windows machine or VM on my computer to Azure windows server VM. I tried Cygwin and Putty but both of them gave timeout connection. I used public ip address and opened port 22 on Azure VM.
I will appreciate if some one can give me any hints or links.
There are multiple firewalls that can be the reason here. Fist you must have a rule on the server to allow incoming SSH requests (port 22). Then you need to configure the NSG(Network security group) to allow incoming on port 22. If it still doesn't work, you need to verify that you are allowed to do an outgoing SSH request from your computer.
Thanks for suggestions, I found the problem which was the host machine IP address(ipconfig) (where is a local VM inside domain) was different from the IP address that communicate outside the domain to internet. I was set in NSG of Azure VM to only accept this IP and because of that it gave time-out error. After changing the IP it works.

Stored Endpoint IP Address after Network Configure Changes in RMI

I've got a RMI server running on a mac. Once I changed the server IP and restart the Application and clients, then clients keep connect to the old ip address with right bind and lookup address. I really have no idea what went wrong because the program is working on another linux server just with different port.
What the remote object clients got is Proxy[MinervaInterface,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.0.104:51815](remote),objID:[40d99efb:140ba232cec:-7fff, 6333954213550330995]]]]]
which 192.168.0.104 is the old IP and it should be 10.0.1.104
I've check the host file and my code, there is no anything like 192.168.0.*
Please help, Thank you.
UPDATE
I have confirmed this is a server registry problem. But I have already restarted the server. I did't remember what else did I do to the registry. Is there any way to set it manually?
UPDATE
I rune this code on that server InetAddress.getLocalHost().getHostAddress(), it returned 192.168.0.104, that can explain where this address came from. But there is no such address on the server now
SOLVED
I found java use a hostname to lookup localhost address, that hostname is not localhost and have not been updated by OS X Server for some reason. I updated the record from OS X Server console and solved this annoying problem.
NEVER THOUGHT ABOUT THAT

Red5 Problem with connecting from remote client

So I have this issue. The issue is I am unable to connect to my red5 server from a remote client. I also have not found any tutorials on how to install red5 so that remote clients can connect to it. However, here is what I have done...
Inside My MXML Flex File I try to connect to the computers IP that the server is running on(My Server is running from within Eclipse). The line for connecting looks like this netConnection.connect(rtmp://192.168.2.12/myApp, true);
All that happens is after a lot of minutes go by, I just get NetConnection.Connect.Failed and there is no log being output by Eclipse. Almost like it never even registers the connection that the remote client is trying to make.
The other interesting thing is that I am ABLE to connect to my Red5 Server using a different computer within my local home network just fine. But only when it is remote I am unable to connect.
I have changed my Red5-web.properties file and added this...
webapp.contextPath=/myApp
webapp.virtualHosts=*, 127.0.0.1, localhost, 192.168.2.14, 174.122.104.3
The 174 one is my website where the Flex Swf Resides on.
I think maybe somehow my computer is not setup or configured to allow these remote connections and is rejecting them or something, I'm not quite sure why a remote client can't connect. Does anyone have any idas?
Your help is greatly appreciated.
You may uninstall the red5 and reinstall it.
When it ask you the server ip address type your server's LAN adress (192.168.2.* or 10.0.0.* whatever). This solved my problem.
In my opinion, if you have at least one domain name that you own, the best way for you to go is to set up an Apache Http Server to your server machine, and create subdomains for both red5, rtmp and rtmpt. Make the Apache handle your incoming requests, and decide their correct routing there.
In case you don't own a domain, or the previous way is too time-taking to set up and get it work, you should just make sure that the ip address you're trying to connect to is not an internal IP.
In your example above you are trying to connect from the client to a 192.168... address. If you try to connect to it from within your LAN, it works, since that ip there is registered to your machine.
But when you take your notebook to your neighbor, and using his internet connection to access your site and connect to red5, the client (flex application) will also try to connect to that 192.168..., and your neighbor's router has no idea about your LAN, probably it doesn't have such an internal IP address either, but SURELY cannot connect to your server.
So instead of using 192.168... in your connection string, you should try using your external IP address (the 174... one):
netConnection.connect("rtmp://174.122.104.3/myApp", true);
This will work always, as far as you have a static IP address.
Also make sure, that your red5 server is accessible over the 80 port, or if it's not, specify the correct port number there.
For that you can do following thing...
These steps I took and it's solved my problem...
1.During the installation, you must have given ip 127.0.0.1 (localhost) and port :5080
2.firstly open the port (5080 and 1935) on firewall.
Visit http://windows.microsoft.com/en-in/windows/open-port-windows-firewall#1TC=windows-7
3.Now to go red5->conf->red5.properties and open this file in notepad++. (or any other editor)
4.repalce http.host and rtmp.host ip with your ip address (ipv4)
5.start the red5 service.
6.Now check http://yourip:5080
It will start working, and you can access it from other system also (in the same network Obviously )

Oracle Connection exception via JDBC

I have installed Oracle 11gR2 on my machine, now when i try to connect to it using IP address as 'localhost' or '127.0.0.1' there is no issue, but when I use ip address of machine '192.168.1.6' it throws exception: Io exception: Then Network Adapter could not establish the connection.
I have installed ms loopback adapter prior to installation and my machine get IP from DHCP.
do i need to configure any setting oracle config or what i might be missing here?
Before looking at the network you need to check what address your listener is actually configured for. If it's specifying localhost or 127.0.0.1 then you won't be able to access remotely. If it's specifying a different IP previously allocated by DHCP then your current one won't work. If it's a host name, is that resolvable to your DHCP address?
As well as looking at listener.ora, you can try running netstat -an | find "1521" to see what address(es) it's actually listening on.
It's a network issue. Likely a firewall, router or proxy somewhere in the line isn't properly configured to forward the desired port.
Not a programming problem.
localhost and 127.0.0.1 are known to be the local machine. It can bypass a lot of the fluff.
When you try for 192.168.1.6, it will go and 'ask' a router (or similar) to send the traffic to that IP address. First I'd try to PING the IP address. If that works, I'd try telnet 10.253.82.33 1521 to see if you can connect to the port without involving JDBC or SQL or anything.

Resources