I have a local MAC machine that RDPs into a windows VM. On that windows VM/desktop I have Power BI Desktop installed along with the Cdata PowerBI/Quickbooks ODBC driver (https://www.cdata.com/drivers/quickbooks/download/powerbi/).
On a separate server (which I can RDP into from the virtual machine) I have quickbooks desktop installed (https://www.acecloudhosting.com/) and in single-user mode (opened a company file w/ an admin user). On that server I have also setup QuickBooks Remote Connector (http://remoteconnector.com/), which essentially is used to create an authenticated connection to QuickBooks. This "remote connector" also acts as a lightweight web server that listens for incoming requests (such as a power bi direct query) and uses that to communicate with Quickbooks hosted on a separate server.
However, I keep getting an HTTP protocol error and not sure if it is because the ports are not setup properly or if something in my ODBC connection is incorrect. It is very odd that I can RDP into the remote server from my VM, but when I try to ping the server my request time out despite allowing ICMP responses in the windows file sharing options so I find that odd.
I have worked on this for about 4 hours, but have run out of things to try.
http://cdn.cdata.com/help/RQB/odbc/pg_connectiono.htm
Related
I used to just put my server name and my sql credentials to connect. Now, not connecting. My other domain login can connect to OTHER servers.
When I run the app in Development, it works. Localhost it does not. So, I know the server connection is good. Something with my networking, after I got a new computer.
I created a java desktop application with derby client driver using netbeans 8.1.
I used this code to get connected to the database.
Class.forName("org.apache.derby.jdbc.ClientDriver");
Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/LibertySchool;create=true;user=liberty;password=liberty");
conn.setSchema("LIBERTY");
Statement s = conn.createStatement();
s.executeQuery("SELECT * FROM USUARIOS");
ResultSet rs = s.getResultSet();
if (rs.next()) {
Login entrar = new Login();
entrar.setVisible(true);
}
The standalone application is working normal on the pc that it was created on after build the dist file has the app.jar file and everything works normal.
I created this so few client computers can access the same application to update data. I have started the derby network on client machine, I have also change the connection from localhost to use the app database location ip server.
But my app does not work on clients on the same network only on the computer where it was built. Other applications that do not use databases works well over the network, it seems that derby database folder has to be moved also to the client machine.
I need to know how to set the client machine properly so users can access the app with the database.
Can someone please give some hints.
If you want to make a client-server connection with the client on a different machine than the server, you'll have to do several things:
Change localhost to a valid externally visible address for the server machine. You can use an IP address, or a host name, e.g., 192.168.1.104:1527 or Carlos-Mac-Pro.att.net:1527, but you're going to need to figure out the right network address to use. localhost:1527 will only work when the client and server are on the same machine.
Ensure that your network allows connections between the client machines and the server machine. Nowadays, most machines will, by default, prevent most inbound network connections from other machines, as a security measure, so you'll need to configure the server machine's firewall, as well as any network devices that are being used in your local network between the client machines and the server machine, to allow TCP/IP connections on port 1527.
I don't think you want to move the derby database folder to the client machines. That would be a completely different architecture for your application (embedded vs client-server). Here's some good background material about the differences between the two configurations: https://db.apache.org/derby/docs/10.13/getstart/cgsquck70629.html
I am trying to connect an ASP.NET 2.0 application hosted on a client machine to an SQL server 2000 instance which is installed on a domain controller running windows server 2003 (I appreciate this is not best practise, but it is something I cannot change). I am using SQL server authentication, not Windows authentication.
During debugging, the following error is displayed at the point the 'connection' is attempted within the web application (not on running any object within Sql Server):
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
I have done some research, and have checked a variety of things:
1) I am certain the conection string is correct - in fact I built a little Windows app that uses the same connection information and connection succeeds...
2) This is limited to the web application - a windows application running on the remote client machine connects just fine using the same connection string (see 1).
3) The firewall settings on both computers do not prevent the connection (see 1).
4) I can ping the windows 2003 server (see 1)
5) The SQL Server credentials definitely have the rights to the objects needed
6) If I (temporarily) put the web application on the windows server 2003 and run it, it loads and runs fine (using a browser on a separate machine, or on the client machine I am trying to connect) - suggesting this is only an issue with a remote connection, and confirming the connectivity between the machines again, and also confirming the necessary security right of the SQL Server user.
7) I can start query analyser on the client machine and using the same SQL server credentials, can run the same queries on the target database just fine.
Stumped. Please help!
You need to go into the SQL Server Configuration Manager and make sure the Named Pipes option is turned on. It is not turned on by default when you install SQL Server.
Because of the research I did in the original question covering the ability of a windows app to connect but not the ASP.NET app to connect from the same machine, and the confirmation the web app was working on the server itself, I was convinced SQL server was set up correctly, that connectivity and firewalls were not a problem - it must have been a difference in the security credentials of the windows app versus the web app.
The windows app runs in the security credentials of the logged on windows user and authenticates using that, whereas the webapp runs in a restricted account and does not pass these credentials over when connecting to SQL server by default. I simply added to web.config, which impersonates the user account within which the web app runs, and it all worked!
Problem solved.
I am trying to remotely access a web application hosted on the office LAN.
I have setup LogMeIN Hamachi and I can connect to an office machine and see shared resources (folders and printers) on that machine.
I selected a Hub-and-spoke network and made the machine with the web app the hub.
While in the office I type http://192.168.1.6:8080/mituz_oc in my browser to get access to the web app.
However, when I try to do the same remotely I get the message "Firefox can't establish a connection to the server at 192.168.1.6:8080."
So I see that the IP address to the computer I have VPN-ed to is 5.14.212.196 and so I try to gain access to the web app by replacing the office LAN's IP with the Hamachi IP (I can only post one hyperlink hence the verbose alternative )
I get the same error message as before, only this time with the HAMACHI IP address.
I can access all the shared resources but can not access the web app.
Is it possible to do what am attempting - remotely access a web application on office server?
If so what am I doing wrong / not doing ?
TIA.
Clemens
1) Check if your Windows Personal Firewall setting blocks connections from Hamachi's 5.x.x.x IP address ranges.
2) Check if your Web Server listens on 5.x.x.x. You can find it out by this command:
netstat -na
Look for local address of "0.0.0.0:8080" which is in the state of "LISTENING".
3) Replace Hamachi with different VPN provider, like www.remobo.com
(Disclosure: I work for the Remobo team)
I have problems connecting to my database server. The database server is not local, I am connected via its IP address.
It works fine in my development machine. After publishing the website to my server, it can not connect to my database server.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Why can't my publish server connect to the database server, whereas it works fine through the development machine?
I often had that problem. Mostly it's because of two problems.
Open the SQL Server Configuration Manager.
Check if the SQL Server Network Configuration supports TCP/IP, if it's disabled, enable it.
e.g. SqlServer 2005 Network Configuration, Protocols for SQLEXPRESS
Open the SQL Server Management Studio
Click on the Sql Server Properties (right click on the server name and
select properties).
After that, select the page "Security" and switch the check to "SQL Server and Windows Authentication mode".
That's all.
I'll attempt to go two for two on the psychic debugging for today...
I will assume that you are not using integrated security? If so it might explain things as the account on your local machine probably has permissions, but the SYSTEM account that is running on the server does not. Just a shot in the dark though.
It sounds like your server can't make the network connection, rather than a security issue.
Ensure that any firewalls on both the DB and app servers allow traffic on the port (1433).
Ensure you're able to ping or tracert from both machines.
Is it your first time you publish your website on the web server ? if it is , Are you sure you have set your connection string properly ?
You need to create a login ( of curse a password for that too ) and the IP Address of that SQL on the web server .
So you need IP Address of the sql server host , Database Name , UId , Pwd .
I will agree that this sounds like a network issue and not a security issue.
Remote into the web server and ping the DB server by IP address. If this does not work, your server cannot see the DB server via that address (different subnet, incorrect firewall/proxy setup, etc). There may be a proxy address you must use to get to the DB server from the web server, or your web server may also be the gateway and IIS doesn't know to look for the DB server on the LAN. If it does work, the computers may not be talking on the same port, or the firewall may be blocking that port exiting the web server.
I have spent hours trying to connect to SQL server using sqlcmd. I disabled my firewall, checked all ip listed in "Protocols for SQLEXPRESS", edited my hosts file. I tried using different ips and machinename to connect to the server. But none of work worked. After hours of investigation, I found out that I made absolutely stupid blunder making me unable to connect.
I want to remind people that the connection string is not case sensitive. But the option is!!
what i did is I put
sqlcmd -s .\sqlserver
But the correct string is
sqlcmd -S .\sqlserver
so watch out, people