I recently started using Amazon AWS Elastic Beanstalk to configure Auto Scaling to an Wordpress site. To do so, I've been strictly following this tutorial. But when I attempt to Upload and Deploy my app for the first time (as explained in tutorial's step "Configure and Deploy Your Application"), I get stuck with Beanstalk running the deploy, without completing it. There's no troubleshooting, just this continuous deploy. Does anyone have any idea what could be going on?
EDIT 1 - An update: after 15 minutes trying to deploy, it stopped by itself, throwing the errors:
Creating security group ingress named: AWSEBSecurityGroupSSHIngress failed Reason: CIDR block <MY_TOO_SENSITIVE_TO_DISPLAY_IP> is malformed (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: <MY_TOO_SENSITIVE_TO_DISPLAY_ID>)
And
Creating security group ingress named: sshfromhome failed Reason: CIDR block <MY_TOO_SENSITIVE_TO_DISPLAY_IP> is malformed (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: <MY_TOO_SENSITIVE_TO_DISPLAY_ID>)
Okay, it was a dumb mistake of mine: I wrote the IP's in the .extensions/dev.config file using the format X.X.X.X, instead of the correct CIDR block pattern X.X.X.X/X.
Related
I'm new to BTC development, so sorry if I get any key words wrong!
My Setup:
I'm using: https://github.com/denpamusic/php-bitcoinrpc
In a Laravel Application.
I've downloaded BTC testnet locally.
Developing on my spare PC, A windows 10, using xxamp as my Linux laptop is dead :(
My network facing IP is 192.168.1.184, I've tried 127.0.0.1 and same issue described below.
My bitcoin.conf file
testnet=1
rest=1
txindex=1
disablewallet=1
printtoconsole=1
rpcuser=user
rpcpassword=pass
rpcallowip=192.168.1.184
My Main Controller method:
public function index()
{
$ip = '192.168.1.184';
$bitcoind = new BitcoinClient('http://user:pass#'.$ip.':18333');
$block = $bitcoind->getinfo();
dd($block);
}
When I ping my application via a web link I get this error:
Denpa\Bitcoin\Exceptions\ConnectionException
cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
And I don't know why. I've used other Api calls from this list: https://en.bitcoinwiki.org/wiki/Original_Bitcoin_client/API_calls_list and get the same result.
Is there any 'better' tutorial or BTC for dummies sites out there?
Eventually I just want to be able to Scan the ledger for incoming payments to my wallet address, then pay various people 'automatically' based on my own settings.
So my questions:
Any thoughts on my Empty reply issue?
Does anyone know if this repo can be used to send payment instructions to a wallet?
Many thanks for reading!
So, I did lots of tweaking, poking and testing.. nothing worked.
I decided to just do a fresh Laravel install and just add a single package, the one listed above.. and it worked instantly.
Urgh, I love tech sometimes...
I have recently built a mobile app in React-Native along with its associated backend Laravel application / SQL database. The app and database have been tested on a locally hosted server and I am ready to deploy.
I deployed the application and database to AWS Elastic Beanstalk following the tutorial
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-laravel-tutorial.html
The app was deployed successfully and I set up the DB as well in the Elastic Beanstalk Console.
The only problem was to run the schedule.
I have no idea of how to do it!
I tried to create a cron job following the
https://medium.com/#joelennon/running-cron-jobs-on-amazon-web-services-aws-elastic-beanstalk-a41d91d1c571
I created a cron.yaml file at the root of my project, like this.
version: 1
cron:
— name: "schedule"
url: "/schedule"
schedule: "0 */12 * * *"
And then I deployed it on AWS Elastic Beanstalk.
The configuration file cron.yaml in application version 69degrees-16
contains invalid YAML or JSON. YAML exception: Invalid Yaml: while
parsing a block mapping in "", line 3, column 2: — name:
"schedule" ^ expected , but found BlockMappingStart in
"", line 4, column 4: url: "/schedule" ^ , JSON exception:
Invalid JSON: Unexpected character (v) at position 0.. Update the
configuration file.
In a word, what I want is to run the schedule on AWS. How can I do it?
I had the same problem as you and I came across your subject empty of answer.
Finally, I found the solution! You need replace the character (em dash) — by (hyphen-minus) -. The difference is small but that's what corrected my mistake.
I am trying to take backup of my website`s files and database and upload it to google drive from my website via Google drive Api.
Followed instructions as per these links - backup files to google drive using php
https://www.matthewhipkin.co.uk/codelib/automatically-backing-up-your-web-server-files-to-googledrive-with-php/ and did the following -
downloaded the backupgoogledrive folder from https://github.com/hippy2094/backuptogoogledrive and uploaded that in my public_html/backup folder and renamed backuptogoogle.php as backup/index.php
I created the client ID, client secret and an authCode and put those in the setting.inc along with my MySQL username, password and database name. $homedir was put as /home/myuser/ and $sitedir was set to public_html/
Then, I ran in SSH - php /home/user/backup/index.php
This ran fine generating a json file and backup for files and database also was found in google drive.
Then, I set up cron job as follows -
5 0 * * 6 /usr/local/bin/php /home/myusername/public_html/backup/index.php
This should run the script at 00:05 on a saturday but it did NOT run or backup to google drive.
After that, I changed the cron to run every 15 minutes. I noticed that the files and database backups are going to home/myuser folder instead of google drive and the error_log in that folder is giving this error every 15 minutes -
Fatal error: Uncaught exception 'Google_AuthException' with message
'Error fetching OAuth2 access token, message: 'invalid_grant'' in
/home/myuser/public_html/backup/google-api-php-client/src/auth/Google_OAuth2.php:115
Stack trace:
#0
/home/myuser/public_html/backup/google-api-php-client/src/Google_Client.php(127):
Google_OAuth2->authenticate(Array, '4/SCxgUoxjnbe_0...')
#1
/home/myuser/public_html/backup/index.php(38):
Google_Client->authenticate('4/SCxgUoxjnbe_0...')
#2 {main} thrown in
/home/myuser/public_html/backup/google-api-php-client/src/auth/Google_OAuth2.php
on line 115`
Please note while registering at Google API at https://console.developers.google.com/apis I selected Other option in the Credentials Page and not Web Application because my aim is only to take backup for my site. Also, when I selected the Web Application option and generated the client ID and secret and tried to generate the authCode via url generated in SSH, it would give an error with the SSH generated url. So, the solutions for invalid grant which are mentioned in other posts do not work for me as I do not get option for setting call back url.
Please tell what I am doing wrong. Why I am able to run the script successfully manually and not via cron ? When I am running the script manually running in SSH. Only problem happens when cron runs.
Thanks in advance.
Found the solutions as follows -
Put in the file index.php this code -
chdir('/home/user/backup');
Then the cron backed - up the file to google drive properly. So, the problem was with the cron path.
We have Redmine & Testlink hosted on 2 different servers on Amazon Cloud.
I used below methods / workarounds to establish a connection between these two, however I am getting "Something is preventing to connect to bug tracking system, it will create performance issue..." on Execute Test page of testlink.
Made below configuration in Issue Tracker Management under
Redmine(interface:rest)
<issuetracker>
<apikey>3fe68920f3cf</apikey>
<uribase>https://odessa.sharred.net</uribase>
<uriview>https://odessa.sharred.net/redmine/CM/issues/</uriview> <!-- for Redmine 1.x add show/ -->
<projectidentifier>Common</projectidentifier>
</issuetracker>
Enabled API from redmine.
Made settings in C:\xampp\htdocs\testlink\third_party\redmine-php-api\lib\redmine-rest-api.php for curl_setopt() to allow to use HTTPS.
Tried giving Redmine Base URL using IP ADDRESS instead of Host name.
Do not see any relevant logs in testlink's events section.
Added entry of redmine in config.inc.php with $g_interface_bugs='REDMINE';
Also observed that URL given in URIBASE is opening in web browser with parameter passed as key i.e. https://odessa.sharred.net?key=3fe68920f3cf
is accessible from testlink server.
Any insight / solution on this issue will be great help.
Your configuration should look something like this.
<issuetracker>
<apikey>3fe68920f3cf</apikey>
<uribase>https://ServerIP/redmine</uribase>
<uriview>https://ServerIP/redmine/issues/</uriview>
<projectidentifier>CM</projectidentifier>
</issuetracker>
I also had trouble and just got it working now.
If you still have issue goto http://TLServerIP/testlink/lib/events/eventviewer.php and check the error
Similarly you can go to //redmineinstalldir/apps/redmine/htdocs/log/production.log to see what error you are getting after you click test connection on testlink
I'm trying to get my first (PHP) application working. It works OK in Google App Engine Launcher, but when I try to deploy it I get the following message:
2014-08-19 15:37:58 Running command: "['C:\\Program Files\\Python\\pythonw.exe', '-u', 'C:\\Program Files\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=by#onetel.com', '--passin', 'update', 'C:\\Documents and Settings\\Barry\\My Documents\\test\\high-winter-668']"
03:38 PM Application: high-winter-668; version: 1
03:38 PM Host: appengine.google.com
03:38 PM
Starting update of app: high-winter-668, version: 1
03:38 PM Getting current resource limits.
Password for b...#...com: Invalid username or password.
2014-08-19 15:38:08,967 ERROR appcfg.py:2411 An error occurred processing file '': HTTP Error 401: Unauthorized. Aborting.
Error 401: --- begin server output ---
Must authenticate first.
--- end server output ---
I can login OK to the application I created at appengine.google.com
and I am using the right/same email address and password.
I can see other topics where server/local time difference is the issue. My local PC time is the same as the time in the above error msg.
What have I got wrong?
Also:
I tried using appcfg.py on the command line and ran into another issue:
It errored saying I didnt have a "high-winter-668.yaml" file. So I changed the name of my "app.yaml" to "high-winter-668.yaml" - it then complained that I didnt specify a 'module" in the yaml file.
Meantime Google App Engine Launcher errored say I didnt have an "app.yaml" file.
Are they written by different companies!!??
Well, in floundering around I've found an answer.
I went here:
https://www.google.com/settings/security/lesssecureapps
and selected "Enable" less secure devices and apps to access your data.
When I tried to Deploy - it worked.
THIS WILL HAPPEN IF YOU HAVE 2-FACTOR authentication activated. The solution in that case is to go to the application-specific passwords page and generate a new password. You can name it "Google app engine" or the like and you'll get a long alpha string to use as the password when deploying.
If you use Google App Engine Launcher and have 2-factor in use you are guaranteed to run into this error on deploy (current version 1.9.17), and it has been that way for at least 1.5 years. It seems like the app engine launcher folks could trap that error and generate a helpful message but instead maybe you'll find it on stackoverflow :)
This happenned to me because I forgot the version line in app.yaml:
version: 1