Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Linux , Brekeke SIP server, MS SQL sqljdbc_auth.dll error
Author Message
LinuxBrekie
Brekeke Junior Member


Joined: 26 Mar 2012
Posts: 5
Location: London

PostPosted: Mon Mar 26, 2012 9:33 am    Post subject: Linux , Brekeke SIP server, MS SQL sqljdbc_auth.dll error Reply with quote

1. Brekeke Product Name and version: SIP SERVER Version 2.4.8.6
inhouse we run 2 licensed Brekekie Servers, this box currently is a test

2. Java version:
OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

3. OS type and the version:
CentOS 6 Server install (no Gui) fully updated

4. UA (phone), gateway or other hardware/software involved:
NA

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html :
NA but from what i remember network pattern 1

6. Your problem:

3rd Party DB SQLserver connected to a Linux/tomcat box. Issue with sqljdbc_auth.dll.

But First some questions

-- Does anyone have much experaince with running brekekeSIP server on a linux box? if you do are you using a 3rd party DB or the internal? Do you find it stable? or more hassle than it is worth?

-- I am still testing but my logs are saying error sqljdbc_auth.dll could not be found in the java.server.path. My database is not windows authenticated, it is SQL authenticated so I do not believe that sqljdbc_auth is needed (but i could be mis-understanding the role of this dll) or the .dll is needed for brekeke and in turn MS SQL via Linux would be an issue?

Currently I am just testing and I will update this post with any progress I have in case anyone is interested.

L
Back to top
View user's profile
james
Brekeke Master Guru


Joined: 10 Dec 2007
Posts: 494

PostPosted: Mon Mar 26, 2012 1:11 pm    Post subject: Reply with quote

I'm using my brekeke SIP server on several linux machines including CentOS, Fedora, Ubuntu, RedHat and Debian without any issues.
OS and distributions are not important because a database connection is though JDBC.

But it seems you are using OpenJDK instead of Oracle's JDK.
Do you have any reasons to use OpenJDK??
I think Brekeke recommend Oracle's JDK instead of others.
Back to top
View user's profile
LinuxBrekie
Brekeke Junior Member


Joined: 26 Mar 2012
Posts: 5
Location: London

PostPosted: Thu Apr 05, 2012 8:27 am    Post subject: Reply with quote

Hello James

Thank you for your post,

You asked my why I am installing OpenJDK and i did not know. After testing it turns out that when I do yum install tomcat6 is over writes the existing java platform and installs openJDK. I can install Java from the Oracle site but as soon as I go to install Tomcat via yum it gets overwritten.

Anyway I have not progress much more than this, just wanted to drop you a thank you
Back to top
View user's profile
james
Brekeke Master Guru


Joined: 10 Dec 2007
Posts: 494

PostPosted: Thu Apr 05, 2012 11:28 am    Post subject: Reply with quote

> but my logs are saying error sqljdbc_auth.dll could not be found
> in the java.server.path.

Which log file is it?
It seems you installed Windows version of JDBC driver instead of Linux version..


Let you refer the following page.
You need to follow the "Installation Instructions for the UNIX version of the JDBC Driver".
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21599
Back to top
View user's profile
LinuxBrekie
Brekeke Junior Member


Joined: 26 Mar 2012
Posts: 5
Location: London

PostPosted: Wed Apr 11, 2012 9:32 am    Post subject: Reply with quote

Hello James

Fixed it, jump to the tl:dr for the quick answer

Longstory= At the very start I had placed the sqljdbc.jar in the location of /usr/share/tomcat6/webapps/proxy/WEB-INF/lib however I was still getting an error about connecting to the database. So I tried to resolve this and somehow got sqljdbc_auth.dll mixed in this was a fail as the .dll is windows but the reason for the confusion was that this file can auto athenicate a user to an SQL database based on their login. Not something we need from a linux box.

Anyway then i sorted the java thing and that took a while. Side note tho I never found a way to wget from the oracle site? hated that

Then today I got to spend a few hours on it. Once i got to look at it for a while it was my connection strings that were all out. I was using a windows box connecting to a 2000 database and the connection strings are different compared to a 2008 SQL server.

tl:dr, the .dll was a red herring, the java thing not that important, Connection string needed to be
jdbc:sqlserver://xxx.xx.xxx.xx:1433;DatabaseName=zbrekdb
Instead of jdbc:microsoft:sqlserver://xxx.xx.xxx.xx:1433;databasename=zbrekdb

Thanks for poking me in the right direction James.

to anyone finding this thread this is a good referance http://www.brekeke-sip.com/bbs/viewtopic.php?t=2475
Back to top
View user's profile
james
Brekeke Master Guru


Joined: 10 Dec 2007
Posts: 494

PostPosted: Wed Apr 11, 2012 2:23 pm    Post subject: Reply with quote

