21 Replies Latest reply on Mar 1, 2017 12:59 PM by polinao RSS
    dmansfeld Newbie

    Invisible Vocabulary

    Hi,

    I have a problem. When trying to add a new term/modelTag, I dont see any vocabularies (and yes, they exist). Therefore I am unable to create new modelTags.

    Any idea what can be done about it?

     

    2017-02-08.png

    *this is open drop down list for vocabulary

    Edit:

    TW version: 7.3.1-b39

    Browsers: Chrome, Firefox, Edge - all do the same

     

    Thanks in advance for your thoughts.

      • Re: Invisible Vocabulary
        polinao Collaborator

        Could you please provide the thingworx version and the browser you are using? Might also open a support ticket to file the defect, if confirmed.

         

        And just to make sure - are you logged in as Administrator?

          • Re: Invisible Vocabulary
            dmansfeld Newbie

            Yep, I am.

            TW version: 7.3.1-b39

            Browsers: Chrome, Firefox, Edge - all do the same

              • Re: Invisible Vocabulary
                polinao Collaborator

                Strange, I'm on the same version and I am able to see the dropdown:

                 

                What happens if you go into a vocabulary directly (through the model tags section in the composer) and add a term manually?

                 

                Also what is your backend database? At this point I would say you should open a support ticket and have an engineer do a webex to investigate the issue.

                  • Re: Invisible Vocabulary
                    dmansfeld Newbie

                    - Yes, I tried to add it in multiple places (even in entityServices), but all end up at the same modal window, where choosing vocabulary is not possible.

                    - Postgre

                      • Re: Invisible Vocabulary
                        polinao Collaborator

                        What happens if you go directly into the vocabulary and click "new term"? A window similar to this should appear:

                         

                        Also, please check the Application log to see if there are any errors.

                          • Re: Invisible Vocabulary
                            dmansfeld Newbie

                            I missed this way. And it worked fine. And I can add them to Things after that.

                            But initial problem stays.

                             

                            I got these errors, but not exactly sure after what exactly they occur. (probably after creation of tags, but only the first two)

                            - Error sending response: java.lang.NullPointerException

                            -Invalid request: com.thingworx.common.exceptions.InvalidRequestException: Invalid API Request: url [/ModelTags/Services/Custom/] method [POST]

                            - [message: Invalid API Request: url [/ModelTags/Services/Custom/] method [POST]]

                             

                            This may be relevant

                            2017-02-08 (3).png

                              • Re: Invisible Vocabulary
                                jkaczynski-2 Creator

                                Hi David Mansfeld,

                                 

                                It may be a long shot, but why do not double-check - I assume that at least one of your Vocabularies have set the Dynamic attribute to true?

                                If yes - could you check if all of your subsystems work correctly?

                                If second yes - could you restart Tomcat and try again?

                                 

                                Regards,

                                J.

                                  • Re: Invisible Vocabulary
                                    dmansfeld Newbie

                                    I do.

                                    They are all running.

                                    I restarted Tomcat, but nothing has changed.

                                      • Re: Invisible Vocabulary
                                        polinao Collaborator

                                        I've just installed 7.3.1-b39 with postgresql, and cannot reproduce this. What extensions do you have installed? If you create a new vocabulary , does it show?

                                          • Re: Invisible Vocabulary
                                            jkaczynski-2 Creator

                                            Hi David,

                                             

                                            The ultimate answer for all the troubles with Thingworx - are you able to backup your work and clean your Thingworx at all? I mean by:

                                            • Shutting down the Tomcat.
                                            • Removing the /ThingworxStorage (and optionally /ThingworxBackupStorage) folder.
                                            • Removing the %TOMCAT_HOME%/webapps/Thingworx folder.
                                            • Removing the %TOMCAT_HOME%/work/Catalina folder.
                                            • Starting the Tomcat up.

                                            And trying to reproduce?

                                              • Re: Invisible Vocabulary
                                                dmansfeld Newbie

                                                I did what you said, but now Thingworx stopped working, but dont focus on that now. Anyway I also installed same version of TW on my laptop few days ago and it produces the same problem, so its probably my fault.

                                                 

                                                There are step in installation I am not so sure about.

                                                 

                                                in thingworxPostgresDBSetup.bat I set this, because default location didnt work for me.

                                                ... SET tablespace_location=C:\ThingworxStorage ...

                                                --based on this problem Install and Configure Single DB Postgres SQL

                                                 

                                                 

                                                And I also havent made any changes in server.xml file in tomcat/config, because it seemed that the protocol for port 8843 was OK by default.

                                                Are these parts OK?

                                                ....

                                                <Connector port="80" protocol="HTTP/1.1"

                                                               connectionTimeout="20000"

                                                               redirectPort="8443"

                                                  address="0.0.0.0" />

                                                    <!-- A "Connector" using the shared thread pool-->

                                                    <!--

                                                    <Connector executor="tomcatThreadPool"

                                                               port="80" protocol="HTTP/1.1"

                                                               connectionTimeout="20000"

                                                               redirectPort="8443" />

                                                    -->

                                                ....

                                                <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"

                                                               maxThreads="150" SSLEnabled="true" >

                                                        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />

                                                        <SSLHostConfig>

                                                            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"

                                                                         certificateFile="conf/localhost-rsa-cert.pem"

                                                                         certificateChainFile="conf/localhost-rsa-chain.pem"

                                                                         type="RSA" />

                                                        </SSLHostConfig>

                                                    </Connector>

                                                    -->

                                                 

                                                 

                                                    <!-- Define an AJP 1.3 Connector on port 8009 -->

                                                    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

                                                ......

                                                  • Re: Invisible Vocabulary
                                                    jkaczynski-2 Creator

                                                    Hi,

                                                     

                                                    The best way to check if your ports are okay is to startup a Tomcat and check logs under %TOMCAT_HOME%/logs/catalina<date>.logs

                                                    If any port is in use, you should see the following error:

                                                    <timestamp> SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8088"]

                                                     

                                                    The port would be adjusted accordingly.

                                                     

                                                    After such an installation, do you have Postgre files installed under ThingworxStorage instead of ThingworxPostgresqlStorage?

                                                      • Re: Invisible Vocabulary
                                                        dmansfeld Newbie

                                                        - found this SEVERE

                                                        8:59:58.342 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[org.apache.coyote.http11.Http11AprProtocol-80]]

                                                        org.apache.catalina.LifecycleException: Failed to initialize component [Connector[org.apache.coyote.http11.Http11AprProtocol-80]]

                                                         

                                                        - Yep

                                                          • Re: Invisible Vocabulary
                                                            jkaczynski-2 Creator

                                                            Yes, it can be caused by other instance of Tomcat (or other application) using the port 80. Please make sure that you shut down all instances of Tomcat before starting up. You can check the Task Manager to make sure no other instances are working in the background.

                                                              • Re: Invisible Vocabulary
                                                                dmansfeld Newbie

                                                                Only one Tomcat is running and to safecheck I changed the port it was using to a different one. But still the same problem.

                                                                 

                                                                And found THE problem in request url, but not sure what the cause is... As I posted above (screenshot with Network info) with the returns status code 400. I looked at the url request

                                                                http://..../Thingworx/ModelTags/?Accept=application%2Fjson-compressed&_twsr=1&Content-Type=application%2Fjson&{}&_=1486635991341

                                                                and if I remove this &{}, the request work fine and returns Application vocabulary.

                                                                EDIT: Probably bad guess, I tried a working instace of TW and which also had &{} inside and it worked OK. However, maybe I have bad server.xml.

                                                                Could you provide me with a working example server.xml file?


                                                                I think this is the log from catalina about its inability to parse the request:

                                                                09-Feb-2017 12:27:07.429 INFO [http-nio-8081-exec-4] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header

                                                                Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.

                                                                java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

                                                                  at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:471)

                                                                  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667)

                                                                  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

                                                                  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)

                                                                  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)

                                                                  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                                                                  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                                                                  at java.lang.Thread.run(Unknown Source)

                                                                 

                                                                Edit:

                                                                I tried to reinstall Tomcat, from 8.5 version to 8.0 and copied  server.xml file from another instance which works fine, just to be 100% sure. Reinstalled TW. No change.

                                                                 

                                                                this is from localhost_access_log.txt

                                                                0:0:0:0:0:0:0:1 - - [09/Feb/2017:13:39:32 +0100] "POST /Thingworx/Subsystems/PlatformSubsystem/Services/GetEntityCount?Accept=application%2Fjson HTTP/1.1" 200 1352

                                                                0:0:0:0:0:0:0:1 - - [09/Feb/2017:13:39:34 +0100] "POST /Thingworx/Resources/SearchFunctions/Services/SearchVocabularyTerms?Accept=application%2Fjson-compressed&_twsr=1&Content-Type=application%2Fjson HTTP/1.1" 200 374

                                                                0:0:0:0:0:0:0:1 - - [09/Feb/2017:13:39:35 +0100] "POST /Thingworx/Resources/SearchFunctions/Services/SearchVocabularyTerms?Accept=application%2Fjson-compressed&_twsr=1&Content-Type=application%2Fjson HTTP/1.1" 200 374

                                                                0:0:0:0:0:0:0:1 - - [09/Feb/2017:13:39:36 +0100] "GET null null" 400 -

                                                                0:0:0:0:0:0:0:1 - - [09/Feb/2017:13:40:34 +0100] "POST /Thingworx/Resources/SearchFunctions/Services/SearchVocabularyTerms?Accept=application%2Fjson-compressed&_twsr=1&Content-Type=application%2Fjson HTTP/1.1" 200 374

                                                                0:0:0:0:0:0:0:1 - - [09/Feb/2017:13:40:35 +0100] "GET null null" 400 -

                                                                 


                                                      • Re: Invisible Vocabulary
                                                        dmansfeld Newbie

                                                        no extensions so far. Yes, it shows.

                                      • Re: Invisible Vocabulary
                                        tcoufal Communicator

                                        Hi,

                                        I am having the same problem. I am running 7.3.0 on CentOS.

                                        Opened the case, they couldnt reproduce the issue though.