Deploy ASP.NET Application to AWS - asp.net

I have problem while I deploy application to AWS. I have never done this part of job before, and when I deploy from Visual Studio I get error message
2018-07-03 12:23:53,788 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Loading hosted file 'flags/us.png' from local path 'C:\Users\denni\AppData\Local/AWSToolkit/downloadedfiles/flags/us.png'
2018-07-03 12:27:27,008 [53] INFO Amazon.AWSToolkit.MobileAnalytics.AMAServiceCallHandler - Reponse from AMAClient.PutEvents(request) meta data: Amazon.Runtime.ResponseMetadata, response HttpStatusCode: Amazon.Runtime.ResponseMetadata
2018-07-03 12:35:27,857 [1] INFO Amazon.AWSToolkit.VisualStudio.Shared.VSWebProjectInfo - EnvDTEProject.FullName lookup yielded 'C:\Users\denni\Desktop\JerrichoTerrace\JerichoTerrace\JerichoTerrace\JerichoTerrace.csproj'
2018-07-03 12:35:27,905 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Null/empty hosted files location override
2018-07-03 12:35:27,905 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Loading hosted file 'CloudFormationTemplates/TemplatesManifest.xml' from local path 'C:\Users\denni\AppData\Local/AWSToolkit/downloadedfiles/CloudFormationTemplates/TemplatesManifest.xml'
2018-07-03 12:35:28,038 [1] INFO Amazon.AWSToolkit.MobileAnalytics.SimpleMobileAnalytics - Queuing analytics event in local queue with timestamp: 07/03/2018 10:35:28
2018-07-03 12:35:28,038 [1] INFO Amazon.AWSToolkit.MobileAnalytics.SimpleMobileAnalytics - Queuing analytics event in local queue with timestamp: 07/03/2018 10:35:28
2018-07-03 12:35:28,102 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Null/empty hosted files location override
2018-07-03 12:35:28,102 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Loading hosted file 'flags/us.png' from local path 'C:\Users\denni\AppData\Local/AWSToolkit/downloadedfiles/flags/us.png'
2018-07-03 12:35:28,150 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Null/empty hosted files location override
2018-07-03 12:35:28,150 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Loading hosted file 'AccountTypes.xml' from local path 'C:\Users\denni\AppData\Local/AWSToolkit/downloadedfiles/AccountTypes.xml'
2018-07-03 12:35:28,166 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Null/empty hosted files location override
2018-07-03 12:35:28,166 [1] INFO Amazon.AWSToolkit.S3FileFetcher - Loading hosted file 'AccountTypes.xml' from local path 'C:\Users\denni\AppData\Local/AWSToolkit/downloadedfiles/AccountTypes.xml'
2018-07-03 12:35:36,491 [1] INFO Amazon.AWSToolkit.MobileAnalytics.SimpleMobileAnalytics - Queuing analytics event in local queue with timestamp: 07/03/2018 10:35:36
2018-07-03 12:35:40,945 [1] INFO Amazon.AWSToolkit.MobileAnalytics.SimpleMobileAnalytics - Queuing analytics event in local queue with timestamp: 07/03/2018 10:35:40
2018-07-03 12:35:42,709 [37] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - Publishing 'JerichoTerrace' to Amazon Web Services
2018-07-03 12:35:42,741 [57] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ..building configuration 'Debug|Any CPU' for project 'JerichoTerrace'
2018-07-03 12:35:52,725 [1] INFO Amazon.AWSToolkit.VisualStudio.BuildProcessors.WebAppProjectBuildProcessor - IVsUpdateSolutionEvents.UpdateSolution_Done, fSucceeded=1, fModified=1, fCancelCommand=0
2018-07-03 12:35:53,029 [57] INFO Amazon.AWSToolkit.VisualStudio.BuildProcessors.WebAppProjectBuildProcessor - Project build completed successfully, starting package build
2018-07-03 12:35:53,036 [57] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ..creating deployment package obj\Debug\Package\JerichoTerrace.zip...
2018-07-03 12:35:53,077 [50] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ....packaging - executing target(s) "Build;Package"
2018-07-03 12:36:02,400 [21] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ....packaging - Csc: build warning: 'Controllers\EstimatesViewModelsController.cs' at (581,41): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
2018-07-03 12:36:15,260 [8] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ....packaging - CreateProviderList: build error: 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets' at (55,5): Web deployment task failed. (Cannot connect to the database 'MojaBaza'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CANNOT_CONNECT_TO_DATABASE.)
Cannot connect to the database 'MojaBaza'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CANNOT_CONNECT_TO_DATABASE.
Object of type 'dbFullSql' and path 'data source=DESKTOP-0L8HK6U\SQLEXPRESS;initial catalog=MojaBaza;integrated security=True;user id=awsuser;pooling=False' cannot be created.
Failed to connect to server DESKTOP-0L8HK6U\SQLEXPRESS.
Cannot open database "MojaBaza" requested by the login. The login failed.
Login failed for user 'DESKTOP-0L8HK6U\denni'.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.
Failed to connect to server DESKTOP-0L8HK6U\SQLEXPRESS.
Cannot open database "MojaBaza" requested by the login. The login failed.
Login failed for user 'DESKTOP-0L8HK6U\denni'.
2018-07-03 12:36:15,260 [8] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ....packaging - project build completed with errors.
2018-07-03 12:36:15,260 [57] ERROR Amazon.AWSToolkit.VisualStudio.BuildProcessors.WebAppProjectBuildProcessor - Deployment package build failed to complete.
2018-07-03 12:36:15,260 [57] INFO Amazon.AWSToolkit.MobileAnalytics.SimpleMobileAnalytics - Queuing analytics event in local queue with timestamp: 07/03/2018 10:36:15
2018-07-03 12:36:15,260 [37] INFO Amazon.AWSToolkit.VisualStudio.AWSToolkitPackage - ..build of project archive failed, abandoning deployment
2018-07-03 12:37:28,061 [77] INFO Amazon.AWSToolkit.MobileAnalytics.AMAServiceCallHandler - Reponse from AMAClient.PutEvents(request) meta data: Amazon.Runtime.ResponseMetadata, response HttpStatusCode: Amazon.Runtime.ResponseMetadata
When I go to console.aws I found one field Upload and Deploy
So, will this field work If I deploy application in this step, will database will be deploy correctly. Guys, please help me

