Apache Open meetings run locally for development - java

I am aiming to use Open meetings in my project. Before doing that, I was starting with some UI colour changes and check the system on my local machine. For doing this, I cloned the Git repository https://github.com/apache/openmeetings .
After this, executed the command: mvn clean install -PallModules
*Working with Java version 11 and mvn version 3.6.3
After the execution, build generates successfully:
After this, as mentioned in git, I followed following steps:
go to openmeetings-server/target directory
extract apache-openmeetings-x.x.x.tar.gz (or apache-openmeetings-x.x.x.zip for windows) to new directory
enter to this new directory and execute ./bin/startup.sh (./bin/startup.bat for Windows)
Results says, Tomcat started. Also with command netstat -lntp, I can see port 5080 is occupied by a java jar.
But, the problem is when i open http://localhost:5080, it successfully redirects me to http://localhost:5080/openmeetings/ but shows site can't be reached.
This is very weird, please help!

Build instructions and helpful commands are here
https://openmeetings.apache.org/BuildInstructions.html
I would recommend to use unpacked build
OM at http://localhost:5080/openmeetings works for me as expected
(I would recommend to use it at https://localhost:5443/openmeetings overwise Camera&Microphone will be blocked by browser)
Is it possible your request is being blocked by FW?
P.S. I'm one of OpenMeetings devs

Related

How to run a Java application on Ec2?

I want to deploy a a project to ec2. It was modify in Intellij which used MAVEN. It work perfect in Intellij. Below is the configuration of Intellij.
I have tried command line like java, javac. These kind of comment lines are all failed. I am wondering there must some way to convert Intellij configuration to command lines. I was relying too much on IDE. XD. Now I am regreted.
EC2 is the amazon cloud service for instances. If you aren't very experienced with it - the easiest you can do is to hire a machine with your fav operating system - for example Windows and use remote desktop to log in it and just do your normal IDE setup and run your app. You will have your app running on your instance and it will be working, even it is done the hard way. I will get downvotes for that, but it will work as a Swiss watch.
It depends from the kind of EC2 instance you're using.
For me would be simpler if it was a Linux instance.
I'll connect via ssh and git clone my project there from my bitbucket/github repository.
Then I'll use Maven, and there are many different options to run your project with Maven.
As suggested in the comments you could use the exec plugin.
But even in this way you'll have a list of problems to overcame.
For example your linux instance does not came with an preinstalled Java Runtime.
You have to install at least Java and Maven (choose ubuntu distro, so you can do easily with a package manager like apt-get).
Or, for example, another not easy task is connect via ssh to a Linux instance.
AWS generates a key.pem file that you have to use in order to successfully connect to your instance.
ssh -i .ssh/your-key-file.pem username#your-ec2-instance-address
And again, AWS does not tell you the name of the default user you must use to connect to your EC2 instance (if you choose ubuntu distro the username is ubuntu).
And again, when you save your-key-file.pem in your computer it must have the right permission
-rw-------# 1 freedev staff 1692 Apr 21 09:46 /Users/freedev/.ssh/your-key-file.pem
or your ssh client wont read it.
...looking back it was really a long way make a deploy on a EC2 instance.
I have solved it by myself.
Use mvn package to generated jar file for maven project.
nohup java xx.jar debug.xml & use this to run jar in shell. By using this command line, when exit (abort remote connection), the process / command will not get killed.
Command line jcmd is used to check running process pid.

Apache Ofbiz installation trouble

I have been trying to install Apache Ofbiz on my 32-bit processor computer, with Windows 7 as the operating system. I have downloaded Java\jdk1.8.0_25: and apache-ant-1.9.4: and :apache-ofbiz-13.07.01. I made two environmental variables, JAVA_HOME and ANT_HOME; in addition, I included both Java and Ant Apache Bin addresses respectively into the environmental the PATH variable. Then I ran the CMD and entered the Ofbiz directory' cd [apache ofbiz address], thenceforward, I resumed into entering the the 'ant run-install' command, followed by 'ant run-install-seed', I received a 'build successful' message for both of the commands I entered. After the foregone commands were executed I proceeded into clicking the startofbiz located inside the apache ofbiz folder. A cmd screen opened listing all sorts of commands. Once all these were carried out I typed the following address into my internet search bar:
https://localhost:8443/webtools
Notwithstanding, I constantly received the following error message that says THE TEMPLATE LOCATION IS EMPTY even after a numberless amount of permutations, deleting java, re-installing Ant Apache, etc:
:ERROR MESSAGE:
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)
I have not been able to come to grasps with this issue. I don't believe things should be this difficult to install. I stand ready for any guidance, thank you.
As per my best knowledge " ant load-seed (Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an ualong with the code and needs to be in sync for operation)"
You need to fire ant load-demo start (if you're using OFbiz version 13.07.01).Please make your're at the root of the OFbiz project location. Fyi - At very first time it takes more than 20 mins to load all your demo data and seed data, so please be patient. Hope this will help you.
Note: Please rate this if find useful. Thanks
This issue is not related to your Application setup. it seems your Application setup is fine. This is related to Seed data. The data which requires to initialize the default theme. To load the theme data, execute the following ant command then strat the application. The error should be disappeared now.
ant load-seed
Since OFBiz switched from ant to gradle recently, the correct command to load the seed data is as follows (run in root ofbiz folder e.g. /opt/ofbiz and don't forget the quotes):
./gradlew "ofbiz --load-data readers=seed"
To get the available options for the ofbiz build, run:
./gradlew "ofbiz --help"
Other ant-to-gradle hints can be found here.
You will then need to create an initial user (admin/ofbiz does only exist in demo data).
./gradlew loadAdminUserLogin -PuserLoginId=MyUserName

Configuring Jenkins with Bitbucket

I seem to have got stuck trying to link Jenkins (an EC2 AWS instance of Ubuntu) with Bitbucket.
Whenever I try to build my project (I've installed the git plugin on Jenkins) I get...
Building in workspace /var/lib/jenkins/jobs/Google adwords/workspace
Checkout:workspace / /var/lib/jenkins/jobs/Google adwords/workspace - hudson.remoting.LocalChannel#2c473996
Using strategy: Default
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone git#bitbucket.org:DAVID99WORLD/assessme.git
hudson.plugins.git.GitException: Could not clone git#bitbucket.org:DAVID99WORLD/assessme.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:268)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1122)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: hudson.plugins.git.GitException: Command "git clone --progress -o origin git#bitbucket.org:DAVID99WORLD/assessme.git /var/lib/jenkins/jobs/Google adwords/workspace" returned status code 128:
stdout: Cloning into '/var/lib/jenkins/jobs/Google adwords/workspace'...
stderr: Host key verification failed.
fatal: The remote end hung up unexpectedly
Fine - this looks like it's trying to go over ssh but can't find the keys. So I'm trying to generate the keys, under ~/.ssh I've got the files authorized_keys and known_hosts but according to the documentation here...
https://confluence.atlassian.com/display/BITBUCKET/How+to+install+a+public+key+on+your+bitbucket+account
I should have a file under ~/.ssh called id_rsa
I've been following the documentation...
https://confluence.atlassian.com/display/BITBUCKET/Using+the+SSH+protocol+with+bitbucket
But it looks almost either half finished or I'm missing the bit where the key gets put in the correct file.
Firstly - is my assumption correct this is an ssh issue? Secondly, if it is, does anyone know how to get the keys to match so Jenkins can make the pull and build?
EDIT : I assumed it was an ssh issue as the question Jenkins Build Using Git with Deploy Key was related, but I'm using bitbucket rather than github.
You need to generate the key file to upload to your BitBucket account. From the user that is running Jenkins, do the following:
ssh-keygen -t rsa
Take the default for the key file location and leave the passphrase blank. You'll then have the ~/.ssh/id_rsa.pub file to upload to BitBucket.
I was reading this post because I had the same problem and I have found something useful right now.
MY CONFIGURATION
I have a slave building server (Win7-64 machine) where I have installed the standard Git (during installation I chose the third option: "Run Git and included Unix tools from the Window command prompt".)
Jenkins is configured with Java Web Start.
I have noticed that if I execute from Git shell the command
ssh -vT git#bitbucket.org
I can authenticate with the server getting the message
You can use git or hg to connect to Bitbucket. Shell access is disabled.
BUT if i execute the same command from cmd, I get
Permission denied (publickey)
I'm not sure, but I think that Git plugin execute commands from the window shell and not with git shell (as I expected), so this could determine an authentication problem in the build.
In Git Plugin docs there is a little section called "Some windows fun" that suggest to copy the .ssh user's folder under Git folder (in my case C:\Program Files (x86)\Git).
After doing so, from windows shell I ran ssh -vT git#bitbucket.org and it worked (if it doesn't work, try to restart the shell or the entire machine).
Then I ran the build from Jenkins and finally it worked.
I hope this could help.
Good luck.

Eclipse Google Plug-In doesn't start server for web application

I want to try the Google Eclipse plug-in for the Google App Engine, but I get stuck in the tutorial...
I want to start the web application from the Google tutorial, but when I click on "RUN AS > Web Application", I only see this message on the console:
Usage: <dev-appserver> [options] <war directory>
Options:
--help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest
-s SERVER SDK version.
--address=ADDRESS The address of the interface on the local machine
-a ADDRESS to bind to (or 0.0.0.0 for all interfaces).
--port=PORT The port number to bind to on the local machine.
-p PORT
--sdk_root=root Overrides where the SDK is located.
--disable_update_check Disable the check for newer SDK versions.
What's the problem? It seems like the command to start the server is wrong, but I haven't edited it... can someone help?
It is because your launch configuration file (location: WORKSPACE/.metadata/.plugins/org.eclipse.debug.core/.launches)is corrupt. All you need to do to solve this problem is to delete the existing launch configuration (in Run > Run configurations)
Check if your Eclipse Project or GAE SDK has spaces in the path.
The problem occurs when using blank spaces in the project name.
"Run Configurations> Arguments > Program Arguments", insert quotation marks in the project path. i.e.:
--port=8888 --disable_update_check {PATH}\My Project
To:
--port=8888 --disable_update_check "{PATH}\My Project"
I found it from this thread
Thanks a lot
Some additional information to what's already been said.
You need to install "m2eclipse" otherwise you will not have the "run as" option.

how to use appcfg.py for google-app-engine projects created using google's eclipse plugin?

I have created a google-app-engine java project in Eclipse using Google's Eclipse plugin. My previous attempt to deploy failed. Now, when I retry, I get the following message:
Unable to update app: Error posting to URL : http://appengine.google.com/api/appversion/create?app_id=mybdaywisherversion=1
409 conflict
Another transaction for this user is already in progress for this app and major version. That user can undo the transaction with appcfg.py's "rollback" command.
Now, I have always used the google-app-engine features from inside Eclipse only and have not a clue how to run the appcfg.py command.
Could not get much help from documentation available over the internet. The only thing I could make out was for mac (I'm on mac), the command to be used is appcfg.sh. Inside Eclipse, I looked where App-Engine SDK is located on my machine and went to that location.
Even found appcfg.sh there. But when I try to run it, it only reports the error "command not found". Tried various alternatives to run it (like tried running it with sudo, tried running it as ./appcfg.sh by going to whether its located) but no success
Can someone please tell me the step I will have to follow to run the apcfg command?
As the result of an Internal Server Error during app deployment,
I am now left with a pending transaction, that I need to rollback
before I can deploy again.
Creating staging directory
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
java.io.IOException: Error posting to URL:
409 Conflict
Another transaction by user is already in progress for this app and major
version. That user can undo the transaction with appcfg.py's "rollback"
command.
this was how I did it (all from the command line) which is a slightly simpler
method, which achieved the same effect.....
C:\Documents and Settings\Amit\My Documents\newproject>"C:\Program
Files\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-java-sdk-1.2.5\bin\appcfg"
rollback war
Reading application configuration data...
2009-09-17 20:47:35.859::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
Beginning server interaction for idebanet...
0% Rolling back the update.
Success.
Cleaning up temporary files...
C:\Documents and Settings\Amit\My Documents\newproject>
Courtesy:JOHN
I dont think these answers were that helpful.
using the commmand line cd into you application directory. for me this is
cd /Sites/appengine_myapp
Now you have done this.
appcfg.py --no_cookies --email=YOUR_EMAIL_HERE#gmail.com --passin rollback ./
You should be prompted for your password.
Try running appcfg.py with rollback option. See the docs:
appcfg.py [options] rollback
Undoes a partially completed update for the given application. You
can use this if an update was
interrupted, and the command is
reporting that the application cannot
be updated due to a lock.
for mac / linux user:
1.cd /"sdkdirectory"/bin
2. chmod +x appcfg.sh
3. ./appcfg.sh -s appengine.google.com -e XXX#Gmail.com rollback /Users/"...."/workspace/yourapp/war
Better perspective gained about the problem.
Documenting the problem here for the benefit of on-lookers:
I was using Google's Plugin for Eclipse for a Google App Engine project. An attempt to deploy the application on app-engine server failed because of network problems. Subsequent attempts were failing because the previous attempt had created some kind of lock and that transaction had to be rolled back. The plugin does not provide any way to do this. One has to use appcfg program over command line to rollback. http://code.google.com/appengine/docs/java/tools/eclipse.html has details. The problem I was facing was occuring becuase of OS level permissions on appcfg.sh. Ga ve permission to self using chmod and could get it working.
When you are using Linux, try a solution posted in this link:
http://www.patternizando.com.br/2011/04/another-transaction-that-user-can-undo-the-transaction-with-appcfg-pys-rollback-command-gae/
for deploying your application using command line , follow these steps:
cd "/Library/Google/google_appengine"
./appcfg.py update "path-to-project/src"
you will be prompted for your email and password.
I was having issues to run those appcfg provided by Eclipse. I had to install Python+ App Engine sdk for python and benefit from appcfg.py functinnalities. It was on Windows though.

Categories