Deploymet error on local install - Nimbus?

I am getting a strange error on my development box. I have completely updated the repo files and redeployed the box..........no issues on start up and configuration I have been able to upload some of my old surveys to the new development environment and all looks good. util I try to deploy..

I get a application error saying that it cannot create menus and the commcare django log has this to show

ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /validate_form (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f09e6027b90>: Failed to establish a new connection: [Errno 111] Connection refused',))
ERROR 2018-03-15 02:03:31,318 logging 31997 139679986874112 Notify Exception: Error calling Nimbus form validation endpoint
Traceback (most recent call last):
File "/home/commcarehq/commcare-hq/corehq/apps/nimbus_api/form_validation.py", line 46, in validate_form
headers={'Content-Type': 'application/xml'}
File "/home/commcarehq/local/lib/python2.7/site-packages/requests/api.py", line 111, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/commcarehq/local/lib/python2.7/site-packages/requests/api.py", line 57, in request
return session.request(method=method, url=url, **kwargs)
File "/home/commcarehq/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/commcarehq/local/lib/python2.7/site-packages/raven/breadcrumbs.py", line 297, in send
resp = real_send(self, request, *args, **kwargs)
File "/home/commcarehq/local/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "/home/commcarehq/local/lib/python2.7/site-packages/requests/adapters.py", line 467, in send
raise ConnectionError(e, request=request)

Any Ideas? I am not through deploying so no SSL or form player as of yet but i usually can get this to work by now........

ConnectionError: HTTPConnectionPool(host=‘localhost’, port=8080): Max retries exceeded with url: /validate_form (Caused by NewConnectionError(’<requests.packages.urllib3.connection.HTTPConnection object at 0x7f09e6027b90>: Failed to establish a new connection: [Errno 111] Connection refused’,))

This is an error connecting to the formplayer service.

Any Ideas? I am not through deploying so no SSL or form player as of yet but i usually can get this to work by now…

We use formplayer to validate forms before building apps, so formplayer is required to be deployed before applications can be built.

If you're on Linux the easiest way to setup formplayer is to follow the docker instructions

I am on Linux, Ubuntu 16.04 server I have the server up and running but the formplayer is not playing nice.

im getting an error during the build:

commcarehq@Dev2:~/formplayer$ ./gradlew build && java -jar build/libs/formplayer.jar
:commcare:extractLibs NO-SOURCE
:commcare:compileJava UP-TO-DATE
:commcare:processResources UP-TO-DATE
:commcare:classes UP-TO-DATE
:commcare:compileApiJava UP-TO-DATE
:commcare:processApiResources UP-TO-DATE
:commcare:apiClasses UP-TO-DATE
:commcare:apiJar UP-TO-DATE
:commcare:compileTranslateJava UP-TO-DATE
:commcare:processTranslateResources NO-SOURCE
:commcare:translateClasses UP-TO-DATE
:commcare:formTranslateJar UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:findMainClass
:jar UP-TO-DATE
:commcare:compileCliJava UP-TO-DATE
:commcare:processCliResources UP-TO-DATE
:commcare:cliClasses UP-TO-DATE
:commcare:compileTestJava UP-TO-DATE
:commcare:copyTestResources UP-TO-DATE
:commcare:processTestResources UP-TO-DATE
:commcare:testClasses UP-TO-DATE
:commcare:test

org.javarosa.xpath.test.XPathEvalTest > doTests FAILED
org.javarosa.core.services.locale.LocaleTextException at XPathEvalTest.java:57

584 tests completed, 1 failed
:commcare:test FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':commcare:test'.

There were failing tests. See the report at: file:///home/commcarehq/formplayer/libs/commcare/build/reports/tests/test/index.html

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.402 secs
commcarehq@Dev2:~/formplayer$

not sure what the issue could be never seen this before.

I have tried to keep the versions pulled from the same time frame......jan 19 for both the commcare repo and the formplayer.

I have use this exact repo version and it built fine........any ideas whats going on?

I will take a look at the docker info but if the orginal version is not on an a docker will it still work?

I don't have any tips for debugging the build failures. If you're not developing formplayer, it's probably easiest to use a pre-built .jar file. That's what I use in local development, here's how it's setup: https://github.com/dimagi/commcare-hq#running-formplayerjar. The docker container does basically the same thing. However I'm not sure whether the current build of formplayer will work with an older version of CommCareHQ. Is there a reason you've pinned the code to that date?

I have refreshed both of my versions of CCHQ and formplayer to remove any issues ....still have the same build failure on the jar file.........

I will keep in the loop if I find any resolutions.

To skip the tests (where your build is failing) you can run ./gradlew assemble; instead of ./gradlew build;

I'd also double check that your commcarehq.formplayerAuthKey=secretkey value is set correctly in application.properties (this value should match the one in your HQ localsettings.py)

thanks for the response Will,

I have been using the ./gradlew assemble as you suggested......alone with ./gradlew clean to clear the cached settings. still not go...

on the application.properties it is set to the default.....commcarehq.formplayerAuthKey=secretkey

i do not see this setting in the localsettings file..........am I missing something?

The corresponding setting to commcarehq.formplayerAuthKey in Django is FORMPLAYER_INTERNAL_AUTH_KEY.

These two values should match to allow Formplayer to communicate with the Django processes.