You need to change the database connection string.
You must use database connection string with userid and password. Remove integrated security=True;
And then you need to also check your database's user permission for your application.

Related

Artifactory - How to stop "Initializing Replicator registration"

Artifactory Pro 7.33.12 Running on SLES 12-SP5
I did not configure the Replicator in system.yaml or somewhere else.
After restart from Artifactory always appears in console.log (No problem. Message exists since installing Artifactory last year):
2022-04-26T10:47:12... [.c.r.ReplicatorServiceImpl:119] [art-init- initializing Replicator Service
2022-04-26T10:47:12..[c.r.ReplicatorServiceImpl:338] [art-init] - Local Replicator is setting up in non-bundled mode
But suddenly appearing messages by restarting Artifactory:
Info: Replicator is starting
Replicator configured successfully
Replicator Version:release/20220124145455-preRelease-jfpdn-7-30-x-rc.1
Supporting mime-type: application/java-archive
Supporting mime-type: application/x-nupkg
Supporting mime-type: application/x-tar
Supporting mime-type: application/zip
registering profiling endpoints:localhost:8041
Initializing internal http client
replicator service id:jfxfer#01fdsky4nnnd301nzwzzey1cb4
Using Artifactory Blob Store in address: http://localhost:8046/artifactory
Replicator listening on localhost:8048
And every minute:
Initializing Replicator registration
url: http://localhost:8046/artifactory/api/replicator/register
token: eyJ2ZXIiOi****
Replicator registration request was forbidden (make sure Enterprise Plus license installed)
$JFROG_HOME/artifactory/app/replicator/bin/replicator.sh status
Replicator is not running
ps -eaf|grep replicator
artifac+ 17911 1 0 15:21 ? 00:00:00 $JFROG_HOME/artifactory/app/replicator/bin/jf-replicator --replicatorHome=$JFROG_HOME/artifactory/app/replicator
To kill the process is no good idea.
Every 5 seconds appears:
Readiness test failed with the following error: "required node services are missing or unhealthy"
The insert in system.yaml
## REPLICATOR TEMPLATE
replicator:
## Set to true if using an Enterprise Plus license
enabled: false
#port: 8048
has no effect.
What happened and how to stop the Replicator?
Does anyone have an answer?

Openstack Keystone Authentication failure

I am new to Openstack. I installed Openstack using Packstack in my CentOS machine. When I try to login using the default keystone_admin credentials, it showed a server error.
Here is my keystone.log file. Can somebody help?
2020-05-07 03:13:57.097 2303 WARNING keystone.server.flask.application [req-8c75dc88-73f3-4605-8a6b-3ba515d9fd84 3a3280ddae08412ab1145c193b587161 - - default -] Authorization failed. The request you have made requires authentication. from 192.168.225.30: Unauthorized: The request you have made requires authentication.
2020-05-07 03:13:57.235 2300 WARNING keystone.common.rbac_enforcer.enforcer [req-d1a5e980-617f-48d4-8322-40b0aa068140 3a3280ddae08412ab1145c193b587161 - - default -] Deprecated policy rules found. Use oslopolicy-policy-generator and oslopolicy-policy-upgrade to detect and resolve deprecated policies in your configuration.
Link to picture
try to find any rc files in your /root folder.
the file name is similar with openrc or adminrc
$ .openrc
$ try some openstack command
and it will succeed.

artifactory 6.8.7 won't start as can't connect to access server

Since upgrading to 6.8.7 using the rpm on RHEL 7, using systemctl start artifactory fails
Looking in the log its failing at this point
2019-03-16 09:50:28,952 [art-init] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:593) - Using Access Server URL: http://localhost:8040/access (bundled) source: detected
2019-03-16 09:50:29,379 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:353) - Waiting for access server...
2019-03-16 09:50:30,625 [art-init] [WARN ] (o.j.a.c.AccessClientHttpException:41) - Unrecognized ErrorsModel by Access. Original message: Failed on executing /api/v1/system/ping, with response: Not Found
2019-03-16 09:50:30,634 [art-init] [ERROR] (o.a.s.a.AccessServiceImpl:364) - Could not ping access server: {}
org.jfrog.access.client.AccessClientHttpException: HTTP response status 404:Failed on executing /api/v1/system/ping, with response: Not Found
Previously we would get
2019-03-13 09:56:06,293 [art-init] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:593) - Using Access Server URL: http://localhost:8040/access (bundled) source: detected
2019-03-13 09:56:06,787 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:353) - Waiting for access server...
2019-03-13 09:56:24,068 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:360) - Got response from Access server after 17280 ms, continuing.
Any suggestions on debugging whether this access server has started ?
Further to this I found logs showing when it worked it used to start a jar file
2019-03-08 09:19:11,609 [localhost-startStop-2] [INFO ] (o.j.a.AccessApplication:48) - Starting AccessApplication v4.1.48 on hostname.nexor.co.uk with PID 5913 (/opt/jfrog/artifactory/tomcat/webapps/access/WEB-INF/lib/access-application-4.1.48.jar started by artifactory in /)
Now when i look I find /opt/jfrog/artifactory/tomcat/webapps/access/ is empty so there is no jar file to run
The rpm did deliver an access.war file and that is there
$ ls -l /opt/jfrog/artifactory/webapps
total 104692
-rwxrwxr-x. 1 root root 51099759 Mar 14 12:14 access.war
-rwxrwxr-x. 1 root root 56099348 Mar 14 12:14 artifactory.war
Is there some manual step I can run to expand this war file to get the jar (as you can guess I am not up on my java apps)
Eventually got it working by deleting the empty /opt/jfrog/artifactory/tomcat/webapps/access directory and a new one containing the required jar files got created.
Not sure why this happened but that got it working for me
I had similar problem on CentOS 7, the solution was downgrade the newly updated java packages by running this command:
yum downgrade java-1.8.0*
After that restart the artifactory:
systemctl restart artifactory
Try changing the port number under your tomcat\conf\server.xml from 8081 to a different, unused port. Then, restart the Artifactory service to ensure the change takes effect.

