Zeppelin cannot start - apache-zeppelin

I am trying to install Zeppelin, I did setup SPARK, JAVA home in /conf/. I also changed the port to not be conflict with Spark's port. But when I start zeppelin-daemon here what I got:
Log dir doesn't exist, create /opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/logs
mkdir: cannot create directory ‘/opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/logs’: Permission denied
Pid dir doesn't exist, create /opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/run
mkdir: cannot create directory ‘/opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/run’: Permission denied
/opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/bin/zeppelin-daemon.sh: line 187: /opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/logs/zeppelin-harry-Harry-SNS.out: No such file or directory
Zeppelin start [ OK ]
/opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/bin/zeppelin-daemon.sh: line 196: /opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/run/zeppelin-harry-Harry-SNS.pid: No such file or directory
/opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/bin/zeppelin-daemon.sh: line 189: /opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/logs/zeppelin-harry-Harry-SNS.out: No such file or directory
cat: /opt/zeppelin-0.8.2/zeppelin-0.8.2-bin-all/run/zeppelin-harry-Harry-SNS.pid: No such file or directory
Zeppelin process died [FAILED]
as I understand, its missing pid directory which idk how can I create one.

Related

WinSCP in Jenkins fails with "Cannot open file "...\WinSCP.ini". The process cannot access the file because it is being used by another process"

We have some cmd scripts who need to access remote FTP directories to transfer files on Jenkins and we get occasionally errors in the console output with WinSCP.
----------------------------------------------------------
START SCRIPT - 20.08.2021 8:50:02
----------------------------------------------------------
**************
START FTP Operation - 20.08.2021 8:50:02
***
Volume in drive \\localdata is DATA
Volume Serial Number is 52EF-B4C7
Directory of \\local-directory
06.05.2020 20:07 <DIR> .
06.05.2020 20:07 <DIR> ..
06.05.2020 20:07 <DIR> folder1
14.06.2021 14:17 <DIR> folder2
17.08.2021 11:15 <DIR> error
0 File(s) 0 bytes
5 Dir(s) 153.174.507.520 bytes free
batch on
confirm off
include |archive;archiv;processed
reconnecttime 10
Searching for host...
Connecting to host...
Cannot open file "C:\Program Files (x86)\WinSCP\WinSCP.ini". The process cannot access the file because it is being used by another process
No session.
No session.
No session.
transfer ascii
\\localdirectory
No session.
No session.
No session.
No session.
No session.
No session.
***
END FTP Operation - 20.08.2021 8:50:03
**************
----------------------------------------------------------
END SCRIPT - 20.08.2021 8:50:03
----------------------------------------------------------
Build step 'Execute Windows batch command' marked build as failure
Sending e-mails to:
Finished: FAILURE
It seems to appear while the script is trying to opening a new FTP-session:
C:\"Program Files (x86)"\WinSCP\winSCP.com /console /script="%FTPScriptDir%%FTPScriptFile%"
The batch script calls actually a .ftp file to open a new session:
#option config
option batch on
option confirm off
option exclude "archive;archiv;processed"
option reconnecttime 10
##
# open SFTP session
# WinSCP Session (local installation => C:\"Program Files (x86)"\WinSCP\)
##
open sftp:/// -hostkey="" -rawsettings ProxyPort=0
The Jenkins job is configured to run one batch command after another:
Both batch script files do the same thing. There is just a difference regarding the local/remote directories path.
Could you help me to find a way to avoid theses casual errors? Thanks!
Your WinSCP script relies on a shared INI configuration file, what is against the guidelines. It's likely that you run multiple WinSCP instances/transfers in parallel and they fight each other for write access to the file.
There are two solutions:
Quick and dirty solution is to mark the INI file as read-only, so that WinSCP will not try to update it when finishing.
A proper solution is to avoid using shared configuration. Instead use /ini=nul commandline switch to make WinSCP use the default configuration. Though that might need some tweaks to the script, in case it really relies on some configuration in the INI file.
See https://winscp.net/eng/docs/scripting#configuration

"The filename, directory name, or volume label syntax is incorrect" error occurs in specific circumstance

This is a batch script activate.bat from the project w64devkit v1.3.1
#set PATH=%~dp0\bin;%PATH%
#busybox sh -l
I get error "The filename, directory name, or volume label syntax is incorrect" when i double click the batch script to run it but when i execute the batch script in the ConEmu terminal, it runs fine and drops me into a busybox shell.
I have read the question and best answer of this link and i still could not fix the error.
busybox.exe is in the bin directory and the activate.bat file is one directory above the bin folder.
All these files are in the w64devkit folder which was extracted from the zip file w64devkit.zip.
My operating system is Windows 8.1 Pro.
#NekoMusume comment worked.
The batch script worked when executed with administrator privileges.
Run the file as an administrator. Sometimes depending on security policies and group policies administrator access is required when changing environment variables.

Oracle 12c database on docker container, status: unhealthy

