• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Accessing Database from Webservice (Tomcat)

DominikE

New Pleskian
Hello,

I have a problem accessing the database via webservice using tomcat.

I can access the database via ssh using
mysql -uadmin -p$(cat /etc/psa/.psa.shadow)

I dont like that because the cleartext password is not accepted.

The Service worked find bevore Plesk was installed.

Plesk changes the user root to admin and sets a password.

I can access via
mysql -uadmin -p"CONTENT OF .psa.shadow"

The content of .ps.shadow is the password i use in my webservice to connect.

Now my question is how to enable access over my webservice ?

i read about problems accessing database remotely, but it should be fixed within version 8.5
and be enabled by default (> Plesk version 8)

I get the following error:
HTTP 500 ERROR
type Exception report
description The server encountered an internal error that prevented it from fulfilling this request.
exception java.lang.NullPointerException
RESTest.status.V1_Status.returnStatus(V1_Status.java:43)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)


---------------------------------------------------------------------------------------------------------------------------
Guten Tag,

Ich habe eine kleine Frage...
Vorab hier die Problemstellung. Ich betreibe den Server mit Debian 7, Tomcat und Plesk.
Plesk hat den MySQL Benutzer root in admin umbenannt und ein Passwort festgesetzt.
Über SSH komme ich prima auf die Datenbank, genau wie über PHPMyadmin.
Tomcat benutze ich, weil ich einen Webservice bereitstellen möchte, der Zugriff auf die Datenbank hat.

Mit der Standard Konfiguration (Debian 6 und Confixx) funktioniert das. Es liegt also an der Plesk Installation.
Mich ärgert schon, dass ich beim Login auf den Server folgendes eingeben muss:
mysql -uadmin -p$(cat /etc/psa/.psa.shadow)
also das Passwort im Klartext nicht akzeptiert wird.

Hier scheint offenbar auch der Fehler mit dem Webservice zu liegen, dachte ich zumindest.
Der Login funktioniert aber auch mit dem Befehl
mysql -uadmin -p"INHALT DER .psa.shadow"

Diesen Inhalt gebe ich nun meinem Webservice als Passwort und erhalte immernoch einen Fehler.
HTTP 500 ERROR
type Exception report
description The server encountered an internal error that prevented it from fulfilling this request.
exception java.lang.NullPointerException

Wie gesagt: Es hat sich nichts weiter geändert, als PLESK.

Ist es möglich, dass PLESK verhindert, dass man Zugriff "von außen" auf die Datenbank hat ?
Muss ich das erst freischalten ?

In der Dokumentation von Plesk steht dazu folgendes:
"Ab Version 8 ist der Remote Zugriff auf MySQL per default erlaubt"

Ich habe die neuste Version...

Ich bitte um Hilfestellung, danke !

----------------------------------------------------------------------------------------------------------------
 
Back
Top