Could not connect to Realm Object Server 2.0

I install ROS on my server, but when I called ros start and it will running at my server, here is the log:
login as: root
root#*.*.*.*'s password:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-109-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Welcome to Alibaba Cloud Elastic Compute Service !
root#iZwz940pq66re8qvh8adzuZ:~# ros start
info: Loaded feature token capabilities=[Sync], expires=Wed Apr 19 2017 22:15:29 GMT+0800 (CST)
info: Realm Object Server version 2.5.1 is starting
info: [sync] Realm sync server started ([realm-core-4.0.4], [realm- sync-2.1.10])
info: [sync] Directory holding persistent state: /root/data/sync/user_data
info: [sync] Operating mode: master_with_no_slave
info: [sync] Log level: info
info: [sync] Download log compaction is enabled
info: [sync] Max download size: 131072 bytes
info: [sync] Listening on 127.0.0.1:35571 (sync protocol version 22)
info: Realm Object Server has started and is listening on http://0.0.0.0:9080
But when I entered the address in the browser, It told me that I could not connect.And I use Realm Studio to connect it also tell me that could not reach the server, did i forget something steps? Maybe my server's security policy forbide the port?
Per to the log description, Realm Object Server has started and is listening on http://0.0.0.0:9080.
Please ensure you've allowed TCP port 9080 in your ECS security group.
For detail steps, please refer the document
Add a security group rule

Karaf freezing with log at debug when connecting with client

With Karaf 4.1.3 and Karaf 4.1.4 when I connect as a client.sh (with the log level set to debug) and perform a log:tail I get the following...
2018-01-05 13:38:00,348 | DEBUG | 0]-nio2-thread-1 | Nio2Session | 48 - org.apache.sshd.core - 1.6.0 | handleCompletedWriteCycle(Nio2Session[local=/127.0.0.1:8101, remote=/127.0.0.1:50379]) finished writing len=68
screams out on to the console, and unless I control C the whole karaf container hangs and in the server window I get the following message:
2018-01-05 13:37:58,819 RMI Scheduler(0) ERROR Recursive call to appender PaxOsgi
2018-01-05 13:37:58,819 RMI Scheduler(0) ERROR Recursive call to appender PaxOsgi
2018-01-05 13:37:58,819 RMI Scheduler(0) ERROR Recursive call to appender PaxOsgi
2018-01-05 13:37:58,819 RMI Scheduler(0) ERROR Recursive call to appender PaxOsgi
This is with a clean unzip running oracle 1.8 on both windows and ubuntu.
Any ideas?
Confirmed a bug and ticket raised:
https://issues.apache.org/jira/browse/KARAF-5559

Resources