Im glad to know it. :)
Back to top
View user's profile
LinuxBrekie
Brekeke Junior Member


Joined: 26 Mar 2012
Posts: 5
Location: London

PostPosted: Thu Apr 12, 2012 8:16 am    Post subject: Reply with quote

Hello James

Could you give me a little more assistance, The database started yesterday however when going ot the user page I am getting an error that states database = null, even tho the server status is saying it is connected to the database

my error message =

Quote:
com.brekeke.net.sip.sv.registrar.RegisteredDBCanNotOpenException: Connection error:jdbc:sqlserver://xxx.xxx.xxx.xxx:1433;databasename=zbrekdb:Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.; prop={user=brekeke, password=password, url=jdbc:sqlserver://xxx.xxx.xxx.xxx:1433;databasename=zbrekdb, enabled=on, class=com.brekeke.net.sip.sv.registrar.plugins.RegisteredSqlDB, driver=com.microsoft.sqlserver.jdbc.SQLServerDriver}
at com.brekeke.net.sip.sv.registrar.plugins.RegisteredSqlDB.getConnection(Unknown Source)
at com.brekeke.net.sip.sv.registrar.plugins.RegisteredSqlDB.initConnection(Unknown Source)
at com.brekeke.net.sip.sv.registrar.plugins.RegisteredSqlDB.open(Unknown Source)
at com.brekeke.net.sip.sv.registrar.plugins.RegisteredSqlDB.<init>(Unknown Source)
at com.brekeke.sipadmin.SipAdminBase.initDatabase(Unknown Source)
at com.brekeke.sipadmin.SipAdminBase.startServer(Unknown Source)
at com.brekeke.sipadmin.web.ServerInvoker.exec(Unknown Source)
at com.brekeke.web.Bean.execMain(Unknown Source)
at com.brekeke.sipadmin.SipAdminBase.execMain(Unknown Source)
at com.brekeke.web.Bean.execute(Unknown Source)
at com.brekeke.web.Bean.go(Unknown Source)
at com.brekeke.web.Bean.startBean(Unknown Source)
at com.brekeke.web.GateServlet.performTask(Unknown Source)
at com.brekeke.web.GateServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)


Then loads of error messages following on from these.

Now the error message is stating that I need to use sqljdbc4.jar instead of sqljdbc.jar which I have, and i have placed it in /usr/share/tomcat6/webapps/proxy/WEB-INF/lib and I have also placed it in /usr/share/tomcat6/lib/ as this appears to be the main jar hangout.

My error message has not changed in a while and I keep changing things making me think i am missing soemthing

Could you tell me where you place the sqljdbc4.jar? I keep reading about classpath but my testing with this has not helped. I have also renamed sqljdbc4.jar to sqljdbc.jar to see if i could trick it but this is not effecting anything.

Some extra details: this is a centos 6.2 64bit build, Clean install and updated.
Back to top
View user's profile
james
Brekeke Master Guru


Joined: 10 Dec 2007
Posts: 494

PostPosted: Thu Apr 12, 2012 10:23 am    Post subject: Reply with quote

Putting the "sqljdbc4.jar " file under the "/usr/share/tomcat6/webapps/proxy/WEB-INF/lib" is no problem.


Have you restarted the server machine after you copied the JAR file?

Since the Java VM caches JAR files, you need to restart the server machine, or execute "killall java" after you copy the JAR file.


If the problem still persists, stop using OpenJDK and try Oracle's JDK.
Back to top
View user's profile
LinuxBrekie
Brekeke Junior Member


Joined: 26 Mar 2012
Posts: 5
Location: London

PostPosted: Fri Apr 13, 2012 4:05 am    Post subject: Reply with quote

I can confirm it is all done and connected.

I tried a number of things but the java was out of date and causing most of the problems. I have now upgraded to 1.7.02 (64bit) and now the SIP server is running and I can edit and remove users.

I do have one more problem which is a brekeke problem. I have imported a list of users 1100+ however now when I manually add a user it keeps using a uid that already exists (error in the log.log is "SqlUserDir.append failed Cannot insert duplicate key row in object 'dbo.t_userdir' with unique index 'idx_userdir_uid'"

I have SQL profiler running against the database and can see the statements requested by the brekekie machine and for some random reason it is not picking a good uid. I built the table a while ago so it might be that i forgot an indexing option?

Anyone had this issue?

If i fix it will post the answer back. Once again James o7 thank you for your assistance.

edit:spelling :/
Back to top
View user's profile
james
Brekeke Master Guru


Joined: 10 Dec 2007
Posts: 494

PostPosted: Mon Apr 16, 2012 9:25 am    Post subject: Reply with quote

I've talked about this issue with Brekeke's developer.
You might need to use lower value as UID at the list for importing.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1