Unable to move data from HDFS to Cassndra( different server) - java

I am trying to move my data (exported from Hive) to a Cassandra table located in some other server
This is sqoop command :
export --connect jdbc:cassandra://server_address:port/KeySpace_name --username "MyUsername"--password "MyPass" --table my_cassandra_table --export-dir /user/xyz/ --columns Column_list
I get this error:
E0501: Could not perform authorization operation, Call From trphada05.hadoop.searshc.com/157.241.81.9 to trphada01:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

Related

Cannot find mysql.sock file and cannot check if mysql is running on mac using xampp

I am extremely new to Computer Science, and we were asked by our professor to connect our java file to our MySQL database using XAMPP. My java file would not connect to the database I created on phpmyadmin no matter what I did, so I tried to get to the root of the problem by entering mysqladmin -u root -p ping on my terminal. This was the result:
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
I went to my tmp folder and could not find the mysql.sock file. I tried checking if mysql was running by entering ps aux | grep mysql on my terminal. The result was
username 5078 0.0 0.0 4277504 672 s001 S+ 11:21AM 0:00.00 grep mysql
but I have no idea what that means. I also tried commands like service mysql restart and sudo service mysqld start, but terminal would say
zsh: command not found: service
I tried locating for the mysql.sock file because I thought it was just misplaced, so I entered locate mysql.sock and netstat -ln | grep mysql on the terminal, but they returned nothing. I also tried mysqladmin -p -u <user-name> variables but the result again was
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
The weird thing is that on the Log tab of XAMPP, it says INFO: Successfully started "mysql". I am also able to connect to my databases using my php projects, but I just can't connect with my java files. Please help, I am desperate.

Connection refused to host: 10.144.16.123 - where does this IP come from?

When I run service launcher in Eclipse for a web application I get the following error msg:
Connection refused to host: 10.144.16.123; nested exception is:
java.net.ConnectException: Connection timed out: connect
I am asking myself where the host 10.144.16.123 comes from or where it is configured. When I check the configured program arguments in the launcher file it looks like this:
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-d ${workspace_loc:project-backend}/custom/properties -r 1199 -c rmi://localhost:1199/ConfigService"/>
There, I can find localhost. Any idea how to check where 10.144.16.123 comes from?

Play! framework 2.7 - Cannot connect to database

i am trying to connect to my postgres database from my play 2.7 application.
The database is an docker image that is initialized with
docker run -d --name backend_local - p 127.0.0.1:5432:5432 -e POSTGRES_USER=markos -e POSTGRES-PASSWORD=**** -e POSTGRES_DB=backend_db --restart always registry.gitlab....
My configuration file looks like this
# Database
db.default.driver=org.postgresql.jdbc.Driver
db.default.url="jdbc:postgresql://localhost:5432/backend_db"
db.default.username="markos"
db.default.password="****"
db.default.logSql=true
cant see something wrong with the connection but still i am getting Cannot initialize to database[default]
the logs i am getting
2020-05-23 15:44:13.044+0200 [error] application -
! #7fpl591k9 - Internal server error, for (GET) [/] ->
play.api.Configuration$$anon$1: Configuration error[Cannot initialize to database [default]]
at play.api.Configuration$.configError(Configuration.scala:168)
at play.api.Configuration.reportError(Configuration.scala:1014)
at play.api.db.DefaultDBApi.$anonfun$initialize$1(DefaultDBApi.scala:76)
at scala.collection.immutable.List.foreach(List.scala:389)
at play.api.db.DefaultDBApi.initialize(DefaultDBApi.scala:68)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:93)
at play.api.db.DBApiProvider.get(DBModule.scala:77)
at play.api.db.DBApiProvider.get(DBModule.scala:59)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:85)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:77)
Caused by: play.api.Configuration$$anon$1: Configuration error[dataSource or dataSourceClassName or jdbcUrl is required.]
at play.api.Configuration$.configError(Configuration.scala:168)
at play.api.Configuration.reportError(Configuration.scala:1014)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:68)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:248)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:140)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:138)
at play.api.db.DefaultDBApi.$anonfun$initialize$1(DefaultDBApi.scala:72)
at scala.collection.immutable.List.foreach(List.scala:389)
at play.api.db.DefaultDBApi.initialize(DefaultDBApi.scala:68)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:93)
Caused by: java.lang.IllegalArgumentException: dataSource or dataSourceClassName or jdbcUrl is required.
at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:958)
at play.api.db.HikariCPConfig.toHikariConfig(HikariCPModule.scala:138)
at play.api.db.HikariCPConnectionPool.$anonfun$create$1(HikariCPModule.scala:55)
at scala.util.Try$.apply(Try.scala:209)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:52)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:248)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:140)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:138)
at play.api.db.DefaultDBApi.$anonfun$initialize$1(DefaultDBApi.scala:72)
at scala.collection.immutable.List.foreach(List.scala:389)
It seems that my local_dev.conf that was handling the database configurations was misplaced outside from the conf file where it should be located originally!

