Appium - Command line - ios7.1

Team,
Can you please guide me or point me some tutorials to run Appium through command line? I see lot of issues with Appium.app on MAC. It would be great, if you can share your knowledge or materials for me to move forward to run a sample application with appium through command line. Please refer my settings in appium.app for your reference.
Appium - Not able to launch the inspector
Logs:
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}}}
info: <-- GET /wd/hub/status 200 1.335 ms - 104 {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {"status":0,"value":[]}
info: <-- GET /wd/hub/sessions 200 2.145 ms - 23 {"status":0,"value":[]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone Simulator"}}
info: [debug] Using local app from command line: /Users/rsangili/Desktop/temp/Payload/TestApp2.app
info: [debug] Creating new appium session dd2c8121-6a13-48be-8a0b-9fc6233437a5
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] iOS SDK Version set to 7.1
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
error: Could not parse plist file (as binary) at /Users/rsangili/Desktop/temp/Payload/TestApp2.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
error: Could not parse plist file (as XML) at /Users/rsangili/Desktop/temp/Payload/TestApp2.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings
info: [debug] Not setting locale
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir:
info: [debug] Dynamic env:
info: [debug] Dynamic bootstrap code:
info: [debug] Dynamic bootstrap path:
info: [debug] Reusing dynamic bootstrap:
info: [debug] Fixing device was changed from:"
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS 7.* simulator log capture
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Fixing device was changed from:"
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Command failed:
info: [debug] Error: Command failed:
at ChildProcess.exithandler (child_process.js:648:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: )","killed":true,"code":null,"signal":"SIGTERM","origValue":"Command failed: "},"sessionId":null}
info: <-- POST /wd/hub/session 500 6381.780 ms - 199
Thanks,
Ramesh

Using Appium from Command Line
Installation
Open a terminal session
Install homebrew (instructions)
Run the below commands
$ brew install node # install node and npm
$ npm install -g appium # globally install appium
$ npm install wd
$ appium # Launch your appium server!
Usage
Whenever you want to begin an appium server session, type appium to run the server.
Arguments can be added to that command.
appium --app path/to/app --device-name "iPhone Simulator"
Using Appium.app inspector with server
In my development env setup, I don't use the Appium.app server, but I DO use the inspector.
Start your Appium server with the --app and --device-name arguments
Click on the Appium.app inspector icon
The iPhone Simulator will launch, and may give you an authorization prompt for Instruments to control it

Setting up Appium
Mac:
Download and install Latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download and install latest Android SDK from http://developer.android.com/sdk/index.html
Configure path to ANDROID_HOME and JAVA_HOME in .bash profile
Configure path to Platform-tools and tools folder in .bash profile
Install ruby
Install brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
Set path for brew from .bash profile
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
Install node:Paste the below commands one by one at terminal and hit enter
brew update
brew install node
brew link node
Install appium
npm install -g appium
npm install wd
To start appium: Paste the below command at terminal and hit enter
appium
Install Appium python client:
Download source from
https://github.com/appium/python-client
Extract it, Navigate to the folder containing the Python client from terminal and install by:
cd python-client
python setup.py install
IDE used: Pycharm
Linux:
Download and install Latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download and install latest Android SDK from http://developer.android.com/sdk/index.html
Configure path to ANDROID_HOME and JAVA_HOME in .bashrc profile
Configure path to Platform-tools and tools folder in .bashrc profile
command gedit.bashrc to open bash profile and specify path
Install ruby
Install linux brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
Steps to get appium working on ubuntu pc :
Install ruby: Paste the below command at terminal and hit enter
sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
Install linux brew:Paste the below command at terminal and hit enter
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
set path for brew
Type: gedit.bashrc at terminal and copy paste following into the .bashrc file
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
Install node:Paste the below commands one by one at terminal and hit enter
brew update
brew install node
brew link node
Install appium
npm install -g appium
npm install wd
To start appium: Paste the below command at terminal and hit enter
appium
Install Appium python client:
Download source from
https://github.com/appium/python-client
Extract it, Navigate to the folder containing the Python client from terminal and install by:
cd python-client
python setup.py install
IDE used: Spyder/Pycharm
You can get spyder by running command
Sudo apt-get install Spyder
Windows:
Download and install python 2.7.9 from https://www.python.org/downloads/
Download and install Latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download Android SDK from http://developer.android.com/sdk/index.html
Set Environment variables to JAVA_HOME for Java , Python.exe for python and ANDROID_HOME to Android sdk, and Android Tools and platform tools.
IDE used: Pycharm
Download and install pycharm IDE from https://www.jetbrains.com/pycharm/
Install Appium python client:
Download source from
https://github.com/appium/python-client
Extract it, Navigate to the folder containing the Python client from terminal and install by:
cd python-client
python setup.py install
Start node server by using Appium gui from windows PC

Related

sudo apk: command not found on Linux

I'm attempting to install SQL Server driver on AWS SageMaker Notebook instance running Amazon Linux 2. I am following the documentation here - Alpine Linux section: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16
When I attempt to install after downloading using the following commands, I get an error:
#Install the package(s)
sudo apk add --allow-untrusted msodbcsql18_18.1.1.1-1_amd64.apk
sudo apk add --allow-untrusted mssql-tools18_18.1.1.1-1_amd64.apk
sudo apk: command not found on Linux
Linux version:
5.10.102-99.473.amzn2.x86_64
What do I need to do before running the commands?

Docker image error "Service chromedriver unexpectedly exited. Status code was: 127"

FROM python:3.7
WORKDIR /opt
RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb
RUN dpkg -i /chrome.deb || apt-get install -yf
RUN rm /chrome.deb
ENV CHROMEDRIVER_VERSION 89.0.4389.23
ENV CHROMEDRIVER_DIR /chromedriver
RUN mkdir -p $CHROMEDRIVER_DIR
# Download and install Chromedriver
RUN wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
RUN unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR
ENV PATH $CHROMEDRIVER_DIR:$PATH
RUN apt-get update
COPY . .
RUN pip3 install -r requirements.txt
CMD ["python3","code.py"]
code.py
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
try:
chrome_options = Options()
chrome_options.add_argument("--headless")
driver = webdriver.Chrome(options=chrome_options)
driver.get('google.com')
print(f'{driver.page_source}')
except Exception as e:
print(f'111111111 Exception: {e}')
try:
options = webdriver.ChromeOptions()
options.headless = True
driver = webdriver.Chrome(options=options)
driver.get('google.com')
print(f'{driver.page_source}')
except Exception as e:
print(f'222222 Exception: {e}')
print(f'h')
requirements.txt
selenium
When i build this image it build fine , but throws following error on running image
Service chromedriver unexpectedly exited. Status code was: 127
any idea , where i am doing wrong in the Dockerfile. I tried for other posts available but nothing worked for me.
My machine os is Mac catalina and was trying to configure the code for remote host, but this is not even working at my local system as well.
Is this is the issue I have another OS and configuring another
I tried this post also but nothing worked
Had the same problem. Fixed it by installing chrome-browser.
Please check this answer: How to install Google chrome in a docker container

Problem using and running brew services start mongodb-community#4.2

I have MacOs Catalina version 10.15.5 and I installed mongoDB following the steps indicated at their site https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ using Homebrew. When I check my mongoDB if its correctly installed I use which mongo command and I get /usr/local/bin/mongo response. When I use mongo --version and mongod --version I get:
MongoDB shell version v4.2.7
git version: 51d9fe12b5d19720e72dcd7db0f2f17dd9a19212
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
and
db version v4.2.7
git version: 51d9fe12b5d19720e72dcd7db0f2f17dd9a19212
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
respectevely which I think it means its correctly installed and should work.
But when I open terminal and run the command brew services start mongodb-community#4.2 as indicated on the site I get:
Error: undefined method `resolve_alias' for Formula:Class
/usr/local/bin/brew-services.rb:154:in `service'
/usr/local/bin/brew-services.rb:203:in `check'
/usr/local/bin/brew-services.rb:193:in `run!'
/usr/local/bin/brew-services.rb:397:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:81:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:112:in `<main>'
NOTE: my brew is updated and upgraded successfully!
I searched on the internet any solution but I cant find anything that solves the problem... If anyone had faced similar problem please explain step by step and with details how you had solved it?!?!
If I directly run command mongod I get:
2020-06-04T01:19:41.351+0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-06-04T01:19:41.355+0200 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] MongoDB starting : pid=24712 port=27017 dbpath=/data/db 64-bit host=Air-de-Ruslan.home
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] db version v4.2.7
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] git version: 51d9fe12b5d19720e72dcd7db0f2f17dd9a19212
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] allocator: system
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] modules: none
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] build environment:
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] distarch: x86_64
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] target_arch: x86_64
2020-06-04T01:19:41.355+0200 I CONTROL [initandlisten] options: {}
2020-06-04T01:19:41.355+0200 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Permission denied
2020-06-04T01:19:41.355+0200 F - [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 684
2020-06-04T01:19:41.355+0200 F - [initandlisten]
***aborting after fassert() failure
and if I run directly command mongo I get:
MongoDB shell version v4.2.7
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
2020-06-04T01:21:20.317+0200 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-06-04T01:21:20.320+0200 F - [main] exception: connect failed
2020-06-04T01:21:20.320+0200 E - [main] exiting with code 1
SOLVED
I had to remove /usr/local/bin/brew-services.rb with the command
rm /usr/local/bin/brew-services.rb it could ask for permissions so add
sudo rm /usr/local/bin/brew-services.rb.
After that I tried running brew services start mongodb-community#4.2 and I got
Successfully started mongodb-community (label: homebrew.mxcl.mongodb-commu
but when I put mongo from different terminal to start the shell I got
Socket exception errorso I checked also the mongod.log file and I saw it was a socket issue so I tried
ls -ls /tmp/mongodb-27017.sock
and I got
0 srwx------ 1 root root 0 June 04 14:51 /tmp/mongodb-27017.sock
that means the owner is root and mongodb cant access it so I did
sudo rm -rf /tmp/mongodb-27017.sock
to delete the file and then start again mongodb with
brew services start mongodb-community#4.2 that created new .sock file whose owner is directly mongodb or the actual user whoami and when I checked again
ls -lsah /tmp/mongodb-27017.sock
I proved I am the owner and then I could open new terminal and run mongo and get in with enabled connection and use the shell!
Tested on macos Big Sur and mongodb-community#5.0.1
If you're using homebrew and upgraded to mongodb-community#5.0, you may encounter with error when starting the mongodb-community service.
Use rm -rf /usr/local/var/mongodb to remove previous dbpath folder if exists then create it again using cd /usr/local/var && mkdir mongodb.
Then brew services start mongodb-community should work fine.
On MacOS Big Sur (tested for mongodb-community#5.0), the following always returns an error (which means mongodb-community service will be loaded automatically) :
~ brew services start mongodb-community
mongodb-community error zaffer /Users/zaffer/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
By default mongodb-community configuration is stored in /usr/local/etc/mongod.conf
By default the dbpath parameter is set as /usr/local/var/mongodb
On analyzing the logs, I found that the problem is mostly related to permissions of this folder /usr/local/var/mongodb
The following worked for me :
~ cd /usr/local/var/mongodb
~ sudo chown -R $(whoami) .
~ cd ..
~ sudo chown -R $(whoami) mongodb
~ brew services restart mongodb-community
If you are still facing problems, I suggest changing file permissions of all files of this folder (/usr/local/var/mongodb) :
~ chmod -R 777 /usr/local/var/mongodb
~ brew services restart mongodb-community
or use sudo if permission is denied
~ sudo chmod -R 777 /usr/local/var/mongodb
~ brew services restart mongodb-community
If you are still facing issues, observe the errors when running mongod as a background process using one of the following :
~ mongod
~ mongod --dbpath /usr/local/var/mongodb
~ mongod --config /usr/local/etc/mongod.conf
You may also encounter problems when upgrading from a lower version of mongodb-community, for eg. upgrading from 3.6 to 5.0, in my case, I was inclined towards saving the existing databases, otherwise I could have created a new folder for mongodb data, and updated the dbpath in /usr/local/etc/mongod.conf configuration file.
The recommended way to do this is to do an incremental upgrade, i.e. upgrade from 3.6 to 4.0, then 4.0 to 4.4, then 4.4 to 5.0. What this does is it sets the recommended compatibility versions for migrating the data from one version to another. You can set the compatibility versions manually from mongodb shell using (for this, you need a working mongodb server):
> db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
link to doc : https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/

MongoDB Catalina: connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017

I just updated my mac to Catalina 10.15.2 and I can't running MongoDB.
When I send the command mongo I receive this message
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
and the only way to make Mongo work is to restart the Mac.
If I check the process with the command ps I don't see the process already on and the port 27017 is available.
I already tried to run the follow command:
brew tap mongodb/brew
brew reinstall mongodb-community
brew services restart mongodb-community
and if I run the follow command:
ps aux | grep -v grep | grep mongod
no results.
I tried to run mongod before mongo as well and the result is:
2019-12-18T12:17:45.916+0100 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] MongoDB starting : pid=9375 port=27017 dbpath=/data/db 64-bit host=Marcos-MacBook-Pro.local
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] db version v4.2.1
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] git version: edf6d45851c0b9ee15548f0f847df141764a317e
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] allocator: system
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] modules: none
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] build environment:
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] distarch: x86_64
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] target_arch: x86_64
2019-12-18T12:17:45.920+0100 I CONTROL [initandlisten] options: {}
2019-12-18T12:17:45.920+0100 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Permission denied
2019-12-18T12:17:45.920+0100 F - [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 693
2019-12-18T12:17:45.920+0100 F - [initandlisten]
***aborting after fassert() failure
Someone can help me please? I appreciate it
An alternative way to fix this Catalina Mac OS root & mongodb connection issue, do the following:
Install Homebrew, if you have it, reinstall it again
run the following commands in the terminal
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew untap mongodb/brew && brew tap mongodb/brew
brew install mongodb-community#4.2
The issue is mongo cannot find /db/data because there is no directory, so you have to create one:
cd ~ (this should take you to your Users folder)
from the Users folder make your own db/data folder by running the follow commands:
mkdir db & cd inside db folder
inside the db folder run: mkdir data & cd inside data folder
run this command: mongod --dbpath ~/data/db
(inside the Users/data/db/ folder you just created)
Now open a new terminal tab &
run: cd ~ (brings you back to Users) -> now run : cd .. & cd .. again (do this twice)
(now you should be in the folder before Users)
(now find tmp folder) cd into the /tmp folder
delete the sock file (this is giving you connection issues)
delete it by running: rm -rf mongodb-27017.sock
now run command: mongo (this should work now)
inside mongo shell run command: db.verion()
if you see a version, your connection works.
From now on to run mongodb database & connection you will have to have two separate tabs open at all times whenever you want to work on your projects
Example:
in one terminal tab run command -> mongod --dbpath ~/data/db
(this starts the connection)
in the other terminal tab run command: mongo
(this starts the shell)
These both have to be running..
Side Note:
you no longer need to start
the connection by running
brew services start mongo-community anymore.
remember mongod --dbpath ~/data/db is basically -> mongod command now.. The Mac OS Catalina Update created root permission problems, that is why mongod command alone never worked before.
Hope this helped you. Goodluck.
Faced a similar issue with macOS Big Sur. After trying all the approaches mentioned above including
updating homebrew
reinstalling MongoDB, MongoDB community and setting up a /System/Volumes/Data/data/dbfolder
This command worked for me mongod --dbpath=/System/Volumes/Data/data/db
reference: https://medium.com/codespace69/mongodb-troubleshooting-errors-for-beginners-and-macos-catalina-31befd99f6c8
This error is caused due to ownership issues.
Here we are changing the ownership to 'mongodb' user.
Command 1: deletes the /tmp/mongodb-27017.sock file
$sudo rm -rf /tmp/mongodb-27017.sock
Command 2: starts mongod service
$sudo service mongod start
Command 3: shows the file with its ownership details
ls -lsah /tmp/mongodb-27017.sock
output
0 srwx------ 1 mongodb mongodb 0 Aug 24 04:01 /tmp/mongodb-27017.sock
Got the same issue after upgrading to Catalina. Tried lots of ways to solve the issue, what eventually helped was reinstalling brew, and then following steps listed on official mongodb site.
So:
Uninstall brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)
Install it again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Follow steps to install and run monbo service:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

apache-zeppelin 0.8.0 installation while using home brew on mac OS

i have installed java version "1.8.0_181", scala, apache-spark, apache-zeppelin using home brew, and there is no error showed up while these installations.
If i ran $ spark-shell in the terminal, it shows warn but still called up scala as below:
However, while i opened http://localhost:8080/#/ and ran sc.version, it shows error as bellow:
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)
at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)
at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1394)
at scala.tools.nsc.Global$Run.<init>(Global.scala:1215)
at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:432)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:855)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:813)
at scala.tools.nsc.interpreter.IMain.bind(IMain.scala:675)
at scala.tools.nsc.interpreter.IMain.bind(IMain.scala:712)
at scala.tools.nsc.interpreter.IMain$$anonfun$quietBind$1.apply(IMain.scala:711)
at scala.tools.nsc.interpreter.IMain$$anonfun$quietBind$1.apply(IMain.scala:711)
at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:214)
at scala.tools.nsc.interpreter.IMain.quietBind(IMain.scala:711)
at scala.tools.nsc.interpreter.ILoop.scala$tools$nsc$interpreter$ILoop$$loopPostInit(ILoop.scala:891)
at jdk.internal.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.zeppelin.spark.BaseSparkScalaInterpreter.callMethod(BaseSparkScalaInterpreter.scala:270)
at org.apache.zeppelin.spark.BaseSparkScalaInterpreter.callMethod(BaseSparkScalaInterpreter.scala:262)
at org.apache.zeppelin.spark.SparkScala211Interpreter.open(SparkScala211Interpreter.scala:84)
at org.apache.zeppelin.spark.NewSparkInterpreter.open(NewSparkInterpreter.java:102)
at org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:62)
at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:617)
at org.apache.zeppelin.scheduler.Job.run(Job.java:188)
at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:140)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
how could i figure this problem?
I had multiple issues with home brew installation, but running with docker worked for me(http://zeppelin.apache.org/download.html#using-the-official-docker-image
):
"Use this command to launch Apache Zeppelin in a container.
docker run -p 8080:8080 --rm --name zeppelin apache/zeppelin:0.8.0
To persist logs and notebook directories, use the volume option for docker container.
docker run -p 8080:8080 --rm -v $PWD/logs:/logs -v $PWD/notebook:/notebook -e ZEPPELIN_LOG_DIR='/logs' -e ZEPPELIN_NOTEBOOK_DIR='/notebook' --name zeppelin apache/zeppelin:0.8.0
If you have trouble accessing localhost:8080 in the browser, Please clear browser cache."
In my case it was the problem of having a Java10 installed prior to Java8. Apparently, Java version above 8.0 are not yet supported by Spark. The problem is fixable by setting the JAVA_HOME environment variable to your Java8 installation.
If you don't have it:
brew cask install java8
and the default location for MacOs should be:
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"
If you launch your zeppelin server via the zeppelin-deamon.sh, then just add the export above at the beginning of the file.
You should find the zepplin-deamon.sh true file location and if you installed zeppelin via homebrew, it should be in:
/usr/local/Cellar/apache-zeppelin/0.8.1/libexec/bin/zeppelin-daemon.sh

Resources