I’m trying to install a oracle database on my mac machine, but my container status is unhealthy. after i run this command:
docker run -d -it --name store/oracle/database-enterprise:12.2.0.1
and check the status by docker ps
it shows that it's unhealthy.
and when i run docker exec -it bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
I get sqlplus command not found.
this is the logs:
Oracle Database 12.2.0.1 Setup
Mon Feb 17 13:46:41 UTC 2020
Check parameters ......
log file is : /home/oracle/setup/log/paramChk.log
paramChk.sh is done at 0 sec
untar DB bits ......
log file is : /home/oracle/setup/log/untarDB.log
untarDB.sh is done at 38 sec
config DB ......
log file is : /home/oracle/setup/log/configDB.log
mkdir: cannot create directory '/u02/app': No space left on device
mkdir: cannot create directory '/u03/app': No space left on device
mkdir: cannot create directory '/u04/app': No space left on device
mkdir: cannot create directory '/u01/app/oracle/product/12.2.0/dbhome_1/admin': No space left on device
ln: failed to create symbolic link '/u02/app/oracle/audit': No such file or directory
ln: failed to create symbolic link '/u02/app/oracle/oradata': No such file or directory
ln: failed to create symbolic link '/u03/app/oracle/fast_recovery_area': No such file or directory
ln: failed to create symbolic link '/u04/app/oracle/redo': No such file or directory
/home/oracle/setup/configDBora.sh: line 137: orapwd: command not found
/home/oracle/setup/configDBora.sh: line 171: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/sqlnet.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 172: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/sqlnet.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 173: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/sqlnet.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 184: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 185: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 186: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 197: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/tnsnames.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 206: /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/tnsnames.ora: No such file or directory
/home/oracle/setup/configDBora.sh: line 209: lsnrctl: command not found
Mon Feb 17 13:47:19 UTC 2020
Start Docker DB configuration
Call configDBora.sh to configure database
Configure DB as oracle user
Setup Database directories ...
/home/oracle/setup/configDBora.sh: line 123: sqlplus: command not found
update password
create pdb : ORCLPDB1
/home/oracle/setup/configDBora.sh: line 141: sqlplus: command not found
Reset Database parameters
/home/oracle/setup/configDBora.sh: line 155: sqlplus: command not found
DONE!
Remove password info
Docker DB configuration is complete !
configDB.sh is done at 38 sec
Done ! The database is ready for use .
# ===========================================================================
# == Add below entries to your tnsnames.ora to access this database server ==
# ====================== from external host =================================
ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip-address>)(PORT=<port>))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLCDB.localdomain)))
ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip-address>)(PORT=<port>))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)))
#
#ip-address : IP address of the host where the container is running.
#port : Host Port that is mapped to the port 1521 of the container.
# The mapped port can be obtained from running "docker port <container-id>"
JIT: pid 5408 requesting stop
2017-08-08T17:41:41.417556+00:00
ARCH: Archival disabled due to shutdown: 1090
Shutting down archive processes
Archiving is disabled
2017-08-08T17:41:41.436309+00:00
Stopping background process VKTM
2017-08-08T17:41:47.017665+00:00
Instance shutdown complete (OS id: 5408)
Mon Feb 17 14:05:05 UTC 2020
shutdown database
/home/oracle/setup/shutDB.sh: line 53: sqlplus: command not found
stop listener
/home/oracle/setup/shutDB.sh: line 61: lsnrctl: command not found
Start up Oracle Database
Mon Feb 17 14:05:07 UTC 2020
start database
/home/oracle/setup/startupDB.sh: line 53: sqlplus: command not found
start listener
/home/oracle/setup/startupDB.sh: line 61: lsnrctl: command not found
The database is ready for use
Prune your volumes and then make sure your mount volume is under the docker desktop (OSX)> Docker Dashboard> Resources> File sharing
More about mounting
Starting an Oracle database server instance: Example
docker run --name TEST-DB -p 9999:1521 -p 9991:5500 -v /Users/yourusername/data/oracle:/opt/oracle/oradata store/oracle/database-enterprise:12.2.0.1
The default user credentials from dockerhub:
user:sys password:Oradoc_db1.

How to change the Data directory in Postgresql on Ubuntu 13.04

I am having a problem changing the data directory on postgresql 9.1 on ubuntu 13.04:
I first did a:
sudo pg_dropcluster --stop 9.1 main
and then attempted to create a new one in the desired path:
sudo pg_createcluster -d /home/fccoelho/Documentos/databases/postgresqldata 9.1 main
but i fails with a permission denied:
Creating new cluster (configuration: /etc/postgresql/9.1/main, data: /home/fccoelho/Documentos/databases/postgresqldata/)...
initdb: could not access directory "/home/fccoelho/Documentos/databases/postgresqldata": Permission denied
Error: initdb failed
I should mention That I checked the permissions, tried creating the directory manually and "chowning" to user postgres afterwards, etc. nothing changed the permission denied message.
I also tried to used the initdb binary distributed with POstgresql without success
How do I make this work?
I have found a workaraound, but not really a solution:
I found out I cannot maintain the data directory within my home tree so I created a new directory /home/postgresqldata/ and ran:
sudo pg_createcluster -d /home/postgresqldata/ 9.1 main
and everything worked as expected!!

DatabaseError unable to open database file

My sqlite db file is this: unable to open database file i chowned all folders until my dbfile to root. but i am still getting this error. but i remember that while creating my django project on server, i created a superuser, and now if i do ls -l i see that the user is that superuser. how is it possible to tell apache that this superuser should have that right to write/read the db file? or how to solve the problem, i am not apache/linux guru..
Execute chown www-data:www-data directory on the directory you want apache to be able to write to.
You should be able to just leave the file as owned by the super user and just change the group so that apache can read/write it as well.
Change the group for the sqlite file and the containing directory. Try this:
cd <directory with sqlite file>
sudo chgrp www-data . <sqlitefile>
You can find write group and www user and change permissions.
Say: cat /etc/passwd - for find right user, It may be apache or http or www.
And say to terminal: cat /etc/group -for find right group.
In my system group=apache, user = apache.

Resources