Unable to attach remote debugger to app in PCF

I have multiple applications running in PCF and can remote debug in to all but one of them. I use the same configuration making sure that
JBP_CONFIG_DEBUG: {enabled: true}
is properly set and picked up by the app.
I run cf ssh -N -T -L 8000:localhost:8000 in command line and verify in PCF Apps Manager that the ssh session is established.
When I run the debug session in Intellij I get the error in Intellij.
Unable to open debugger port (localhost:8000): java.net.SocketException "Connection reset"
And this error in CMD.
connect to localhost:8000 failed: ssh: rejected: connect failed (dial tcp 127.0.0.1:8000: getsockopt: connection refused)
I can ssh into the app with cf ssh with no issue.
I am not sure what the problem is or if there is something I am missing, but this same process work for the other applications.
Any help would be great.

HSQLDB alias doesnt exist, linux sh script

The problem is that when my hsql server starts, it tells that the alias exists, everything connected successfully:
rpi#RaspberryPi:/home/snb/update_skynetwork/apps/App/bin$ sh skysql.sh
/home/snb/update_skynetwork/apps/App/lib/hsqldb-2.2.8.jar
[Server#133796]: [Thread[main,5,main]]: checkRunning(false) entered
[Server#133796]: [Thread[main,5,main]]: checkRunning(false) exited
[Server#133796]: Startup sequence initiated from main() method
[Server#133796]: Could not load properties from file
[Server#133796]: Using cli/default properties only
[Server#133796]: Initiating startup sequence...
[Server#133796]: Server socket opened successfully in 7 ms.
] opened sucessfully in 1462 ms.=0, id=0, db=file:/home/snb/update_skynetwork/apps/App/sky-network-hsqldb/sky-network-hsqldb, alias=sky-network-hsqldb
[Server#133796]: Startup sequence completed in 1473 ms.
[Server#133796]: 2012-12-20 10:23:11.843 HSQLDB server 2.2.8 is online on port 9001
[Server#133796]: To close normally, connect and execute SHUTDOWN SQL
[Server#133796]: From command line, use [Ctrl]+[C] to abort abruptly
But when I try to connect with my java app I receive this error:
-on server:
[Server#133796]: [Thread[HSQLDB Connection #bdb503,5,HSQLDB Connections #133796]]: database alias=sky-network-hsqldb does not exist
[Server#133796]: [Thread[HSQLDB Connection #110003,5,HSQLDB Connections #133796]]: database alias=sky-network-hsqldb does not exist
[Server#133796]: [Thread[HSQLDB Connection #175d6ab,5,HSQLDB Connections #133796]]: database alias=sky-network-hsqldb does not exist
-on client:
Caused by: org.hsqldb.HsqlException: General error: database alias does not exist
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.ClientConnection.<init>(Unknown Source)
... 16 more
I have tried to test the connection with the sqltool, but still the same.
Also, I have checked the alias name in the properties of client - all the same, like needed. The jars of hsql are the same. Everything matches.
As OS I have a Raspberry-pi VM.
EDIT
This is my sqltool.sh :
#! /bin/sh -e
export CLASSPATH=../lib/hsqldb-2.2.8.jar:$CLASSPATH
export CLASSPATH=../lib/sqltool.jar:$CLASSPATH
java -classpath $CLASSPATH org.hsqldb.cmdline.SqlTool -- inlineRc=url=jdbc:hsqldb:hsql://localhost/sky-network-hsqldb,user=SA,password=
It seems the only possible issue is shell script.
Can you use a simple name for the alias, without hyphens.
The database file name should be OK with the hyphens.
The server message states you do not have a server.properties file. In this case, the database file path and the name/alias should be on the command line. Please check your shell script and report / change the line that starts the server.

Categories

Resources